From afb2f2fcb02d219d08b94f26c994a49c1b05c0f7 Mon Sep 17 00:00:00 2001 From: vguanyiwgd Date: Fri, 10 May 2024 09:25:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9C=E8=8E=9E=E7=94=B5=E4=BF=A1=20?= =?UTF-8?q?=E4=BD=99=E9=A2=9D=E8=BD=AC=E7=A7=BB=20=E9=99=90=E5=AE=9A?= =?UTF-8?q?=E8=B4=A6=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5d8de3678f638d955adfe27022fda2058f42ba7b --- .../api/controllers/api/Recharge.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/backstage/application/api/controllers/api/Recharge.php b/backstage/application/api/controllers/api/Recharge.php index 7125c41..0a3c993 100644 --- a/backstage/application/api/controllers/api/Recharge.php +++ b/backstage/application/api/controllers/api/Recharge.php @@ -351,6 +351,15 @@ class Recharge extends REST_Controller $zy_supplier_id = intval($a[0]); $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); + } + $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); if(!$row) { $this->response(array( @@ -615,7 +624,6 @@ class Recharge extends REST_Controller } } public function yezypage_get() { - $spList = $this->Common_model->sql_get_all("select * from tb_supplier"); $spInfo = array(); foreach($spList as $item) { @@ -627,6 +635,14 @@ class Recharge extends REST_Controller $zy_list = array(); foreach($list as $item) { + if($this->user->company_id == 15){ + if ($item['supplier_id'] == 28){ + $acList[$item['supplier_id']."_".$item['type_id']]['supplier_name'] = $spInfo[$item['supplier_id']]; + $acList[$item['supplier_id']."_".$item['type_id']]['amount'] += $item['account']; + $total += $item['account']; + } + continue; + } $acList[$item['supplier_id']."_".$item['type_id']]['supplier_name'] = $spInfo[$item['supplier_id']]; $acList[$item['supplier_id']."_".$item['type_id']]['amount'] += $item['account']; $total += $item['account'];