作者 lyh

gx

... ... @@ -54,6 +54,8 @@ class ReplaceHtml extends Command
ProjectServer::useProject($v['project_id']);
echo '开始,任务id:'.$v['id'].PHP_EOL;
$this->createReplaceHtmlLog($v);
//修改当前主任务状态为待执行
$replaceHtmlModel->edit(['status'=>$replaceHtmlModel::STATUS_START],['id'=>$v['id']]);
echo '结束'.PHP_EOL;
DB::disconnect('custom_mysql');
}
... ...
... ... @@ -178,7 +178,7 @@ class ReplaceHtmlLogic extends BaseLogic
* @time :2024/5/8 10:35
*/
public function reductionHtml(){
$info = $this->model->read(['id'=>$this->param['id'],'status'=>$this->model::STATUS_SUCCESS]);
$info = $this->model->read(['id'=>$this->param['id'],'status'=>$this->model::STATUS_END]);
if($info === false){
$this->fail('当前数据不存在');
}
... ...
... ... @@ -16,8 +16,9 @@ class TemplateReplaceHtml extends Base
protected $table = 'gl_replace_html';
const STATUS = 0;
const STATUS_SUCCESS = 1;
const STATUS_ERROR = 2;
const STATUS_START = 1;
const STATUS_END = 2;
/**
* @remark :默认类型
* @name :sourceType
... ...