作者 lyh

gx

@@ -381,22 +381,22 @@ class ImageController extends Controller @@ -381,22 +381,22 @@ class ImageController extends Controller
381 foreach ($files as $file){ 381 foreach ($files as $file){
382 if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){ 382 if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
383 if ($file->getSize() > $this->cache['image_max']) { 383 if ($file->getSize() > $this->cache['image_max']) {
384 - $this->response('图片最大为500K',Code::SYSTEM_ERROR); 384 + $this->response('图片最大为1024K',Code::SYSTEM_ERROR);
385 } 385 }
386 }else{ 386 }else{
387 if ($file->getSize() > $max) { 387 if ($file->getSize() > $max) {
388 - $this->response('图片最大为500K',Code::SYSTEM_ERROR); 388 + $this->response('图片最大为1024K',Code::SYSTEM_ERROR);
389 } 389 }
390 } 390 }
391 } 391 }
392 }else{ 392 }else{
393 if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){ 393 if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
394 if ($files->getSize() > $this->cache['image_max']) { 394 if ($files->getSize() > $this->cache['image_max']) {
395 - $this->response('图片最大为500K',Code::SYSTEM_ERROR); 395 + $this->response('图片最大为1024K',Code::SYSTEM_ERROR);
396 } 396 }
397 }else{ 397 }else{
398 if ($files->getSize() > $max) { 398 if ($files->getSize() > $max) {
399 - $this->response('图片最大为500K',Code::SYSTEM_ERROR); 399 + $this->response('图片最大为1024K',Code::SYSTEM_ERROR);
400 } 400 }
401 } 401 }
402 } 402 }
@@ -52,8 +52,8 @@ class KeywordLogic extends BaseLogic @@ -52,8 +52,8 @@ class KeywordLogic extends BaseLogic
52 * @time :2023/8/23 16:50 52 * @time :2023/8/23 16:50
53 */ 53 */
54 public function keywordSave(){ 54 public function keywordSave(){
55 -// DB::beginTransaction();  
56 -// try { 55 + DB::beginTransaction();
  56 + try {
57 $this->param = $this->handleSaveParam($this->param); 57 $this->param = $this->handleSaveParam($this->param);
58 if(isset($this->param['id']) && !empty($this->param['id'])){ 58 if(isset($this->param['id']) && !empty($this->param['id'])){
59 $this->model->edit($this->param,['id'=>$this->param['id']]); 59 $this->model->edit($this->param,['id'=>$this->param['id']]);
@@ -69,11 +69,11 @@ class KeywordLogic extends BaseLogic @@ -69,11 +69,11 @@ class KeywordLogic extends BaseLogic
69 $this->model->edit(['route'=>$route],['id'=>$id]); 69 $this->model->edit(['route'=>$route],['id'=>$id]);
70 //清除缓存 70 //清除缓存
71 Common::del_user_cache('product_keyword',$this->user['project_id']); 71 Common::del_user_cache('product_keyword',$this->user['project_id']);
72 -// DB::commit();  
73 -// }catch (\Exception $e){  
74 -// DB::rollBack();  
75 -// $this->fail('保存失败');  
76 -// } 72 + DB::commit();
  73 + }catch (\Exception $e){
  74 + DB::rollBack();
  75 + $this->fail('保存失败');
  76 + }
77 //通知更新 77 //通知更新
78 $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT_KEYWORD, 'route'=>$route]); 78 $this->updateNotify(['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PRODUCT_KEYWORD, 'route'=>$route]);
79 return $this->success(); 79 return $this->success();