From f686b95e300e15b8defc95c09456bbbc145b9125 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 2 Mar 2026 16:41:53 +0800 Subject: [PATCH] =?UTF-8?q?rechargeAgentAmount=20=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/user/user/RechargeUserServiceImpl.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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 b71bb41e..02a4e35c 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 @@ -110,14 +110,12 @@ public class RechargeUserServiceImpl implements RechargeUserService { BigDecimal currentMonthRecharge = BigDecimal.ZERO; for (AdminRechargeAgentRelation relation : relations) { - String monthStart = relation.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); - String monthEnd = YearMonth.now().atEndOfMonth().atTime(23, 59, 59).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); -// LocalDateTime actualStartTime = relation.getCreateTime().isAfter(startTime) -// ? relation.getCreateTime() -// : startTime; -// -// String monthStart = actualStartTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); -// String monthEnd = endTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + LocalDateTime actualStartTime = relation.getCreateTime().isAfter(startTime) + ? relation.getCreateTime() + : startTime; + + String monthStart = actualStartTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + String monthEnd = endTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); BigDecimal monthRecharge = freightGoldClient.getTotalAmountByCondition(relation.getUserId(), monthStart, monthEnd, RECHARGE_TYPE).getBody(); currentMonthRecharge = currentMonthRecharge.add(monthRecharge != null ? monthRecharge : BigDecimal.ZERO);