edit-admin-srv_config

This commit is contained in:
lccsw
2022-08-17 13:47:19 +08:00
parent 481c1ce40b
commit bc8a337574
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -136,6 +136,9 @@ class Srv extends HD_Controller{
'type' => $info['type'],
'is_def' => 1
];
if($info['type']==2){
$where["json_extract(jsondata, '$.type') = '{$info['jsondata']['type']}'"] = null;
}
$this->biz_settle_srv_model->update(['is_def'=>0],$where);
}
$data['jsondata'] = json_encode($jsondata,JSON_UNESCAPED_UNICODE);
@@ -181,8 +184,11 @@ class Srv extends HD_Controller{
'biz_id' => $info['biz_id'],
'title' => $info['title'],
'type' => $info['type'],
'is_def' => 1
'is_def' => 1,
];
if($info['type']==2){
$where["json_extract(jsondata, '$.type') = '{$info['jsondata']['type']}'"] = null;
}
$this->biz_settle_srv_model->update(['is_def'=>0],$where);
}
$data['jsondata'] = json_encode($jsondata,JSON_UNESCAPED_UNICODE);
+2
View File
@@ -282,6 +282,7 @@ class Biz extends HD_Controller
'title' => $insurance_img['product'],
'type' => 2,
'is_def' => 1,
"json_extract(jsondata, '$.type') = '1'" => null,
];
$fd_row = $this->biz_settle_srv_model->get($where);
}
@@ -307,6 +308,7 @@ class Biz extends HD_Controller
'title' => $business_img['product'],
'type' => 2,
'is_def' => 1,
"json_extract(jsondata, '$.type') = '2'" => null,
];
$bis_fd_row = $this->biz_settle_srv_model->get($where);
}