| | |
| | | and username = #{username} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改用户部门code --> |
| | | <update id="updateUserDepart"> |
| | | UPDATE sys_user SET org_code = #{orgCode} where username = #{username} |
| | |
| | | <select id="getUserByPhone" resultType="org.jeecg.modules.system.entity.SysUser"> |
| | | select * from sys_user where phone = #{phone} and del_flag = 0 |
| | | </select> |
| | | |
| | | |
| | | <!-- 根据邮箱查询用户信息 --> |
| | | <select id="getUserByEmail" resultType="org.jeecg.modules.system.entity.SysUser"> |
| | | select * from sys_user where email = #{email} and del_flag = 0 |
| | |
| | | LEFT JOIN sys_user_role t2 ON t1.id = t2.user_id |
| | | LEFT JOIN sys_role t3 ON t2.role_id = t3.id |
| | | WHERE |
| | | t3.role_code = #{roleCode} AND equipment_ids LIKE concat(concat('%',#{equipmentId}),'%') |
| | | t3.role_code = #{roleCode} AND t1.equipment_ids LIKE concat(concat('%',#{equipmentId}),'%') |
| | | </select> |
| | | </mapper> |
| | | <select id="getUserByRoleCodeList" resultType="org.jeecg.modules.system.entity.SysUser"> |
| | | SELECT |
| | | su.* |
| | | FROM |
| | | sys_user su |
| | | LEFT JOIN sys_user_role sur ON su.id = sur.user_id |
| | | LEFT JOIN sys_role sr ON sur.role_id = sr.id |
| | | WHERE |
| | | su.del_flag = '0' and sr.role_code in |
| | | <foreach collection="roleCodeList" index="index" item="roleCode" open="(" separator="," close=")"> |
| | | #{roleCode} |
| | | </foreach> |
| | | </select> |
| | | <select id="getUserByWorkShopDepartId" resultType="org.jeecg.modules.system.entity.SysUser"> |
| | | select * from sys_user where del_flag = 0 and id in (select user_id from mom_eam_work_shop_depart_user where work_shop_depart_id = #{workShopDepartId}) |
| | | </select> |
| | | </mapper> |