You've already forked qlg.tsgz.moe
终极提交~
This commit is contained in:
@ -42,10 +42,10 @@ class Settlements extends Base
|
||||
|
||||
$buyerPreProductNum = round(($totalMoney + $order->deliverMoney)* (dataConf('buyerPreProductInProductScale')*0.01),2);//1
|
||||
$buyerPreCoupousNum = round($discountMoney * (dataConf('buyerPreCoupousInSaleScale')*0.01),2);//2
|
||||
$buyerPreProductNum += round($order->productHandlingFee * (dataConf('buyerPreProductInHandlingFeeScale')*0.01),2);//3
|
||||
$buyerPreProductNum += round($order->productTaxFee * (dataConf('buyerPreProductInTaxFeeScale')*0.01),2);//4
|
||||
$buyerPreProductNum += round($order->couponsHandlingFee * (dataConf('buyerPreProductInProductHandlingFeeScale')*0.01),2);//5
|
||||
$buyerPreProductNum += round($order->couponsTaxFee * (dataConf('buyerPreProductInProductTaxFeeScale')*0.01),2);//6
|
||||
// $buyerPreProductNum += round($order->productHandlingFee * (dataConf('buyerPreProductInHandlingFeeScale')*0.01),2);//3
|
||||
// $buyerPreProductNum += round($order->productTaxFee * (dataConf('buyerPreProductInTaxFeeScale')*0.01),2);//4
|
||||
// $buyerPreProductNum += round($order->couponsHandlingFee * (dataConf('buyerPreProductInProductHandlingFeeScale')*0.01),2);//5
|
||||
// $buyerPreProductNum += round($order->couponsTaxFee * (dataConf('buyerPreProductInProductTaxFeeScale')*0.01),2);//6
|
||||
if($buyerPreProductNum >= 0.01 || $buyerPreCoupousNum>=0.01){
|
||||
Model('common/UserVouchers')->insertVouchersNotice($order->userId,$orderId,$buyerPreProductNum,$buyerPreCoupousNum,'交易订单【'.$order->orderNo.'】购户购物所得');
|
||||
}
|
||||
@ -60,7 +60,17 @@ class Settlements extends Base
|
||||
$sellerPreProductNum = round($discountMoney * (dataConf('sellerPreProductInProductScale')*0.01),2);//1
|
||||
$sellerPreCoupousNum = round($discountMoney * (dataConf('sellerPreCoupousInSaleScale')*0.01),2);//2
|
||||
if($sellerPreProductNum >= 0.01 || $sellerPreCoupousNum>=0.01){
|
||||
Model('common/UserVouchers')->insertVouchersNotice($shops['userId'],$orderId,$sellerPreProductNum,$sellerPreCoupousNum,'交易订单【'.$order->orderNo.'】商户售物所得');
|
||||
if(3 != $order->goodsType){
|
||||
// step 3 平台送商户:10000×0.4=4000“预获产品券”
|
||||
// 10000×0.4=4000“预获优惠券”
|
||||
$calBaseNum = Db::table("__ORDERS__ o")->join("__ORDER_GOODS__ g", "g.orderId=o.orderId", 'inner')
|
||||
->where(['o.orderId'=>$orderId])
|
||||
->sum('g.goodsPrice*g.discountRate*0.01');
|
||||
Model('common/UserVouchers')->insertVouchersNotice($order['userId'], $orderId, $calBaseNum, $calBaseNum,
|
||||
'交易订单【'.$order->orderNo.'】商户售物所得',1);
|
||||
}else{
|
||||
Model('common/UserVouchers')->insertVouchersNotice($shops['userId'],$orderId,$sellerPreProductNum,$sellerPreCoupousNum,'交易订单【'.$order->orderNo.'】商户售物所得');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -138,9 +148,8 @@ class Settlements extends Base
|
||||
// 2,推荐人获得预获产品券时限上日有消费<10元为优惠款的25% refPreProductNoInSaleScale
|
||||
$m->setTable('user_trees');
|
||||
$pid = $m->getField(['uid'=>$shops['userId']],'pid');
|
||||
if($pid && $pInfo = getUserInfo(['userId'=>$pid,'dataFlag'=>1,'userStatus'=>1],'userId')){//有推荐人并且推荐人状态正常
|
||||
if($pid && $pInfo = getUserInfo(['userId'=>$pid,'dataFlag'=>1,'userStatus'=>1],'userId') && 3 != $order->goodsType){//有推荐人并且推荐人状态正常
|
||||
$yesterdayBuyMoney = Model('common/Orders')->getYesterdayBuyMoney($pid,'realTotalMoney');
|
||||
$refProductMoney = 0;
|
||||
if($yesterdayBuyMoney >= dataConf('refPreProductYdGTMoney')){//大于设定值
|
||||
$refProductMoney = round($discountMoney * (dataConf('refPreProductYesInSaleScale')*0.01),2);//1
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user