作者 lyh

变更数据

... ... @@ -98,7 +98,9 @@ class CopyProject extends Command
$data['old_project_id'] = $old_project_id;
unset($data['id'],$data['exclusive_aicc_day'],$data['aicc'],$data['robots'],$data['is_translate_tag'],$data['is_translate'],$data['is_minor_languages'],$data['uptime']);
$project_id = $projectModel->insertGetId($data);
$data['post_id'] = mt_rand(100000, 999999).$project_id;
$letters = range('A', 'X'); // 只取前 24 个字母(A ~ X)
$randomLetter = $letters[array_rand($letters)];
$data['post_id'] = $randomLetter.mt_rand(100000, 999999).$project_id;
$hashids = new Hashids($data['from_order_id'], 13, 'abcdefghjkmnpqrstuvwxyz1234567890');
$projectModel->edit(['from_order_id'=>$hashids->encode($project_id),'post_id'=>$data['post_id']],['id'=>$project_id]);
//复制设置的模版
... ...