|
@@ -325,9 +325,12 @@ class CmsContentTemplateSetRepository {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $update_tpl = $this->cmsContentTemplate->where('id', $request['tpl_id'])->update(['status' => 1]);
|
|
|
- if (!$update_tpl) {
|
|
|
- throw new HttpException(500, '修改失败,请重试');
|
|
|
+ $update_tpl = $this->cmsContentTemplate->where('id', $request['tpl_id'])->first();
|
|
|
+ if ($update_tpl){
|
|
|
+ $result = $this->cmsContentTemplate->where('id', $request['tpl_id'])->update(['status' => 1]);
|
|
|
+ if (!$result) {
|
|
|
+ throw new HttpException(500, '修改失败,请重试');
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$template_id = $this->cmsContentTemplateSet->where('tpl_id',$request['tpl_id'])->get();
|