|
|
|
1
|
+<?php
|
|
|
|
2
|
+
|
|
|
|
3
|
+namespace App\Http\Logic\Bside\Setting;
|
|
|
|
4
|
+
|
|
|
|
5
|
+use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
6
|
+use App\Models\WebSetting\WebSettingReceiving;
|
|
|
|
7
|
+use App\Models\WebSetting\WebSettingText;
|
|
|
|
8
|
+
|
|
|
|
9
|
+class WebSettingReceivingLogic extends BaseLogic
|
|
|
|
10
|
+{
|
|
|
|
11
|
+ public function __construct()
|
|
|
|
12
|
+ {
|
|
|
|
13
|
+ parent::__construct();
|
|
|
|
14
|
+ $this->model = new WebSettingReceiving();
|
|
|
|
15
|
+ $this->param = $this->requestAll;
|
|
|
|
16
|
+ }
|
|
|
|
17
|
+
|
|
|
|
18
|
+ /**
|
|
|
|
19
|
+ * @name :(列表数据)setting_receiving_lists
|
|
|
|
20
|
+ * @author :lyh
|
|
|
|
21
|
+ * @method :post
|
|
|
|
22
|
+ * @time :2023/5/8 16:17
|
|
|
|
23
|
+ */
|
|
|
|
24
|
+ public function setting_receiving_lists(){
|
|
|
|
25
|
+ $lists = $this->model->list(['project_id'=>$this->user['project_id']]);
|
|
|
|
26
|
+ return $this->success($lists);
|
|
|
|
27
|
+ }
|
|
|
|
28
|
+
|
|
|
|
29
|
+ /**
|
|
|
|
30
|
+ * @name :(设置收信账号)setting_receiving_save
|
|
|
|
31
|
+ * @author :lyh
|
|
|
|
32
|
+ * @method :post
|
|
|
|
33
|
+ * @time :2023/5/8 16:26
|
|
|
|
34
|
+ */
|
|
|
|
35
|
+ public function setting_receiving_save(){
|
|
|
|
36
|
+ try {
|
|
|
|
37
|
+ $this->model->del(['project_id'=>$this->user['project_id']]);
|
|
|
|
38
|
+ foreach ($this->param['data'] as $k => $v){
|
|
|
|
39
|
+ $v['project_id'] = $this->user['project_id'];
|
|
|
|
40
|
+ $this->param['data'][$k] = $v;
|
|
|
|
41
|
+ }
|
|
|
|
42
|
+ $this->model->add($this->param['data']);
|
|
|
|
43
|
+ }catch (\Exception $e){
|
|
|
|
44
|
+ $this->fail('error');
|
|
|
|
45
|
+ }
|
|
|
|
46
|
+ return $this->success();
|
|
|
|
47
|
+ }
|
|
|
|
48
|
+} |