修复金币收支问题

This commit is contained in:
hy001 2026-04-27 19:28:11 +08:00
parent e5594dd692
commit 40dfc9e002

View File

@ -135,12 +135,12 @@ public class UserWalletServiceImpl implements UserWalletService {
query.setEndTime(TimestampUtils.now().getTime());
}
UserGoldRunningWaterClsHistoryDTO clsWater = walletGoldClient.getClsSearchWater(query)
.getBody();
if (Objects.isNull(clsWater) || CollectionUtils.isEmpty(clsWater.getWaters())) {
return null;
}
UserGoldRunningWaterClsHistoryDTO clsWater = walletGoldClient.getClsSearchWater(query)
.getBody();
if (Objects.isNull(clsWater) || CollectionUtils.isEmpty(clsWater.getWaters())) {
return getGoldRunningWaterDbFallback(query);
}
List<UserGoldRunningWaterHistoryDTO> clsWaterWaters = clsWater.getWaters();
@ -179,11 +179,29 @@ public class UserWalletServiceImpl implements UserWalletService {
})
.filter(Objects::nonNull)
.toList()
);
}
@Override
public void sendGold(SendGoldCmd param) {
);
}
private UserGoldRunningWaterClsTmpCO getGoldRunningWaterDbFallback(
UserGoldRunningWaterBackQryCmd query) {
if (StringUtils.isNotBlank(query.getContext())) {
return new UserGoldRunningWaterClsTmpCO()
.setListOver(true)
.setWaters(Lists.newArrayList());
}
List<UserGoldRunningWaterCO> waters = listGoldRunningWater(query);
if (CollectionUtils.isEmpty(waters)) {
return null;
}
return new UserGoldRunningWaterClsTmpCO()
.setListOver(true)
.setWaters(waters);
}
@Override
public void sendGold(SendGoldCmd param) {
ResponseAssert.isTrue(WalletErrorCode.REQUIRED_GT_ZERO,
ArithmeticUtils.gtZero(param.getQuantity()));
UserProfileDTO userProfile = ResponseAssert.requiredSuccess(