| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingMemberVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberDO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbMemberRoleDO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbServiceTeamDO; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | // "</script>") |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "mr.id,\n" + |
| | | "m.NAME,\n" + |
| | | "u.phone,\n" + |
| | | "'党员' politicalOutlook,\n"+ |
| | | "m.photo_path,\n" + |
| | | "*,\n" + |
| | | "TIMESTAMPDIFF(\n" + |
| | | "YEAR,\n" + |
| | | "m.employment_time,\n" + |
| | | "DATE_FORMAT( NOW(), '%Y-%m-%d' )) partyAge,\n" + |
| | | "r.role_name ,\n" + |
| | | "mr.role_id \n"+ |
| | | "t.birth_time,\n" + |
| | | "DATE_FORMAT( NOW(), '%Y-%m-%d' )) age\n" + |
| | | "FROM\n" + |
| | | "com_pb_member_role mr\n" + |
| | | "JOIN com_pb_member m ON mr.member_id = m.id\n" + |
| | | "JOIN sys_role r ON mr.role_id = r.role_id \n" + |
| | | "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + |
| | | "com_pb_member_role t\n" + |
| | | "WHERE\n" + |
| | | "mr.community_id = #{partyCommitteeVO.communityId} \n" + |
| | | "<if test='partyCommitteeVO.name != null and partyCommitteeVO.name.trim() != ""'>" + |
| | | "AND m.`name` like concat(#{partyCommitteeVO.name},'%') \n" + |
| | | " </if> " + |
| | | "<if test='partyCommitteeVO.roleId != null and partyCommitteeVO.roleId != 0'>" + |
| | | "AND r.role_id =#{partyCommitteeVO.roleId}" + |
| | | " </if> " + |
| | | "t.community_id = #{partyCommitteeVO.communityId} \n" + |
| | | "</script>") |
| | | IPage<PartyCommitteeVO> pagePartyOrganization(Page page, @Param("partyCommitteeVO") PartyCommitteeVO partyCommitteeVO); |
| | | |
| | | @Select("select * from sys_user where phone=#{phone} and type=1") |
| | | SysUserVO getSysUserByPhone(@Param("phone")String phone); |
| | | |
| | | @Update("update sys_user u set u.phone=#{newphone} where u.phone=#{oldphone}") |
| | | void updateUserPhone(@Param("newphone")String newphone,@Param("oldphone")String oldphone); |
| | | |
| | | @Select("select * from com_pb_member_role where id=#{id}") |
| | | PartyCommitteeVO selectPartyCommitteeById(@Param("id")Long id); |
| | | } |