合并分支 'lyh-server' 到 'master'
变更数据 查看合并请求 !3333
正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
| @@ -111,8 +111,7 @@ class Extension3915ModuleController extends BaseController | @@ -111,8 +111,7 @@ class Extension3915ModuleController extends BaseController | ||
| 111 | } | 111 | } |
| 112 | $data = $this->param; | 112 | $data = $this->param; |
| 113 | $moduleValueModel = new ExtensionModuleValue(); | 113 | $moduleValueModel = new ExtensionModuleValue(); |
| 114 | - //todo::优先截断表 | ||
| 115 | - $moduleValueModel->truncate(); | 114 | + |
| 116 | $key_filedId = []; | 115 | $key_filedId = []; |
| 117 | $resultData = []; | 116 | $resultData = []; |
| 118 | foreach ($data as $k => $v){ | 117 | foreach ($data as $k => $v){ |
| @@ -131,7 +130,11 @@ class Extension3915ModuleController extends BaseController | @@ -131,7 +130,11 @@ class Extension3915ModuleController extends BaseController | ||
| 131 | ]; | 130 | ]; |
| 132 | } | 131 | } |
| 133 | } | 132 | } |
| 133 | + if(!empty($resultData)){ | ||
| 134 | + //todo::优先截断表 | ||
| 135 | + $moduleValueModel->truncate(); | ||
| 134 | $moduleValueModel->insertAll($resultData); | 136 | $moduleValueModel->insertAll($resultData); |
| 137 | + } | ||
| 135 | $this->response('success',Code::SUCCESS,$resultData); | 138 | $this->response('success',Code::SUCCESS,$resultData); |
| 136 | } | 139 | } |
| 137 | } | 140 | } |
-
请 注册 或 登录 后发表评论