You've already forked qlg.tsgz.moe
日了狗忘记乘以数量
This commit is contained in:
@ -64,7 +64,7 @@ class Settlements extends Base
|
||||
$sellerPreProductNum = round($discountMoney * (dataConf('sellerPreProductInProductScale')*0.01),2);//1
|
||||
$sellerPreCoupousNum = round($discountMoney * (dataConf('sellerPreCoupousInSaleScale')*0.01),2);//2
|
||||
$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');
|
||||
->where(['o.orderId'=>$orderId])->sum('g.goodsPrice*g.goodsNum*g.discountRate*0.01');
|
||||
if($sellerPreProductNum >= 0.01 || $sellerPreCoupousNum>=0.01){
|
||||
if(3 != $order->goodsType){
|
||||
// step 3 平台送商户:10000×0.4=4000“预获产品券”
|
||||
@ -82,7 +82,7 @@ class Settlements extends Base
|
||||
if($uUserId == null || $uUserId == 0){$uUserId = 1;}
|
||||
$data = Db::query('SELECT count(`goodsMoney`) as `total` FROM `hyh_orders` WHERE DATE_FORMAT(`createTime`,"%Y%m%d")=DATE_FORMAT(DATE_SUB(now(),INTERVAL 1 day),"%Y%m%d") and `userId`="'.$uUserId.'"');
|
||||
// 因为count一定会有数据所以不判断了
|
||||
if($data[0]["total"]<=dataConf("refPreProductYdGTMoney")){
|
||||
if((float)$data[0]["total"]<=(float)dataConf("refPreProductYdGTMoney")){
|
||||
Model('common/UserVouchers')->insertVouchersNotice($uUserId, $orderId,$calBaseNum*((float)dataConf('helpSaleCouponsCalBase')/100)*((float)dataConf("refPreProductNoInSaleScale")/100),
|
||||
0,'交易订单【'.$order['orderNo'].'】推荐商户所得',1);
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user