From 878badef43db1da9f1c5ac3ddb0f3bc7bda2a109 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 3 Jan 2020 17:21:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E7=BB=91=E6=96=B0=E5=A2=9E=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=B8=A0=E9=81=93=E6=98=AF=E5=90=A6=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E7=BB=93=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MendController.class.php | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php index 0397a1dd4..1e16b048c 100644 --- a/Application/Admin/Controller/MendController.class.php +++ b/Application/Admin/Controller/MendController.class.php @@ -120,7 +120,10 @@ class MendController extends ThinkController { $this->error('没有订单日期'); } //判断是否已经结算 - if(self::checkSettlement(strtotime($_POST['order_time']),$_POST['promote_id'])){ + // if(self::checkSettlement(strtotime($_POST['order_time']),$_POST['promote_id'])){ + // $this->error('在订单日期内含有已经结算的订单,无法补链'); + // } + if(self::checkSpend(strtotime($_POST['order_time']),$_POST['account'])){ $this->error('在订单日期内含有已经结算的订单,无法补链'); } if(self::checkPromote(strtotime($_POST['order_time']),$_POST['account'])){ @@ -162,6 +165,25 @@ class MendController extends ThinkController { $this->display(); } } + /** + * 2020.1.3 之后判断订单是否已经结算 + */ + private function checkSpend($order_time,$account){ + $map = array( + "pay_status"=>1, + "user_account"=>$account, + "pay_time"=>array("EGT",$order_time), + "selle_status"=>1, + "settle_check"=>1 + ); + $flag = M("Spend","tab_")->where($map)->count(); + if($flag > 0) return true; + return false; + } + + /** + * 2020.1.3 之前判断订单是否已经结算 + */ private function checkSettlement($order_time,$prmote_id) { //判断是否已经结算,后台只会对会长进行结算