|
|
@@ -461,10 +461,10 @@ class StoreOrderRefundServices extends BaseServices
|
|
|
]);
|
|
|
|
|
|
//回退复购折扣
|
|
|
- if (isset($order['repeat_discount_num']) && $order['repeat_discount_num'] > 0) {
|
|
|
+ if (isset($order['repeat_discount_num']) && $order['repeat_discount_num'] > 0 && isset($order['use_repeat_discount']) && $order['use_repeat_discount'] > 0) {
|
|
|
/** @var UserServices $userService */
|
|
|
$userService = app()->make(UserServices::class);
|
|
|
- $userService->bcInc($order['uid'], 'repeat_discount_num', $order['use_repeat_discount'], 'uid');
|
|
|
+ $userService->bcInc($order['uid'], 'repeat_discount_num', (string)$order['use_repeat_discount'], 'uid');
|
|
|
$statusService->save([
|
|
|
'oid' => $order['id'],
|
|
|
'change_type' => 'repeat_discount_back',
|