diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/query/TeamBillWorkMembersQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/query/TeamBillWorkMembersQryExe.java index e7fbbb1a..e45ac595 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/query/TeamBillWorkMembersQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/query/TeamBillWorkMembersQryExe.java @@ -11,6 +11,7 @@ import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.model.user.UserProfile; import com.red.circle.other.infra.database.mongo.entity.team.team.TeamBillCycle; import com.red.circle.other.infra.database.mongo.entity.team.team.TeamMemberTarget; +import com.red.circle.other.infra.database.mongo.service.team.TeamBillCycleUtils; import com.red.circle.other.infra.database.mongo.service.team.team.TeamBillCycleService; import com.red.circle.other.infra.database.mongo.service.team.team.TeamMemberTargetService; import com.red.circle.other.infra.database.rds.entity.team.BillDiamondBalance; @@ -81,6 +82,7 @@ public class TeamBillWorkMembersQryExe { .setId(target.getTeamId()) .setAcceptGiftValue(target.sumAcceptGiftValue()) .setAcceptGiftValueFormat(NumUtils.formatLong(target.sumAcceptGiftValue())) + .setEffectiveDay(TeamBillCycleUtils.calculateEffectiveDay(target)) .setOnlineTime(target.sumAllTargetTime()); } return new TeamMemberWorkTargetCO() @@ -88,6 +90,7 @@ public class TeamBillWorkMembersQryExe { .setAcceptGiftValue(settlementResult.getAcceptGiftValue()) .setAcceptGiftValueFormat(NumUtils.formatLong(settlementResult.getAcceptGiftValue())) .setOnlineTime(settlementResult.getOnlineTime()) + .setEffectiveDay(TeamBillCycleUtils.calculateEffectiveDay(target)) .setSettlementResult( teamAppConvertor.toTeamMemberTargetSettlementResultCO(settlementResult)); } diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/team/TeamBillCycleUtils.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/team/TeamBillCycleUtils.java index 13a49f03..993a3ea5 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/team/TeamBillCycleUtils.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/team/TeamBillCycleUtils.java @@ -142,7 +142,7 @@ public final class TeamBillCycleUtils { * @param target 成员目标数据 * @return 有效天数 */ - private static Integer calculateEffectiveDay(TeamMemberTarget target) { + public static Integer calculateEffectiveDay(TeamMemberTarget target) { if (target == null || target.getDailyTargets() == null) { return 0; }