diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index d3a68089..5bdbe8cc 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -22,7 +22,7 @@ use Webman\RedisQueue\Redis; class IndexController extends BaseApiController { - public $notNeedLogin = ['index', 'app_update', 'express_list', 'province', 'city', 'area', 'street','village','brigade']; + public $notNeedLogin = ['index', 'app_update', 'express_list', 'province', 'city', 'area', 'street','village','brigade','config']; public function index() { @@ -180,5 +180,17 @@ class IndexController extends BaseApiController { $list = Db::name('geo_brigade')->select()?->toArray(); return $this->success('ok', $list); + } + + /** + * @notes 获取队列表 + */ + public function config() + { + $list=[ + 'store_id'=>5, + 'store_name'=>'测试', + ]; + return $this->success('ok', $list); } } diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index f73cbd93..cd156ec9 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -330,11 +330,13 @@ class PayNotifyLogic extends BaseLogic $financeLogic->out($transaction_id, $deposit, OrderEnum::ORDER_MARGIN, $order['store_id'], $order['staff_id'], 0, $order['pay_type']); } if ($money) { + SystemStore::where('id', $order['store_id'])->inc('store_money', $money)->update(); $financeLogic->in($transaction_id, $money, OrderEnum::MERCHANT_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']); //平台手续费 } } } else { if ($store_profit > 0) { + SystemStore::where('id', $order['store_id'])->inc('store_money', $store_profit)->update(); $financeLogic->in($transaction_id, $store_profit, OrderEnum::MERCHANT_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']); //平台手续费 } } @@ -344,6 +346,7 @@ class PayNotifyLogic extends BaseLogic $fees = bcdiv(bcmul($order['pay_price'], '0.08', 2), 1, 2); $count_frees = bcadd($count_frees, $fees, 2); if ($fees > 0) { + User::where('id', $order['spread_uid'])->inc('now_money', $fees)->update(); $financeLogic->in($transaction_id, $fees, OrderEnum::VIP_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']); //vip订单获得 $financeLogic->out($transaction_id, $fees, OrderEnum::VIP_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']); }