|
|
@@ -7,7 +7,6 @@ import com.kym.service.*;
|
|
|
import com.kym.service.cache.KymCache;
|
|
|
import com.kym.service.factory.DiscountStrategyFactory;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@@ -30,26 +29,20 @@ public class OrderCloseEventHandler implements AwoaraEventHandler<OrderInfoObjec
|
|
|
private final WashOrderService washOrderService;
|
|
|
private final WalletDetailService walletDetailService;
|
|
|
private final AccountService accountService;
|
|
|
- private final StationAccountService stationAccountService;
|
|
|
private final SplitRecordService splitRecordService;
|
|
|
|
|
|
private final MpMsgTemplateService mpMsgTemplateService;
|
|
|
|
|
|
- private final StationAccountRecordService stationAccountRecordService;
|
|
|
|
|
|
public OrderCloseEventHandler(WashOrderService washOrderService, WalletDetailService walletDetailService,
|
|
|
- AccountService accountService, StationAccountService stationAccountService,
|
|
|
- SplitRecordService splitRecordService,
|
|
|
- StationAccountRecordService stationAccountRecordService, MpMsgTemplateService mpMsgTemplateService,
|
|
|
- String domain) {
|
|
|
+ AccountService accountService, SplitRecordService splitRecordService,
|
|
|
+ MpMsgTemplateService mpMsgTemplateService,String domain) {
|
|
|
DOMAIN = domain;
|
|
|
this.washOrderService = washOrderService;
|
|
|
this.walletDetailService = walletDetailService;
|
|
|
this.accountService = accountService;
|
|
|
- this.stationAccountService = stationAccountService;
|
|
|
this.splitRecordService = splitRecordService;
|
|
|
this.mpMsgTemplateService = mpMsgTemplateService;
|
|
|
- this.stationAccountRecordService = stationAccountRecordService;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -148,7 +141,7 @@ public class OrderCloseEventHandler implements AwoaraEventHandler<OrderInfoObjec
|
|
|
// 判断消费金额是否达标,达标发送领取停车优惠券消息
|
|
|
if (orderInfo.getAmount() >= WashOrder.PARKING_COUPON_MIN_AMOUNT) {
|
|
|
var parkingCouponUrl = KymCache.INSTANCE.getParkingQrCodeUrlByStationId(washOrder.getStationId());
|
|
|
- // 维码链接做转换防止重复使用,有效期2小时
|
|
|
+ // 二维码链接做转换防止重复使用,有效期2小时
|
|
|
var code = UUID.randomUUID().toString();
|
|
|
KymCache.INSTANCE.setParkingCouponCode(code, parkingCouponUrl, 3600*2L);
|
|
|
var url = DOMAIN + "/api/parking-coupon?code=" + code;
|