feat: 修改了订单API,添加了支付通知逻辑
This commit is contained in:
parent
00a72c0b71
commit
1eb395bbe0
@ -56,7 +56,7 @@ class StoreController extends BaseApiController
|
||||
'uid'=>$find['uid'],
|
||||
'staff_id'=>0,
|
||||
'order_id'=>getNewOrderId('CZ'),
|
||||
'price'=>$params['price'],
|
||||
'price'=>1000,
|
||||
];
|
||||
$order = UserRecharge::create($data);
|
||||
|
||||
|
@ -8,6 +8,7 @@ use app\common\enum\UserShipEnum;
|
||||
use app\common\enum\YesNoEnum;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\logic\CapitalFlowLogic;
|
||||
use app\common\logic\PayNotifyLogic;
|
||||
use app\common\logic\StoreFinanceFlowLogic;
|
||||
use app\common\model\dict\DictData;
|
||||
use app\common\model\dict\DictType;
|
||||
@ -399,11 +400,13 @@ class OrderLogic extends BaseLogic
|
||||
'staff_id' => $params['staff_id']??0,
|
||||
'update_time' => time(),
|
||||
], ['oid' => $data['id']]);
|
||||
$financeFlow = (new StoreFinanceFlowLogic)->getStoreOrder($data['id'], $data['store_id']);
|
||||
if (!empty($financeFlow)) {
|
||||
$capitalFlowLogic = new CapitalFlowLogic($data->store, 'store');
|
||||
$capitalFlowLogic->storeIncome('store_order_income', 'order', $data['id'], $financeFlow['number']);
|
||||
}
|
||||
// $financeFlow = (new StoreFinanceFlowLogic)->getStoreOrder($data['id'], $data['store_id']);
|
||||
// if (!empty($financeFlow)) {
|
||||
// $capitalFlowLogic = new CapitalFlowLogic($data->store, 'store');
|
||||
// $capitalFlowLogic->storeIncome('store_order_income', 'order', $data['id'], $financeFlow['number']);
|
||||
// }
|
||||
$order=StoreOrder::where('id',$data['id'])->find();
|
||||
PayNotifyLogic::afterPay($order);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user