You've already forked qlg.tsgz.moe
日了狗忘记乘以数量
This commit is contained in:
@ -1498,8 +1498,7 @@ class Orders extends Base{
|
||||
elseif (3 == $order['goodsType']){//助购吧购物
|
||||
// 计算 SUM(商品*优惠率) 的值
|
||||
$calBaseNum = Db::table("__ORDERS__ o")->join("__ORDER_GOODS__ g", "g.orderId=o.orderId", 'inner')
|
||||
->where(['o.userId'=>$userId,'o.orderId'=>$orderId])
|
||||
->sum('g.goodsPrice*g.discountRate*0.01');
|
||||
->where(['o.orderId'=>$orderId])->sum('g.goodsPrice*g.goodsNum*g.discountRate*0.01');
|
||||
// foreach ($orderGoods as $orderGood) {
|
||||
// // 在不考虑数据库变更的情况下,这两个值都是存储的数字类型,所以不做特殊处理
|
||||
// $calBaseNum += (float)$orderGood['goodsPrice'] * (float)$orderGood['discountRate'] / 100;
|
||||
|
Reference in New Issue
Block a user