调整退款的错误

This commit is contained in:
luofei 2024-03-12 11:38:05 +08:00
parent 5f7648ccdc
commit be1b95d6d6

View File

@ -1332,23 +1332,23 @@ class StoreRefundOrderRepository extends BaseRepository
$orderType = (isset($item['presell']) && $item['presell']) ? 'presell' : 'order'; $orderType = (isset($item['presell']) && $item['presell']) ? 'presell' : 'order';
if ($item['type'] == 0) { if ($item['type'] == 0) {
$this->refundBill($item, $res->uid, $id); $this->refundBill($item, $res->uid, $id);
app()->make(MerchantRepository::class)->subLockMoney($res->mer_id, $orderType, $item['id'], $refundPrice);
} else { } else {
if ($item['type'] == 10) $server = WechatService::create()->combinePay(); if ($item['type'] == 10) $server = WechatService::create()->combinePay();
if (in_array($item['type'], [2])) $server = MiniProgramService::create(); if (in_array($item['type'], [2])) $server = MiniProgramService::create();
if (in_array($item['type'], [4, 5])) $server = AlipayService::create(); if (in_array($item['type'], [4, 5])) $server = AlipayService::create();
if (in_array($item['type'], [1, 3, 6])) $server = WechatService::create(); if (in_array($item['type'], [1, 3, 6])) $server = WechatService::create();
$server->payOrderRefund($item['sn'], $item['data']); $server->payOrderRefund($item['sn'], $item['data']);
// 目前是代销模式,下单的店铺不需要退钱,由供应链退款 if ($item['type'] == 10) {
// if ($item['type'] == 10) { $make = app()->make(StoreOrderProfitsharingRepository::class);
// $make = app()->make(StoreOrderProfitsharingRepository::class); if ($orderType === 'presell') {
// if ($orderType === 'presell') { $make->refundPresallPrice($res, $item['data']['refund_price'], $refundPrice);
// $make->refundPresallPrice($res, $item['data']['refund_price'], $refundPrice); } else {
// } else { $make->refundPrice($res, $item['data']['refund_price'], $refundPrice);
// $make->refundPrice($res, $item['data']['refund_price'], $refundPrice); }
// } } else {
// } else { app()->make(MerchantRepository::class)->subLockMoney($res->mer_id, $orderType, $item['id'], $refundPrice);
// app()->make(MerchantRepository::class)->subLockMoney($res->mer_id, $orderType, $item['id'], $refundPrice); }
// }
} }
} catch (Exception $e) { } catch (Exception $e) {
throw new ValidateException($e->getMessage()); throw new ValidateException($e->getMessage());