|
...
|
...
|
@@ -49,6 +49,7 @@ class BTemplateLogLogic extends BaseLogic |
|
|
|
if($settingInfo === false){
|
|
|
|
$this->fail('请先选择模版');
|
|
|
|
}
|
|
|
|
//切换模版
|
|
|
|
if($info['template_id'] != $settingInfo['template_id']){
|
|
|
|
$bSettingModel->edit(['template_id'=>$info['template_id']],['id'=>$settingInfo['id']]);
|
|
|
|
}
|
|
...
|
...
|
@@ -58,11 +59,10 @@ class BTemplateLogLogic extends BaseLogic |
|
|
|
$BTemplateModel->edit($data,['template_id'=>$info['template_id'],'source'=>$info['source'],'source_id'=>$info['source_id']]);
|
|
|
|
$commonData = $this->setCommonParam($info);
|
|
|
|
$commonTemplateModel = new BTemplateCommon();
|
|
|
|
$commonTemplateModel->edit($commonData,['template_id'=>$info['template_id'],'project_id'=>$this->user['project_id']]);
|
|
|
|
$commonTemplateModel->edit($commonData,['template_id'=>$info['template_id'],'type'=>1,'project_id'=>$this->user['project_id']]);
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('系统错误,请联系管理员');
|
|
|
|
}
|
|
|
|
//同步更新公共头和底
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|