diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/signin/SignInStatusQueryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/signin/SignInStatusQueryExe.java index ac586a06..bad70f88 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/signin/SignInStatusQueryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/signin/SignInStatusQueryExe.java @@ -60,6 +60,7 @@ public class SignInStatusQueryExe { co.setDayIndex(config.getDayIndex()); co.setIsPaid(config.getIsPaid() == 1); co.setPaidCost(config.getPaidCost()); + co.setLotteryTicketCount(config.getLotteryTicketCount()); co.setAddActivityPropsGroup(propsGroupMap.get(config.getResourceGroupId())); UserSignInRecord record = recordMap.get(config.getDayIndex()); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserBlacklistQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserBlacklistQryExe.java index de4aaedc..c3be0445 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserBlacklistQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserBlacklistQryExe.java @@ -1,10 +1,12 @@ package com.red.circle.other.app.command.user.query; +import com.alibaba.nacos.common.utils.StringUtils; import com.google.common.collect.Lists; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.clientobject.user.user.UserBlacklistCO; import com.red.circle.other.app.dto.cmd.user.user.UserBlacklistQueryCmd; 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.rds.entity.user.user.ShieldBlack; import com.red.circle.other.infra.database.rds.service.user.user.ShieldBlackService; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; @@ -30,8 +32,13 @@ public class UserBlacklistQryExe { private final UserProfileAppConvertor userProfileAppConvertor; public List execute(UserBlacklistQueryCmd cmd) { + Long userId = null; + if (StringUtils.isNotBlank(cmd.getAccount())) { + UserProfile userProfile = userProfileGateway.getByAccount(cmd.getReqSysOrigin().getOrigin(), cmd.getAccount()); + userId = userProfile == null ? -1L : userProfile.getId(); + } - List userBlackPage = getUserBlackPage(cmd); + List userBlackPage = getUserBlackPage(cmd, userId); if (CollectionUtils.isEmpty(userBlackPage)) { return Lists.newArrayList(); @@ -56,10 +63,9 @@ public class UserBlacklistQryExe { ); } - private List getUserBlackPage( - UserBlacklistQueryCmd cmd) { + private List getUserBlackPage(UserBlacklistQueryCmd cmd, Long searchUserId) { return shieldBlackService - .pageUserBlacklist(cmd.getReqUserId(), cmd.getLastId()); + .pageUserBlacklist(cmd.getReqUserId(), searchUserId, cmd.getLastId()); } } diff --git a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/signin/SignInDailyConfigCO.java b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/signin/SignInDailyConfigCO.java index 5f70f305..76f224f0 100644 --- a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/signin/SignInDailyConfigCO.java +++ b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/clientobject/signin/SignInDailyConfigCO.java @@ -33,5 +33,11 @@ public class SignInDailyConfigCO { */ private Boolean isSupplement; + + /** + * 抽奖券数量 + */ + private Integer lotteryTicketCount; + private ActivityPropsGroup addActivityPropsGroup; } diff --git a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/cmd/user/user/UserBlacklistQueryCmd.java b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/cmd/user/user/UserBlacklistQueryCmd.java index af3f68e6..aa5cb328 100644 --- a/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/cmd/user/user/UserBlacklistQueryCmd.java +++ b/rc-service/rc-service-other/other-client/src/main/java/com/red/circle/other/app/dto/cmd/user/user/UserBlacklistQueryCmd.java @@ -18,4 +18,5 @@ public class UserBlacklistQueryCmd extends AppExtCommand { */ private Long lastId; + private String account; } diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/ShieldBlackService.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/ShieldBlackService.java index bd256b5f..73975aeb 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/ShieldBlackService.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/ShieldBlackService.java @@ -68,6 +68,6 @@ public interface ShieldBlackService extends BaseService { * @param lastId 最后一个标识ID * @return 结果 */ - List pageUserBlacklist(Long userId, Long lastId); + List pageUserBlacklist(Long userId, Long searchUserId, Long lastId); } diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/ShieldBlackServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/ShieldBlackServiceImpl.java index ea46e798..013d355f 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/ShieldBlackServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/impl/ShieldBlackServiceImpl.java @@ -100,9 +100,10 @@ public class ShieldBlackServiceImpl extends BaseServiceImpl pageUserBlacklist(Long userId, Long lastId) { + public List pageUserBlacklist(Long userId, Long searchUserId, Long lastId) { return Optional.ofNullable(query() .eq(ShieldBlack::getUserId, userId) + .eq(Objects.nonNull(searchUserId), ShieldBlack::getShieldUserId, searchUserId) .lt(Objects.nonNull(lastId), ShieldBlack::getId, lastId) .orderByDesc(ShieldBlack::getId) .last(PageConstant.DEFAULT_LIMIT)