From 665b4c8bfa286c88a5db442d779c86ae5735d31b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 28 Feb 2020 14:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E7=BB=93=E7=AE=97=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/QueryController.class.php | 12 +++++++----- Application/Admin/Model/WithdrawModel.class.php | 6 ++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 867e64a2a..51a76134f 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -336,6 +336,7 @@ class QueryController extends ThinkController $promoteId = intval(I('promote_id', 0)); $settlementType = intval(I('settlement_type', 0)); $time = I('time', ''); + if (empty($promoteId)) { $data['status'] = 0; $data['msg'] = '请选择会长账号'; @@ -363,11 +364,11 @@ class QueryController extends ThinkController $data['msg'] = '非会长账号,无法执行此操作'; $this->ajaxReturn($data); } - if ($promote['ver_status'] != 1) { - $data['status'] = 0; - $data['msg'] = '该会长未通过资质认证审核,暂时无法提现'; - $this->ajaxReturn($data); - } +// if ($promote['ver_status'] != 1) { +// $data['status'] = 0; +// $data['msg'] = '该会长未通过资质认证审核,暂时无法提现'; +// $this->ajaxReturn($data); +// } if ($promote['settlement_type'] == 1) { if (!in_array($settlementType, [1, 3])) { $data['status'] = 0; @@ -404,6 +405,7 @@ class QueryController extends ThinkController switch ($settlementType) { case 1: $result = $withdrawModel->promoteWithdrawWeeklyByPromote($promote, false, $data); + break; case 2: $result = $withdrawModel->promoteWithdrawPerMonthByPromote($promote, false, $data); diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index a591165cb..09dff66f8 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -184,6 +184,10 @@ class WithdrawModel extends Model{ ->find()['balance']; $balance = $balance ?? 0; $balance = bcdiv($balance, 100, 2); + +// addOperationLog(['op_type'=>1,'key'=>$promote['account'].$data['begin_time'].$data['end_time'].$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + + if ($balance < 100) { return -2;//余额不足 } @@ -237,6 +241,8 @@ class WithdrawModel extends Model{ return -1; } + addOperationLog(['op_type'=>1,'key'=>$promote['account'].$data['begin_time'].$data['end_time'].$balance,'op_name'=>'推广结算提现','url'=>U('Query/settlement'),'menu'=>'推广员-结算管理-推广结算-推广结算提现']); + M()->commit();//事物提交 return 1; }