|
|
@ -22,7 +22,13 @@ class GameApiController extends Think {
|
|
|
|
public function verify()
|
|
|
|
public function verify()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$service = new TestingResourceService();
|
|
|
|
$service = new TestingResourceService();
|
|
|
|
$batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 0])->select();
|
|
|
|
|
|
|
|
|
|
|
|
$gameIds = $service->getHasItfGameIds();
|
|
|
|
|
|
|
|
$map = ['verify_status' => 0];
|
|
|
|
|
|
|
|
if (count($gameIds) > 0) {
|
|
|
|
|
|
|
|
$map['game_id'] = ['in', $gameIds];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$batches = M('testing_resource_batch', 'tab_')->where($map)->select();
|
|
|
|
foreach ($batches as $batch) {
|
|
|
|
foreach ($batches as $batch) {
|
|
|
|
$service->verify($batch);
|
|
|
|
$service->verify($batch);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -31,7 +37,14 @@ class GameApiController extends Think {
|
|
|
|
public function provide()
|
|
|
|
public function provide()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$service = new TestingResourceService();
|
|
|
|
$service = new TestingResourceService();
|
|
|
|
$batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 1, 'provide_status' => 0])->select();
|
|
|
|
|
|
|
|
|
|
|
|
$gameIds = $service->getHasItfGameIds();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$map = ['verify_status' => 1, 'provide_status' => 0];
|
|
|
|
|
|
|
|
if (count($gameIds) > 0) {
|
|
|
|
|
|
|
|
$map['game_id'] = ['in', $gameIds];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$batches = M('testing_resource_batch', 'tab_')->where($map)->select();
|
|
|
|
foreach ($batches as $batch) {
|
|
|
|
foreach ($batches as $batch) {
|
|
|
|
$service->provide($batch);
|
|
|
|
$service->provide($batch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|