feat(REQ-3488): 资质查询加上根据创建时间倒序

This commit is contained in:
zhanghonghao 2025-01-16 16:36:48 +08:00
parent 85533262ff
commit 15d71d171b
3 changed files with 9 additions and 0 deletions

View File

@ -36,6 +36,9 @@ public class QualificationOuTypeQueryRepositoryImpl implements QualificationOuTy
if (!BooleanUtil.isTrue(req.getIncludeDeleted())) {
wrapper.eq("is_delete", 0);
}
if (CollUtil.isEmpty(req.getSort())) {
wrapper.orderByDesc("create_at");
}
// keyword
wrapper.and(wq -> {
if (StrUtil.isNotBlank(req.getLikeOuName()) || StrUtil.isNotBlank(req.getLikeUscc())) {

View File

@ -35,6 +35,9 @@ public class QualificationQueryRepositoryImpl implements QualificationQueryRepos
if (!BooleanUtil.isTrue(req.getIncludeDeleted())) {
wrapper.eq("is_delete", 0);
}
if (CollUtil.isEmpty(req.getSort())) {
wrapper.orderByDesc("create_at");
}
IPage<QualificationQueryRepository.QualificationResp> results = qualificationDao.page(page, wrapper).convert(e -> BeanUtil.toBean(e, QualificationQueryRepository.QualificationResp.class));
PageResp<QualificationQueryRepository.QualificationResp> resp = PageConverter.toResp(results);
List<QualificationQueryRepository.QualificationResp> records = resp.getData();

View File

@ -35,6 +35,9 @@ public class QualificationsApplyQueryRepositoryImpl implements QualificationsApp
if (!BooleanUtil.isTrue(req.getIncludeDeleted())) {
wrapper.eq("is_delete", 0);
}
if (CollUtil.isEmpty(req.getSort())) {
wrapper.orderByDesc("create_at");
}
IPage<QualificationsApplyQueryRepository.QualificationsApplyResp> results = qualificationsApplyDao.page(page, wrapper).convert(e -> BeanUtil.toBean(e, QualificationsApplyQueryRepository.QualificationsApplyResp.class));
PageResp<QualificationsApplyQueryRepository.QualificationsApplyResp> resp = PageConverter.toResp(results);
List<QualificationsApplyQueryRepository.QualificationsApplyResp> records = resp.getData();