Merge branch 'dev' of https://gitea.lihaink.cn/mkm/shop-php into dev
This commit is contained in:
commit
e90af16576
@ -489,16 +489,19 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
if ($source == 103) {
|
if ($source == 103) {
|
||||||
$ConsumptionWhere = [
|
$ConsumptionWhere = [
|
||||||
'uid' => $uid,
|
'uid' => $uid,
|
||||||
'start_time' => date('Y-m-d H:i:s'),
|
|
||||||
'status' => 0,
|
'status' => 0,
|
||||||
'is_fail' => 0
|
'is_fail' => 0
|
||||||
];
|
];
|
||||||
|
|
||||||
$platformConsumption = Db::name('store_consumption_user')->where($ConsumptionWhere)->limit(100)->order('create_time', 'desc')
|
$platformConsumption = Db::name('store_consumption_user')->where($ConsumptionWhere)->limit(100)->order('create_time', 'desc')
|
||||||
->field('uid,coupon_title,coupon_price')
|
->field('uid,coupon_title,coupon_price,start_time,end_time')
|
||||||
->select();
|
->select()->each(function($item){
|
||||||
if(count($platformConsumption)>1){
|
$item['describe']='仅限平台指定商家商品可使用';
|
||||||
$consumption=$platformConsumption[0];
|
return $item;
|
||||||
}
|
});
|
||||||
|
// if(count($platformConsumption)>1){
|
||||||
|
// $consumption=$platformConsumption[0];
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -558,9 +561,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
$pay_price = $org_price;
|
$pay_price = $org_price;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($consumption){
|
// if($consumption){
|
||||||
$pay_price = bcsub($pay_price, $consumption['coupon_price'], 2);
|
// $pay_price = bcsub($pay_price, $consumption['coupon_price'], 2);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$giveIntegralFlag = $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_order_rate'] > 0;
|
$giveIntegralFlag = $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_order_rate'] > 0;
|
||||||
$total_give_integral = 0;
|
$total_give_integral = 0;
|
||||||
@ -628,7 +631,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
'address',
|
'address',
|
||||||
'openIntegral',
|
'openIntegral',
|
||||||
'useIntegral',
|
'useIntegral',
|
||||||
'key'
|
'key',
|
||||||
|
'platformConsumption'
|
||||||
) + ['allow_address' => !$allow_no_address, 'order_delivery_status' => $orderDeliveryStatus];
|
) + ['allow_address' => !$allow_no_address, 'order_delivery_status' => $orderDeliveryStatus];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
|
|
||||||
//计算镇级供应链云仓实际获得金额
|
//计算镇级供应链云仓实际获得金额
|
||||||
if ($_order_rate > 0) {
|
if ($_order_rate > 0) {
|
||||||
$commission_rate = bcdiv(3, 100, 2);
|
$commission_rate = bcdiv(12, 100, 2);
|
||||||
$_payPrice = bcmul($_order_rate, $commission_rate, 2);
|
$_payPrice = bcmul($_order_rate, $commission_rate, 2);
|
||||||
} else {
|
} else {
|
||||||
$_payPrice = 0;
|
$_payPrice = 0;
|
||||||
@ -409,6 +409,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
|
|
||||||
if (!$presell) {
|
if (!$presell) {
|
||||||
if ($order['commission_rate'] > 0 || $order->source == 103) {
|
if ($order['commission_rate'] > 0 || $order->source == 103) {
|
||||||
|
//支出手续费
|
||||||
$finance[] = [
|
$finance[] = [
|
||||||
'order_id' => $order->order_id,
|
'order_id' => $order->order_id,
|
||||||
'order_sn' => $order->order_sn,
|
'order_sn' => $order->order_sn,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user