| | |
| | | and (account = #{phoneNumber} or phone = #{phoneNumber}) |
| | | </select> |
| | | |
| | | <!--用户详情map--> |
| | | <resultMap id="selectUserDetailMap" type="org.springblade.modules.system.vo.UserDetailVO" autoMapping="true"> |
| | | <id property="id" column="id" /> |
| | | <collection property="deptList" javaType="java.util.List" |
| | | ofType="org.springblade.modules.system.entity.Dept" autoMapping="true"> |
| | | <id property="id" column="cid"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <!--用户详情接口--> |
| | | <select id="getUserInfo" resultType="org.springblade.modules.system.vo.UserDetailVO"> |
| | | SELECT * FROM blade_user where is_deleted = 0 |
| | | and id = #{userId} |
| | | <select id="getUserInfo" resultMap="selectUserDetailMap"> |
| | | SELECT |
| | | bu.*, |
| | | bd.id as cid,bd.parent_id,bd.ancestors,bd.dept_category,bd.dept_name,bd.full_name,bd.sort,bd.region_code |
| | | FROM blade_user bu |
| | | left join blade_user_dept bud on bud.user_id = bu.id |
| | | left join blade_dept bd on bud.dept_id = bd.id and bd.is_deleted = 0 |
| | | where bu.is_deleted = 0 |
| | | and bu.id = #{userId} |
| | | </select> |
| | | |
| | | |