Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
bf958fcf75
@ -30,7 +30,7 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['order_id', 'pay_type', 'staff_id', 'shipping_type', 'delivery_id','paid', 'status', 'is_writeoff'],
|
||||
'=' => ['order_id','store_id', 'pay_type', 'staff_id', 'shipping_type', 'delivery_id','paid', 'status', 'is_writeoff'],
|
||||
'between_time' => 'create_time'
|
||||
];
|
||||
}
|
||||
@ -47,7 +47,7 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return StoreOrder::with(['staff'])->where($this->searchWhere)
|
||||
return StoreOrder::with(['staff','store'])->where($this->searchWhere)
|
||||
->when(!empty($this->request->adminInfo['store_id']), function ($query) {
|
||||
$query->where('store_id', $this->request->adminInfo['store_id']);
|
||||
})
|
||||
|
@ -416,7 +416,7 @@ class OrderLogic extends BaseLogic
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
StoreOrder::update([
|
||||
StoreOrder::update([
|
||||
'verify_code'=>$params['verify_code'].'-1',
|
||||
'status' => OrderEnum::RECEIVED_GOODS,
|
||||
'is_writeoff' => OrderEnum::IS_OK,
|
||||
@ -454,7 +454,7 @@ class OrderLogic extends BaseLogic
|
||||
if ($order['spread_uid'] > 0) {
|
||||
$spread_find=$financeFlow->where(['order_id'=>$order['id'],'financial_pm'=>1,'financial_type'=>12,'other_uid'=>$order['spread_uid']])->find();
|
||||
if($spread_find){
|
||||
$financeFlowLogic->updateStatusUser($spread_find['id'],$order['spread_uid'],$spread_find['number'],$order['order_id']);
|
||||
$financeFlowLogic->updateStatusUser($spread_find['id'],$order['spread_uid'],$spread_find['number'],$order['id']);
|
||||
}
|
||||
}
|
||||
$deposit=$financeFlow->where(['order_id'=>$order['id'],'financial_pm'=>1,'financial_type'=>11])->value('number')??0;
|
||||
|
@ -94,9 +94,15 @@ class PayNotifyLogic extends BaseLogic
|
||||
$capitalFlowDao = new CapitalFlowLogic($user);
|
||||
$capitalFlowDao->userExpense('user_order_balance_pay', 'order', $order['id'], $order['pay_price'], '', 0, $order['store_id']);
|
||||
self::dealProductLog($order);
|
||||
// if ($order['shipping_type'] == 3) {
|
||||
// self::descStock($order['id']);
|
||||
// }
|
||||
if ($order['shipping_type'] == 3) {
|
||||
//预留收银台余额支付得兑换券逻辑
|
||||
if ($order->uid >0) {
|
||||
$total_vip = bcmul($order['pay_price'], 0.1, 2);
|
||||
self::addNewUserSing($order,8,$total_vip,1,1);
|
||||
User::where('id', $order->uid)->inc('integral', $total_vip)->update();
|
||||
}
|
||||
// self::descStock($order['id']);
|
||||
}
|
||||
self::afterPay($order);
|
||||
if ($extra && $extra['store_id']) {
|
||||
$params = [
|
||||
@ -404,6 +410,13 @@ class PayNotifyLogic extends BaseLogic
|
||||
self::dealProductLog($order);
|
||||
if ($order['shipping_type'] == 3) {
|
||||
self::descStock($order['id']);
|
||||
//直接加对应兑换券
|
||||
if ($order->uid >0) {
|
||||
$total_vip = bcmul($order['pay_price'], 0.1, 2);
|
||||
self::addNewUserSing($order,8,$total_vip,1,1);
|
||||
User::where('id', $order->uid)->inc('integral', $total_vip)->update();
|
||||
}
|
||||
|
||||
}
|
||||
if (!empty($extra['payer']['openid']) && $order->pay_type == 7) {
|
||||
Redis::send('push-delivery', ['order_id' => $order['order_id'], 'openid' => $extra['payer']['openid']], 4);
|
||||
@ -754,11 +767,12 @@ class PayNotifyLogic extends BaseLogic
|
||||
$cashFlowLogic = new CashFlowLogic();
|
||||
$cashFlowLogic->insert($order['store_id'], $order['pay_price']);
|
||||
self::dealProductLog($order);
|
||||
|
||||
if ($order['shipping_type'] == 3) {
|
||||
self::descStock($order['id']);
|
||||
//直接加到礼品券中
|
||||
$user_sing = new UserSign();
|
||||
$total_vip = bcmul($order['price'], 0.1, 2);
|
||||
$total_vip = bcmul($order['pay_price'], 0.1, 2);
|
||||
$sing[] = [
|
||||
'uid' => $order['uid'],
|
||||
'order_id' => $order['order_id'],
|
||||
@ -810,6 +824,13 @@ class PayNotifyLogic extends BaseLogic
|
||||
self::dealProductLog($order);
|
||||
if ($order['shipping_type'] == 3) {
|
||||
self::descStock($order['id']);
|
||||
//直接加兑换券到对应得账户
|
||||
if ($order->uid >0) {
|
||||
$total_vip = bcmul($order['pay_price'], 0.1, 2);
|
||||
self::addNewUserSing($order,8,$total_vip,1,1);
|
||||
User::where('id', $order->uid)->inc('integral', $total_vip)->update();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// if ($order->pay_type == 9) {
|
||||
@ -847,7 +868,7 @@ class PayNotifyLogic extends BaseLogic
|
||||
$user_ship = User::where('id', $order['uid'])->value('user_ship'); //会员不加兑换券
|
||||
if (
|
||||
$order['uid'] > 0 && $order['total_price'] >= 500
|
||||
&& $order['pay_type'] != PayEnum::PURCHASE_FUNDS && $user_ship != 1
|
||||
&& $order['pay_type'] != PayEnum::PURCHASE_FUNDS && $user_ship != 1 && $order['shipping_type'] !=3
|
||||
) {
|
||||
$user_number = bcmul($order['pay_price'], '0.10', 2);
|
||||
$sing = [
|
||||
@ -870,7 +891,8 @@ class PayNotifyLogic extends BaseLogic
|
||||
//用户下单该用户等级为1得时候才处理冻结金额
|
||||
$user = User::where('id', $order['uid'])->find();
|
||||
$user_ship = $user['user_ship'];
|
||||
if($order['total_price'] >= 500 && $order['pay_type'] !=PayEnum::PURCHASE_FUNDS && $user_ship !=1){
|
||||
if($order['total_price'] >= 500 && $order['pay_type'] !=PayEnum::PURCHASE_FUNDS && $user_ship !=1
|
||||
&& $order['shipping_type'] !=3){
|
||||
$user_number = bcmul($order['pay_price'], '0.10', 2);
|
||||
$sing = [
|
||||
'uid' => $order['uid'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user