TASK:分页获取所有用户id,添加按邮箱模糊查询

This commit is contained in:
2026-01-07 11:26:39 +08:00
parent 4879cfeb60
commit 9f523d5953
3 changed files with 9 additions and 4 deletions

View File

@@ -180,8 +180,9 @@ public class ConvenientInquiryController {
@Operation(summary = "获取所有用户id")
@GetMapping("/getAllUserId")
public Response<IPage<Map<String, Object>>> getAllUserIdList(@Parameter(description = "page") @RequestParam Integer page,
@Parameter(description = "size") @RequestParam Integer size) {
return Response.success(convenientInquiryService.getAllUserIdList(page, size));
@Parameter(description = "size") @RequestParam Integer size,
@Parameter(description = "email 模糊查询") @RequestParam(required = false) String email) {
return Response.success(convenientInquiryService.getAllUserIdList(page, size, email));
}
@Operation(summary = "获取所有交易信息")

View File

@@ -51,7 +51,7 @@ public interface ConvenientInquiryService extends IService<Questionnaire> {
IPage<Account> getUserInfo(QueryUserConditionsVO queryUserConditionsVO);
IPage<Map<String, Object>> getAllUserIdList(Integer pageNum, Integer pageSize);
IPage<Map<String, Object>> getAllUserIdList(Integer pageNum, Integer pageSize, String email);
PageBaseResponse<PaymentInfoVO> queryTransactionRecords(QueryPaymentInfoDTO queryPaymentInfoDTO);

View File

@@ -798,7 +798,7 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
return accountMapper.selectPage(new Page<>(queryUserConditionsVO.getPage(), queryUserConditionsVO.getSize()), queryWrapper);
}
public IPage<Map<String, Object>> getAllUserIdList(Integer pageNum, Integer pageSize) {
public IPage<Map<String, Object>> getAllUserIdList(Integer pageNum, Integer pageSize, String email) {
Long accountId = UserContext.getUserHolder().getId();
Account account = accountMapper.selectById(accountId);
@@ -823,6 +823,10 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
queryWrapper.lambda().eq(Account::getOrganizationName, account.getOrganizationName());
}
if (!StringUtil.isNullOrEmpty(email)) {
queryWrapper.lambda().like(Account::getUserEmail, email);
}
// 执行分页查询
IPage<Account> accountPage = accountMapper.selectPage(page, queryWrapper);