diff --git a/api/controllers/plan/Score.php b/api/controllers/plan/Score.php index 6be6eeb9..0d189359 100644 --- a/api/controllers/plan/Score.php +++ b/api/controllers/plan/Score.php @@ -40,7 +40,8 @@ class Score extends HD_Controller $groups_string = implode(',', [App_licheb_users_model::GROUP_BIZ, App_licheb_users_model::GROUP_MANAGER]); $where = [ "group_id in ({$groups_string})" => null, - 'status' => 1 + 'status' => 1, + 'biz_id in (SELECT id from lc_biz where status = 1 and type in (1,2))' => null ]; $biz_id && $where['biz_id'] = $biz_id; $uid && $where['id'] = $uid; diff --git a/api/controllers/wxapp/licheb/Customers.php b/api/controllers/wxapp/licheb/Customers.php index dfbe0ca9..16baa171 100644 --- a/api/controllers/wxapp/licheb/Customers.php +++ b/api/controllers/wxapp/licheb/Customers.php @@ -138,7 +138,7 @@ class Customers extends Wxapp 'brand' => ['id' => $row['brand_id'], 'name' => $brand['name']], 'series_id' => $row['series_id'], 'cf_pid' => $row['cf_pid'], - 'cf_name' => $paic_user['name'] ?: '', + 'cf_name' => $paic_user['name'] ? $paic_user['name'] : '', ]; return $data; } diff --git a/api/controllers/wxapp/licheb/OpenApi.php b/api/controllers/wxapp/licheb/OpenApi.php index 47a886bc..c26547a2 100644 --- a/api/controllers/wxapp/licheb/OpenApi.php +++ b/api/controllers/wxapp/licheb/OpenApi.php @@ -151,7 +151,7 @@ class OpenApi extends Wxapp 'status' => $status, 'status2' => $status2, 'status_cn' => $status_map[$status]['title'], - 'status2_cn' => $status_map[$status]['list'][$status2] ?: '' + 'status2_cn' => $status_map[$status]['list'][$status2] ? $status_map[$status]['list'][$status2] : '' ]; } } @@ -165,17 +165,17 @@ class OpenApi extends Wxapp throw new Exception('参数错误', API_CODE_FAIL); } $row = $this->biz_model->get(['id' => $biz_id]); - $address = $row['address'] ?: ''; + $address = $row['address'] ? $row['address'] : ''; if ($row['county_id']) { $areas = $this->area_model->get(['county_id' => $row['county_id']]); $address = $areas['province_name'] . $areas['city_name'] . $areas['county_name'] . $address; } $data = [ - 'id' => $row['id'] ?: '', - 'biz_name' => $row['biz_name'] ?: '', + 'id' => $row['id'] ? $row['id'] : '', + 'biz_name' => $row['biz_name'] ? $row['biz_name'] : '', 'address' => $address, - 'lat' => $row['lat'] ?: '', - 'lng' => $row['lng'] ?: '', + 'lat' => $row['lat'] ? $row['lat'] : '', + 'lng' => $row['lng'] ? $row['lng'] : '', ]; return $data; }