From 623d3f41a72888d63fa1c41c08862c1d04b677cf Mon Sep 17 00:00:00 2001
From: liuleilei <234@qq.com>
Date: 星期一, 18 十二月 2023 10:32:14 +0800
Subject: [PATCH] 员工列表
---
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
index 9677c71..d962bf3 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -524,19 +524,23 @@
if (!CollectionUtils.isEmpty(memberIPage.getRecords())){
memberIPage.getRecords().forEach(s->s.setSex(IdcardUtil.getGenderByIdCard(s.getIdcardDecode())));
}*/
- IPage<MemberInfoDTO> memberIPage = memberMapper.getPage(pageWrap.toPage(),new QueryWrapper<MemberInfoDTO>()
- .in(Objects.nonNull(pageWrap.getModel().getCompanyIds())&&pageWrap.getModel().getCompanyIds().size()>0,"m.COMPANY_ID",pageWrap.getModel().getCompanyIds())
- .and(StringUtils.isNotBlank(pageWrap.getModel().getKeyWords()),ms->ms.like("m.ohone",pageWrap.getModel().getKeyWords())
- .or().like("m.name",pageWrap.getModel().getKeyWords())
- .or().like("m.code",pageWrap.getModel().getKeyWords()))
- .isNull(Constants.equalsInteger(pageWrap.getModel().getHasFace(),Constants.ZERO),"m.FACE_ID")
- .isNotNull(Constants.equalsInteger(pageWrap.getModel().getHasFace(),Constants.ONE),"m.FACE_ID")
- .eq(Objects.nonNull(pageWrap.getModel().getCanVisit()),"m.CAN_VISIT",pageWrap.getModel().getCanVisit())
- .eq(Objects.nonNull(pageWrap.getModel().getStatus()),"m.CAN_VISIT",pageWrap.getModel().getStatus())
- .eq("m.ISDELETED",0)
- .orderByDesc("m.CREATE_DATE")
- );
+ IPage<Member> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
+ MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>();
+ queryWrapper.selectAll(Member.class);
+ queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId);
+ queryWrapper.in(Objects.nonNull(pageWrap.getModel().getCompanyIds())&&pageWrap.getModel().getCompanyIds().size()>0,Member::getCompanyId,pageWrap.getModel().getCompanyIds())
+ .and(StringUtils.isNotBlank(pageWrap.getModel().getKeyWords()),ms->ms.like(Member::getPhone,pageWrap.getModel().getKeyWords())
+ .or().like(Member::getName,pageWrap.getModel().getKeyWords())
+ .or().like(Member::getCode,pageWrap.getModel().getKeyWords()))
+ .isNull(Constants.equalsInteger(pageWrap.getModel().getHasFace(),Constants.ZERO),Member::getFaceId)
+ .isNotNull(Constants.equalsInteger(pageWrap.getModel().getHasFace(),Constants.ONE),Member::getFaceId)
+ .eq(Objects.nonNull(pageWrap.getModel().getCanVisit()),Member::getCanVisit,pageWrap.getModel().getCanVisit())
+ .eq(Objects.nonNull(pageWrap.getModel().getStatus()),Member::getCanVisit,pageWrap.getModel().getStatus())
+ .eq(Member::getIsdeleted,0)
+ .orderByDesc(Member::getCreateDate);
+
+ IPage<MemberInfoDTO> memberIPage = memberJoinMapper.selectJoinPage(page, MemberInfoDTO.class,queryWrapper);
return PageData.from(memberIPage);
}
--
Gitblit v1.9.3