|
|
@@ -34,16 +34,19 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
|
|
|
private final AccountService accountService;
|
|
|
private final SplitRecordService splitRecordService;
|
|
|
private final PayLogService payLogService;
|
|
|
+ private final UserService userService;
|
|
|
private final MpMsgTemplateService mpMsgTemplateService;
|
|
|
|
|
|
public OrderSettlementServiceImpl(WashOrderService washOrderService, WalletDetailService walletDetailService,
|
|
|
AccountService accountService, SplitRecordService splitRecordService,
|
|
|
- PayLogService payLogService, MpMsgTemplateService mpMsgTemplateService) {
|
|
|
+ PayLogService payLogService, UserService userService,
|
|
|
+ MpMsgTemplateService mpMsgTemplateService) {
|
|
|
this.washOrderService = washOrderService;
|
|
|
this.walletDetailService = walletDetailService;
|
|
|
this.accountService = accountService;
|
|
|
this.splitRecordService = splitRecordService;
|
|
|
this.payLogService = payLogService;
|
|
|
+ this.userService = userService;
|
|
|
this.mpMsgTemplateService = mpMsgTemplateService;
|
|
|
}
|
|
|
|
|
|
@@ -177,6 +180,10 @@ public class OrderSettlementServiceImpl implements OrderSettlementService {
|
|
|
|
|
|
private void backfillUnattributedRecharges(Long userId) {
|
|
|
var userStationId = KymCache.INSTANCE.getUserStationId(userId);
|
|
|
+ if (userStationId == null) {
|
|
|
+ var user = userService.getById(userId);
|
|
|
+ userStationId = user != null ? user.getStationId() : null;
|
|
|
+ }
|
|
|
if (userStationId == null) {
|
|
|
return;
|
|
|
}
|