作者 lyh

gx

@@ -201,14 +201,14 @@ class LoginController extends BaseController @@ -201,14 +201,14 @@ class LoginController extends BaseController
201 } 201 }
202 202
203 /** 203 /**
204 - * @remark :登录成功获取用户信息 204 + * @remark :登录成功响应
205 * @name :getWechatLoginInfo 205 * @name :getWechatLoginInfo
206 * @author :lyh 206 * @author :lyh
207 * @method :post 207 * @method :post
208 * @time :2023/9/1 10:12 208 * @time :2023/9/1 10:12
209 */ 209 */
210 public function getWechatLoginInfo(){ 210 public function getWechatLoginInfo(){
211 - $info = Cache::get($this->param['Ticket']); 211 + $info = Cache::get($this->param['ticket']);
212 $this->response('success',Code::SUCCESS,$info); 212 $this->response('success',Code::SUCCESS,$info);
213 } 213 }
214 214
@@ -174,8 +174,8 @@ class BTemplateLogic extends BaseLogic @@ -174,8 +174,8 @@ class BTemplateLogic extends BaseLogic
174 */ 174 */
175 public function templateSave(){ 175 public function templateSave(){
176 //查询当前模版是否已保存 176 //查询当前模版是否已保存
177 -// DB::beginTransaction();  
178 -// try { 177 + DB::beginTransaction();
  178 + try {
179 $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']); 179 $info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']);
180 //字符串截取 180 //字符串截取
181 $this->param = $this->stringProcessing($this->param); 181 $this->param = $this->stringProcessing($this->param);
@@ -186,11 +186,11 @@ class BTemplateLogic extends BaseLogic @@ -186,11 +186,11 @@ class BTemplateLogic extends BaseLogic
186 $this->model->edit($this->param,['id'=>$info['id']]); 186 $this->model->edit($this->param,['id'=>$info['id']]);
187 } 187 }
188 $this->setTemplateLog($this->param); 188 $this->setTemplateLog($this->param);
189 -// DB::commit();  
190 -// }catch (\Exception $e){  
191 -// DB::rollBack();  
192 -// $this->fail('error');  
193 -// } 189 + DB::commit();
  190 + }catch (\Exception $e){
  191 + DB::rollBack();
  192 + $this->fail('error');
  193 + }
194 //通知更新 194 //通知更新
195 $this->homeOrProduct($this->param['source'],$this->param['source_id']); 195 $this->homeOrProduct($this->param['source'],$this->param['source_id']);
196 return $this->success(); 196 return $this->success();