| | |
| | | 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> |
| | | <select id="getUserByRoleCodeList" resultType="org.jeecg.modules.system.entity.SysUser"> |
| | | SELECT |
| | |
| | | #{roleCode} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |
| | | <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 eam_base_factory_user where factory_id = #{baseFactoryId}) |
| | | <if test="username!=null and username!=''"> |
| | | and username = #{username} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询用户的所属产线名称信息 --> |
| | | <select id="getRepDepNamesByUserIds" resultType="org.jeecg.modules.system.vo.EamUserRepDepVo"> |
| | | SELECT t2.depart_name repairDepartName, t1.user_id FROM eam_base_repair_depart_user t1, eam_base_repair_depart t2 WHERE t2.id = t1.depart_id AND t1.user_id IN |
| | | <foreach collection="userIds" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |