作者 lyh

gx

@@ -33,7 +33,7 @@ class WebSettingReceivingLogic extends BaseLogic @@ -33,7 +33,7 @@ class WebSettingReceivingLogic extends BaseLogic
33 * @time :2023/5/8 16:26 33 * @time :2023/5/8 16:26
34 */ 34 */
35 public function setting_receiving_save(){ 35 public function setting_receiving_save(){
36 -// try { 36 + try {
37 $this->model->del(['project_id'=>$this->user['project_id']]); 37 $this->model->del(['project_id'=>$this->user['project_id']]);
38 foreach ($this->param['data'] as $k => $v){ 38 foreach ($this->param['data'] as $k => $v){
39 $v['project_id'] = $this->user['project_id']; 39 $v['project_id'] = $this->user['project_id'];
@@ -42,9 +42,9 @@ class WebSettingReceivingLogic extends BaseLogic @@ -42,9 +42,9 @@ class WebSettingReceivingLogic extends BaseLogic
42 $this->param['data'][$k] = $v; 42 $this->param['data'][$k] = $v;
43 } 43 }
44 $this->model->insert($this->param['data']); 44 $this->model->insert($this->param['data']);
45 -// }catch (\Exception $e){  
46 -// $this->fail('error');  
47 -// } 45 + }catch (\Exception $e){
  46 + $this->fail('error');
  47 + }
48 return $this->success(); 48 return $this->success();
49 } 49 }
50 } 50 }
@@ -35,8 +35,8 @@ class WebSettingServiceLogic extends BaseLogic @@ -35,8 +35,8 @@ class WebSettingServiceLogic extends BaseLogic
35 * @time :2023/5/4 11:10 35 * @time :2023/5/4 11:10
36 */ 36 */
37 public function setting_service_save(){ 37 public function setting_service_save(){
38 - DB::beginTransaction();  
39 - try { 38 +// DB::beginTransaction();
  39 +// try {
40 $this->param['data'] = Common::uniqueMultiArray($this->param['data']); 40 $this->param['data'] = Common::uniqueMultiArray($this->param['data']);
41 //删除以前的数据 41 //删除以前的数据
42 $this->model->del(['project_id'=>$this->user['project_id']]); 42 $this->model->del(['project_id'=>$this->user['project_id']]);
@@ -47,11 +47,11 @@ class WebSettingServiceLogic extends BaseLogic @@ -47,11 +47,11 @@ class WebSettingServiceLogic extends BaseLogic
47 $this->param['data'][$k] = $v; 47 $this->param['data'][$k] = $v;
48 } 48 }
49 $this->model->insert($this->param['data']); 49 $this->model->insert($this->param['data']);
50 - DB::commit();  
51 - }catch (\Exception $e){  
52 - DB::rollBack();  
53 - $this->fail('error');  
54 - } 50 +// DB::commit();
  51 +// }catch (\Exception $e){
  52 +// DB::rollBack();
  53 +// $this->fail('系统错误,请联系管理员');
  54 +// }
55 return $this->success(); 55 return $this->success();
56 } 56 }
57 } 57 }
  1 +<?php
  2 +/**
  3 + * @remark :
  4 + * @name :BTemplateCommon.php
  5 + * @author :lyh
  6 + * @method :post
  7 + * @time :2023/10/13 11:45
  8 + */
  9 +
  10 +namespace App\Models\Template;
  11 +
  12 +use App\Models\Base;
  13 +
  14 +class BTemplateCommon extends Base
  15 +{
  16 + protected $table = 'gl_template_common';
  17 + //连接数据库
  18 + protected $connection = 'custom_mysql';
  19 +}