| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.partybuilding.PagePartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PagePartyOrganizationVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO; |
| | |
| | | String selectNameByUserId(Long createBy); |
| | | @Update("update sys_user u set u.is_partymember=0 where u.id_card=#{idCard}") |
| | | void updateUserIsPartymember(String idCard); |
| | | |
| | | |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "o.`name` orgName,\n" + |
| | | "m.org_id,\n"+ |
| | | "m.id_card,\n"+ |
| | | "m.`id`,\n" + |
| | | "u.phone,\n" + |
| | | "m.`name`,\n" + |
| | | "m.photo_path,\n" + |
| | | "TIMESTAMPDIFF(\n" + |
| | | "YEAR,\n" + |
| | | "m.employment_time,\n" + |
| | | "DATE_FORMAT( NOW(), '%Y-%m-%d' )) partyAge,\n" + |
| | | "m.join_time,\n" + |
| | | "m.audit_result, \n" + |
| | | "m.employment_time,\n" + |
| | | "CASE\n" + |
| | | "WHEN u.id_card IS NULL THEN\n" + |
| | | "'未注册' ELSE '已注册' \n" + |
| | | "END STATUS \n" + |
| | | "FROM\n" + |
| | | "com_pb_member m\n" + |
| | | "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + |
| | | "LEFT JOIN com_pb_org o ON m.org_id = o.id"+ |
| | | " where m.user_id is not null " + |
| | | "<if test='pagePartyBuildingMemberVO.phone != null and pagePartyBuildingMemberVO.phone.trim() != ""'>" + |
| | | "and u.phone = #{pagePartyBuildingMemberVO.phone} "+ |
| | | " </if> " + |
| | | "<if test='pagePartyBuildingMemberVO.name != null and pagePartyBuildingMemberVO.name.trim() != ""'>" + |
| | | "and u.name like concat (#{pagePartyBuildingMemberVO.name},'%')"+ |
| | | " </if> " + |
| | | "<if test='pagePartyBuildingMemberVO.auditStatus != null and pagePartyBuildingMemberVO.auditStatus.trim() != ""'>" + |
| | | "and m.audit_status = #{pagePartyBuildingMemberVO.auditStatus}"+ |
| | | " </if> " + |
| | | "order by m.join_time desc "+ |
| | | "</script>") |
| | | IPage<PartyBuildingMemberVO> pagePartyBuildingMemberVO(Page page, @Param("pagePartyBuildingMemberVO") PagePartyBuildingMemberVO pagePartyBuildingMemberVO); |
| | | } |