|
|
|
@ -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)
|
|
|
|
|
{
|
|
|
|
|
//判断是否已经结算,后台只会对会长进行结算
|
|
|
|
|