diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/RechargeUserServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/RechargeUserServiceImpl.java index 02a4e35c..20214a8a 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/RechargeUserServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/RechargeUserServiceImpl.java @@ -68,7 +68,8 @@ public class RechargeUserServiceImpl implements RechargeUserService { UserProfileDTO body = userProfileClient.getByUserId(userId).getBody(); // 计算绑定日期到当前的总充值(当月) - String bindTimeStr = bindTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + String bindTimeStr = YearMonth.now().atDay(1).atStartOfDay() + .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); String endTimeStr = YearMonth.now().atEndOfMonth().atTime(23, 59, 59).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); BigDecimal thisMonth = freightGoldClient.getTotalAmountByCondition(userId, bindTimeStr, endTimeStr, RECHARGE_TYPE).getBody();