作者 lyh

gx

... ... @@ -52,8 +52,8 @@ class KeywordLogic extends BaseLogic
* @time :2023/8/23 16:50
*/
public function keywordSave(){
DB::beginTransaction();
try {
// DB::beginTransaction();
// try {
$this->param = $this->handleSaveParam($this->param);
if(isset($this->param['id']) && !empty($this->param['id'])){
//TODO::不能修改路由
... ... @@ -66,13 +66,13 @@ class KeywordLogic extends BaseLogic
$route = RouteMap::setRoute($this->param['title'], RouteMap::SOURCE_PRODUCT_KEYWORD, $id, $this->user['project_id']);
$this->model->edit(['route'=>$route],['id'=>$id]);
}
//清除缓存
Common::del_user_cache('product_keyword',$this->user['project_id']);
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('保存失败');
}
// //清除缓存
// Common::del_user_cache('product_keyword',$this->user['project_id']);
// DB::commit();
// }catch (\Exception $e){
// DB::rollBack();
// $this->fail('保存失败');
// }
$this->addUpdateNotify(RouteMap::SOURCE_PRODUCT_KEYWORD,$route);
$this->curlDelRoute(['new_route'=>$route]);
return $this->success();
... ...