diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 5876e8a8f..0c671df28 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -98,6 +98,7 @@ class PayNotifyLogic extends BaseLogic // self::descStock($order['id']); // } self::afterPay($order); + UserProductStorageLogic::add($order); if ($extra && $extra['store_id']) { $params = [ 'verify_code' => $order['verify_code'], @@ -197,6 +198,7 @@ class PayNotifyLogic extends BaseLogic // } // self::addUserSing($order); self::afterPay($order); + UserProductStorageLogic::add($order); if ($extra && $extra['store_id']) { $params = [ 'verify_code' => $order['verify_code'], @@ -399,6 +401,7 @@ class PayNotifyLogic extends BaseLogic } $order->save(); self::afterPay($order, $extra['transaction_id']); + UserProductStorageLogic::add($order); // self::addUserSing($order); self::dealProductLog($order); if ($order['shipping_type'] == 3) { @@ -694,6 +697,7 @@ class PayNotifyLogic extends BaseLogic throw new \Exception('订单保存出错'); } self::afterPay($order); + UserProductStorageLogic::add($order); $cashFlowLogic = new CashFlowLogic(); $cashFlowLogic->insert($order['store_id'], $order['pay_price']); self::dealProductLog($order); @@ -730,6 +734,7 @@ class PayNotifyLogic extends BaseLogic if ($order->pay_type == 9) { $order->status = 2; self::afterPay($order); + UserProductStorageLogic::add($order); } self::dealProductLog($order); if ($order['shipping_type'] == 3) { @@ -898,45 +903,6 @@ class PayNotifyLogic extends BaseLogic } } if ($fees > 0) { - //村长获得 - // $sing = []; - - // $sing[] = [ - // 'uid' => $village_uid, - // 'order_id' => $order['order_id'], - // 'title' => '村长订单获得兑换券', - // 'store_id' => $order['store_id'], - // 'number' => $fees, - // 'financial_pm' => 1, - // 'user_ship' => 2, - // ]; - // $sing[] = [ - // 'uid' => $brigade_uid, - // 'order_id' => $order['order_id'], - // 'title' => '队长订单获得兑换券', - // 'store_id' => $order['store_id'], - // 'number' => $fees, - // 'financial_pm' => 1, - // 'user_ship' => 3, - // ]; - // $sing[] = [ - // 'uid' => $village_uid, - // 'order_id' => $order['order_id'], - // 'title' => '订单扣除兑换券', - // 'store_id' => $order['store_id'], - // 'number' => $fees, - // 'financial_pm' => 0, - // 'user_ship' => 2, - // ]; - // $sing[] = [ - // 'uid' => $brigade_uid, - // 'order_id' => $order['order_id'], - // 'title' => '订单扣除兑换券', - // 'store_id' => $order['store_id'], - // 'number' => $fees, - // 'financial_pm' => 0, - // 'user_ship' => 3, - // ]; if ($village_uid > 0) { // SystemStore::where('id', $village_uid)->inc('store_money', $fees)->update(); $financeLogic->other_arr['vip_uid'] = $village_uid; diff --git a/app/common/logic/user_product_storage/UserProductStorageLogic.php b/app/common/logic/user_product_storage/UserProductStorageLogic.php index 5fc6199b9..a0e8d99db 100644 --- a/app/common/logic/user_product_storage/UserProductStorageLogic.php +++ b/app/common/logic/user_product_storage/UserProductStorageLogic.php @@ -7,6 +7,9 @@ use app\common\model\store_order_cart_info\StoreOrderCartInfo; use app\common\model\user_product_storage\UserProductStorage; use app\common\model\user_product_storage_log\UserProductStorageLog; +/** + * 用户商品储存逻辑 + */ class UserProductStorageLogic extends BaseLogic { public static function add($order){