优化空值修改5

master
chenzhi 5 years ago
parent 4ebe2780cc
commit 42a9b318fb

@ -252,6 +252,9 @@ class PromoteCompanyController extends ThinkController
if(isset($save['resources'])){
$save['resources'] = json_encode($save['resources'],JSON_UNESCAPED_UNICODE);
}
if(empty($save['contact_phone'])){
$save['contact_phone'] = 0;
}
$res = $model->add($save);
if ($res) {
@ -327,7 +330,7 @@ class PromoteCompanyController extends ThinkController
$is_change_belong = true;
}
if(empty($save['contact_phone'])){
$save['contact_phone'] = NULL;
$save['contact_phone'] = 0;
}
$res = $model->save($save);
if ($res) {

Loading…
Cancel
Save