diff --git a/backstage/application/api/controllers/api/Recharge.php b/backstage/application/api/controllers/api/Recharge.php index 4dc4690..3bf7b88 100644 --- a/backstage/application/api/controllers/api/Recharge.php +++ b/backstage/application/api/controllers/api/Recharge.php @@ -352,12 +352,22 @@ class Recharge extends REST_Controller $zy_type_id = intval($a[1]); // 代码写死,东莞电信 company_id = 15 必须 supplier_id = 28,否则不符合余额转移 - if($this->user->company_id == 15 && $zy_supplier_id != 28){ - $this->response(array( - 'status' => 0, - 'message' => '当前只能转移公诚物业的积分账户', - 'data' => array() - ), REST_Controller::HTTP_OK); + if($this->user->company_id == 15){ + if($zy_supplier_id != 28){ + $this->response(array( + 'status' => 0, + 'message' => '当前只能转移公诚物业的积分账户', + 'data' => array() + ), REST_Controller::HTTP_OK); + } + if(!in_array($this->user->type_id, [200,201,202,204,206,208,218,224,225,234,239,272])){ + $this->response(array( + 'status' => 0, + 'message' => '您的用户类型不支持余额转移功能', + 'data' => array() + ), REST_Controller::HTTP_OK); + } + } $row = $this->Common_model->sql_get_one("select * from tb_account where supplier_id = {$zy_supplier_id} and type_id={$zy_type_id} and user_id = ".$this->user->id);