|
|
@ -305,7 +305,7 @@ class AutoPackController extends Think
|
|
|
|
$zip = new \ZipArchive();
|
|
|
|
$zip = new \ZipArchive();
|
|
|
|
|
|
|
|
|
|
|
|
$map['status'] = 1;
|
|
|
|
$map['status'] = 1;
|
|
|
|
$map['enable_status'] = ['in', '0,2,3'];
|
|
|
|
$map['enable_status'] = ['in', '0,2'];
|
|
|
|
|
|
|
|
|
|
|
|
$applyModel = M('apply', 'tab_');
|
|
|
|
$applyModel = M('apply', 'tab_');
|
|
|
|
$gameSourceModel = M('Game_source', 'tab_');
|
|
|
|
$gameSourceModel = M('Game_source', 'tab_');
|
|
|
@ -315,9 +315,18 @@ class AutoPackController extends Think
|
|
|
|
-> field('id,game_id,game_name,promote_id,promote_account,sdk_version')
|
|
|
|
-> field('id,game_id,game_name,promote_id,promote_account,sdk_version')
|
|
|
|
-> where($map)
|
|
|
|
-> where($map)
|
|
|
|
-> order('bale_sort desc,id desc')
|
|
|
|
-> order('bale_sort desc,id desc')
|
|
|
|
-> limit(200)
|
|
|
|
-> limit(100)
|
|
|
|
-> select();
|
|
|
|
-> select();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$applyIds = array_column($apply_data, 'id');
|
|
|
|
|
|
|
|
$applyCount = count($applyIds);
|
|
|
|
|
|
|
|
if ($applyCount > 0) {
|
|
|
|
|
|
|
|
M('apply', 'tab_')->where(['id' => ['in', $applyIds]])->save(['enable_status' => 3]);
|
|
|
|
|
|
|
|
echo date('Y-m-d H:i:s') . ' PackCount: ' . $applyCount . PHP_EOL;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
echo date('Y-m-d H:i:s') . ' PackCount: ' . $applyCount . PHP_EOL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($apply_data)) {
|
|
|
|
if (!empty($apply_data)) {
|
|
|
|
foreach ($apply_data as $key => $value) {
|
|
|
|
foreach ($apply_data as $key => $value) {
|
|
|
|
|
|
|
|
|
|
|
@ -341,7 +350,7 @@ class AutoPackController extends Think
|
|
|
|
$launchModel->where(['apply_id'=>$value['id'], 'launch_packge'=>['in',[0,2,3]]])->save(['launch_packge'=>2,'launch_down_url'=>'','launch_plist_url'=>'']);
|
|
|
|
$launchModel->where(['apply_id'=>$value['id'], 'launch_packge'=>['in',[0,2,3]]])->save(['launch_packge'=>2,'launch_down_url'=>'','launch_plist_url'=>'']);
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$applyModel -> where(['id' => $value['id']]) -> setField('enable_status', 3);
|
|
|
|
// $applyModel -> where(['id' => $value['id']]) -> setField('enable_status', 3);
|
|
|
|
|
|
|
|
|
|
|
|
if ($value['sdk_version'] == 1) {
|
|
|
|
if ($value['sdk_version'] == 1) {
|
|
|
|
$str_ver = ".apk";
|
|
|
|
$str_ver = ".apk";
|
|
|
|