正在显示
3 个修改的文件
包含
6 行增加
和
3 行删除
| @@ -54,6 +54,8 @@ class ReplaceHtml extends Command | @@ -54,6 +54,8 @@ class ReplaceHtml extends Command | ||
| 54 | ProjectServer::useProject($v['project_id']); | 54 | ProjectServer::useProject($v['project_id']); |
| 55 | echo '开始,任务id:'.$v['id'].PHP_EOL; | 55 | echo '开始,任务id:'.$v['id'].PHP_EOL; |
| 56 | $this->createReplaceHtmlLog($v); | 56 | $this->createReplaceHtmlLog($v); |
| 57 | + //修改当前主任务状态为待执行 | ||
| 58 | + $replaceHtmlModel->edit(['status'=>$replaceHtmlModel::STATUS_START],['id'=>$v['id']]); | ||
| 57 | echo '结束'.PHP_EOL; | 59 | echo '结束'.PHP_EOL; |
| 58 | DB::disconnect('custom_mysql'); | 60 | DB::disconnect('custom_mysql'); |
| 59 | } | 61 | } |
| @@ -178,7 +178,7 @@ class ReplaceHtmlLogic extends BaseLogic | @@ -178,7 +178,7 @@ class ReplaceHtmlLogic extends BaseLogic | ||
| 178 | * @time :2024/5/8 10:35 | 178 | * @time :2024/5/8 10:35 |
| 179 | */ | 179 | */ |
| 180 | public function reductionHtml(){ | 180 | public function reductionHtml(){ |
| 181 | - $info = $this->model->read(['id'=>$this->param['id'],'status'=>$this->model::STATUS_SUCCESS]); | 181 | + $info = $this->model->read(['id'=>$this->param['id'],'status'=>$this->model::STATUS_END]); |
| 182 | if($info === false){ | 182 | if($info === false){ |
| 183 | $this->fail('当前数据不存在'); | 183 | $this->fail('当前数据不存在'); |
| 184 | } | 184 | } |
| @@ -16,8 +16,9 @@ class TemplateReplaceHtml extends Base | @@ -16,8 +16,9 @@ class TemplateReplaceHtml extends Base | ||
| 16 | protected $table = 'gl_replace_html'; | 16 | protected $table = 'gl_replace_html'; |
| 17 | 17 | ||
| 18 | const STATUS = 0; | 18 | const STATUS = 0; |
| 19 | - const STATUS_SUCCESS = 1; | ||
| 20 | - const STATUS_ERROR = 2; | 19 | + const STATUS_START = 1; |
| 20 | + const STATUS_END = 2; | ||
| 21 | + | ||
| 21 | /** | 22 | /** |
| 22 | * @remark :默认类型 | 23 | * @remark :默认类型 |
| 23 | * @name :sourceType | 24 | * @name :sourceType |
-
请 注册 或 登录 后发表评论