| | |
| | | <mapper namespace="org.springblade.system.user.mapper.UserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="userResultMap" type="org.springblade.system.user.entity.User"> |
| | | <resultMap id="userResultMap" type="org.springblade.system.user.vo.UserVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | <result column="create_user" property="createUser"/> |
| | |
| | | <result column="role_id" property="roleId"/> |
| | | <result column="dept_id" property="deptId"/> |
| | | <result column="post_id" property="postId"/> |
| | | <result column="online_status" property="online_status"/> |
| | | <result column="work_status" property="work_status"/> |
| | | <result column="jd" property="jd"/> |
| | | <result column="wd" property="wd"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectUserPage" resultMap="userResultMap"> |
| | | select * from blade_user where is_deleted = 0 |
| | | select s.*,p.jd,p.wd,ST_ASTEXT ( e.coordinate ) from blade_user s |
| | | LEFT JOIN jfpt.sys_position p ON p.snumber = s.CODE |
| | | LEFT JOIN jfpt.sys_enclosure e ON e.anumber = s.CODE |
| | | |
| | | where is_deleted = 0 |
| | | <if test="tenantId!=null and tenantId != ''"> |
| | | and tenant_id = #{tenantId} |
| | | </if> |
| | |
| | | SELECT id, tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <!--查询处警人员列表--> |
| | | <select id="selectSecurityUserPageList" resultType="org.springblade.system.user.vo.UsersVo"> |
| | | SELECT bu.*,p.jd,p.wd FROM blade_user bu |
| | | LEFT JOIN |
| | | jfpt.sys_position p |
| | | on |
| | | p.snumber=bu.code |
| | | where |
| | | role_id = #{user.roleId} |
| | | <if test="user.realName!=null and user.realName !=''"> |
| | | <bind name="realName" value="'%'+user.realName+'%'"/> |
| | | and bu.real_name like #{realName} |
| | | </if> |
| | | <if test="user.code!=null"> |
| | | <bind name="code" value="'%'+user.code+'%'"/> |
| | | and bu.code like #{code} |
| | | </if> |
| | | order by bu.code asc |
| | | </select> |
| | | </mapper> |