feat: 添加 config 接口和更新支付通知逻辑
This commit is contained in:
parent
f050252966
commit
6b2be63031
@ -22,7 +22,7 @@ use Webman\RedisQueue\Redis;
|
|||||||
|
|
||||||
class IndexController extends BaseApiController
|
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()
|
public function index()
|
||||||
{
|
{
|
||||||
@ -180,5 +180,17 @@ class IndexController extends BaseApiController
|
|||||||
{
|
{
|
||||||
$list = Db::name('geo_brigade')->select()?->toArray();
|
$list = Db::name('geo_brigade')->select()?->toArray();
|
||||||
return $this->success('ok', $list);
|
return $this->success('ok', $list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 获取队列表
|
||||||
|
*/
|
||||||
|
public function config()
|
||||||
|
{
|
||||||
|
$list=[
|
||||||
|
'store_id'=>5,
|
||||||
|
'store_name'=>'测试',
|
||||||
|
];
|
||||||
|
return $this->success('ok', $list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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']);
|
$financeLogic->out($transaction_id, $deposit, OrderEnum::ORDER_MARGIN, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
||||||
}
|
}
|
||||||
if ($money) {
|
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']); //平台手续费
|
$financeLogic->in($transaction_id, $money, OrderEnum::MERCHANT_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']); //平台手续费
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($store_profit > 0) {
|
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']); //平台手续费
|
$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);
|
$fees = bcdiv(bcmul($order['pay_price'], '0.08', 2), 1, 2);
|
||||||
$count_frees = bcadd($count_frees, $fees, 2);
|
$count_frees = bcadd($count_frees, $fees, 2);
|
||||||
if ($fees > 0) {
|
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->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']);
|
$financeLogic->out($transaction_id, $fees, OrderEnum::VIP_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user