作者 lyh

变更数据

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