TASK:分页获取所有用户id,添加按邮箱模糊查询
This commit is contained in:
@@ -180,8 +180,9 @@ public class ConvenientInquiryController {
|
|||||||
@Operation(summary = "获取所有用户id")
|
@Operation(summary = "获取所有用户id")
|
||||||
@GetMapping("/getAllUserId")
|
@GetMapping("/getAllUserId")
|
||||||
public Response<IPage<Map<String, Object>>> getAllUserIdList(@Parameter(description = "page") @RequestParam Integer page,
|
public Response<IPage<Map<String, Object>>> getAllUserIdList(@Parameter(description = "page") @RequestParam Integer page,
|
||||||
@Parameter(description = "size") @RequestParam Integer size) {
|
@Parameter(description = "size") @RequestParam Integer size,
|
||||||
return Response.success(convenientInquiryService.getAllUserIdList(page, size));
|
@Parameter(description = "email 模糊查询") @RequestParam(required = false) String email) {
|
||||||
|
return Response.success(convenientInquiryService.getAllUserIdList(page, size, email));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取所有交易信息")
|
@Operation(summary = "获取所有交易信息")
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public interface ConvenientInquiryService extends IService<Questionnaire> {
|
|||||||
|
|
||||||
IPage<Account> getUserInfo(QueryUserConditionsVO queryUserConditionsVO);
|
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);
|
PageBaseResponse<PaymentInfoVO> queryTransactionRecords(QueryPaymentInfoDTO queryPaymentInfoDTO);
|
||||||
|
|
||||||
|
|||||||
@@ -798,7 +798,7 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
|||||||
return accountMapper.selectPage(new Page<>(queryUserConditionsVO.getPage(), queryUserConditionsVO.getSize()), queryWrapper);
|
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();
|
Long accountId = UserContext.getUserHolder().getId();
|
||||||
Account account = accountMapper.selectById(accountId);
|
Account account = accountMapper.selectById(accountId);
|
||||||
|
|
||||||
@@ -823,6 +823,10 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
|||||||
queryWrapper.lambda().eq(Account::getOrganizationName, account.getOrganizationName());
|
queryWrapper.lambda().eq(Account::getOrganizationName, account.getOrganizationName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!StringUtil.isNullOrEmpty(email)) {
|
||||||
|
queryWrapper.lambda().like(Account::getUserEmail, email);
|
||||||
|
}
|
||||||
|
|
||||||
// 执行分页查询
|
// 执行分页查询
|
||||||
IPage<Account> accountPage = accountMapper.selectPage(page, queryWrapper);
|
IPage<Account> accountPage = accountMapper.selectPage(page, queryWrapper);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user