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