|
|
|
@ -22,6 +22,7 @@ use Hyperf\Di\Annotation\Inject; |
|
|
|
use App\Service\WxRefundServiceInterface; |
|
|
|
use App\Service\UserServiceInterface; |
|
|
|
use App\Model\Users; |
|
|
|
use App\Constants\SsdbKeysPrefix; |
|
|
|
|
|
|
|
class OrderService implements OrderServiceInterface |
|
|
|
{ |
|
|
|
@ -779,6 +780,8 @@ class OrderService implements OrderServiceInterface |
|
|
|
|
|
|
|
// 返还优惠券
|
|
|
|
$this->couponService->orderRefundCoupon($global_order_id); |
|
|
|
// 删除特价商品缓存
|
|
|
|
$this->orderService->clearTodayGoodPurchase($orderMain->user_id,1); |
|
|
|
// 添加用户流水
|
|
|
|
$this->financialService->userByOLOrderRefund($orderMain->user_id, $orderMain->global_order_id, $orderMain->money); |
|
|
|
} |
|
|
|
@ -836,4 +839,13 @@ class OrderService implements OrderServiceInterface |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除特价商品缓存 |
|
|
|
*/ |
|
|
|
public function clearTodayGoodPurchase($userId, $goodId) |
|
|
|
{ |
|
|
|
$ssdb = ApplicationContext::getContainer()->get(SSDBTask::class); |
|
|
|
return $ssdb->exec('hdel', SsdbKeysPrefix::PURCHASE_RECORD. date('Ymd') .'_'.$userId, $goodId); |
|
|
|
} |
|
|
|
} |