feat : wechatPay callback
This commit is contained in:
@@ -105,7 +105,7 @@ class OrderGoodStockConsumer extends ConsumerMessage
|
||||
match ($data['type']) {
|
||||
OrderCode::WAIT_PAY => $this->waitPaySubStock(),
|
||||
OrderCode::CANCEL => $this->cancelAddStock(),
|
||||
OrderCode::FINISH_REFUND,OrderCode::UNCOMPLETED_REFUND => $this->RefundUpdateData($data),
|
||||
// OrderCode::FINISH_REFUND,OrderCode::UNCOMPLETED_REFUND => $this->RefundUpdateData($data),//todo 退款后 库存不回收 因为存在退款一部分 无法核查
|
||||
default => throw new Exception('OrderGoodStockConsumer:error:无效的订单类型')
|
||||
};
|
||||
|
||||
|
||||
@@ -74,13 +74,13 @@ class CouponDispenseUser extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $userIds
|
||||
* @param int $userId
|
||||
* @return array
|
||||
*/
|
||||
public function getNoReceiveCountByUserIds(array $userIds): array
|
||||
public function getNoReceiveCountByUserId(int $userId): array
|
||||
{
|
||||
return $this
|
||||
->whereIn('user_id', $userIds)
|
||||
->where('user_id', $userId)
|
||||
->where('receive_count',CouponCode::DISPENSE_STATUS_IS_NO_RECEIVED)
|
||||
->pluck('coupon_dispense_id')
|
||||
->toArray();
|
||||
|
||||
@@ -67,6 +67,11 @@ class RefundOrder extends Model
|
||||
])->sum('refund_money') ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $orderId
|
||||
* @param int $type
|
||||
* @return float|int|string
|
||||
*/
|
||||
public function getSuccessMoneyByOrderId(int $orderId, int $type): float|int|string
|
||||
{
|
||||
return $this
|
||||
|
||||
@@ -42,7 +42,7 @@ class HomePopupsService extends BaseService
|
||||
|
||||
public function handle(): array
|
||||
{
|
||||
$dispenseIds = $this->couponDispenseUserModel->getNoReceiveCountByUserIds($this->userId);
|
||||
$dispenseIds = $this->couponDispenseUserModel->getNoReceiveCountByUserId($this->userId);
|
||||
|
||||
$data = $this->couponDispenseLogModel->getNoReceiveCount();
|
||||
if (empty($dispenseIds) && empty($data['all']) && empty($data['appoint'])) return $this->returnNullRes();
|
||||
|
||||
Reference in New Issue
Block a user