拉黑新增account查询
This commit is contained in:
parent
fdaf2c16b4
commit
dc17f9c632
@ -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());
|
||||
|
||||
@ -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<UserBlacklistCO> 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<ShieldBlack> userBlackPage = getUserBlackPage(cmd);
|
||||
List<ShieldBlack> userBlackPage = getUserBlackPage(cmd, userId);
|
||||
|
||||
if (CollectionUtils.isEmpty(userBlackPage)) {
|
||||
return Lists.newArrayList();
|
||||
@ -56,10 +63,9 @@ public class UserBlacklistQryExe {
|
||||
);
|
||||
}
|
||||
|
||||
private List<ShieldBlack> getUserBlackPage(
|
||||
UserBlacklistQueryCmd cmd) {
|
||||
private List<ShieldBlack> getUserBlackPage(UserBlacklistQueryCmd cmd, Long searchUserId) {
|
||||
return shieldBlackService
|
||||
.pageUserBlacklist(cmd.getReqUserId(), cmd.getLastId());
|
||||
.pageUserBlacklist(cmd.getReqUserId(), searchUserId, cmd.getLastId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -33,5 +33,11 @@ public class SignInDailyConfigCO {
|
||||
*/
|
||||
private Boolean isSupplement;
|
||||
|
||||
|
||||
/**
|
||||
* 抽奖券数量
|
||||
*/
|
||||
private Integer lotteryTicketCount;
|
||||
|
||||
private ActivityPropsGroup addActivityPropsGroup;
|
||||
}
|
||||
|
||||
@ -18,4 +18,5 @@ public class UserBlacklistQueryCmd extends AppExtCommand {
|
||||
*/
|
||||
private Long lastId;
|
||||
|
||||
private String account;
|
||||
}
|
||||
|
||||
@ -68,6 +68,6 @@ public interface ShieldBlackService extends BaseService<ShieldBlack> {
|
||||
* @param lastId 最后一个标识ID
|
||||
* @return 结果
|
||||
*/
|
||||
List<ShieldBlack> pageUserBlacklist(Long userId, Long lastId);
|
||||
List<ShieldBlack> pageUserBlacklist(Long userId, Long searchUserId, Long lastId);
|
||||
|
||||
}
|
||||
|
||||
@ -100,9 +100,10 @@ public class ShieldBlackServiceImpl extends BaseServiceImpl<ShieldBlackDAO, Shie
|
||||
|
||||
|
||||
@Override
|
||||
public List<ShieldBlack> pageUserBlacklist(Long userId, Long lastId) {
|
||||
public List<ShieldBlack> 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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user