作者 lyh

gx

... ... @@ -33,7 +33,7 @@ class WebSettingReceivingLogic extends BaseLogic
* @time :2023/5/8 16:26
*/
public function setting_receiving_save(){
// try {
try {
$this->model->del(['project_id'=>$this->user['project_id']]);
foreach ($this->param['data'] as $k => $v){
$v['project_id'] = $this->user['project_id'];
... ... @@ -42,9 +42,9 @@ class WebSettingReceivingLogic extends BaseLogic
$this->param['data'][$k] = $v;
}
$this->model->insert($this->param['data']);
// }catch (\Exception $e){
// $this->fail('error');
// }
}catch (\Exception $e){
$this->fail('error');
}
return $this->success();
}
}
... ...
... ... @@ -35,8 +35,8 @@ class WebSettingServiceLogic extends BaseLogic
* @time :2023/5/4 11:10
*/
public function setting_service_save(){
DB::beginTransaction();
try {
// DB::beginTransaction();
// try {
$this->param['data'] = Common::uniqueMultiArray($this->param['data']);
//删除以前的数据
$this->model->del(['project_id'=>$this->user['project_id']]);
... ... @@ -47,11 +47,11 @@ class WebSettingServiceLogic extends BaseLogic
$this->param['data'][$k] = $v;
}
$this->model->insert($this->param['data']);
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('error');
}
// DB::commit();
// }catch (\Exception $e){
// DB::rollBack();
// $this->fail('系统错误,请联系管理员');
// }
return $this->success();
}
}
... ...
<?php
/**
* @remark :
* @name :BTemplateCommon.php
* @author :lyh
* @method :post
* @time :2023/10/13 11:45
*/
namespace App\Models\Template;
use App\Models\Base;
class BTemplateCommon extends Base
{
protected $table = 'gl_template_common';
//连接数据库
protected $connection = 'custom_mysql';
}
... ...