lyh
3 天以前 b508ec38ddf9ed93d4435e8f1e3c4effef798aaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.lxzn.ucenter.dao.UserMapper">
    <select id="findUserExtByUsername" parameterType="String" resultType="com.lxzn.framework.domain.ucenter.ext.UserExt">
        select
        u.user_id
        ,u.username
        ,u.nickname
        ,u.password
        ,u.user_type
        ,u.user_status
        ,u.user_pic
        ,u.birthday
        ,u.sex
        ,u.phone_no
        ,u.email
        from (select * from sys_user where delete_flag=0) u
        ${ew.customSqlSegment}
    </select>
 
    <resultMap id="userDepartExt" type="com.lxzn.framework.domain.ucenter.ext.UserDepartExt">
        <id column="user_id"  property="userId" />
        <collection column="user_id" property="departs" select="com.lxzn.ucenter.dao.DepartmentMapper.getUserPermDepart">
        </collection>
    </resultMap>
 
    <select id="findUserDepartExtPageList" parameterType="Map" resultMap="userDepartExt">
        select u.user_id
        ,u.username
        ,u.nickname
        ,u.password
        ,u.user_type
        ,u.user_status
        ,u.user_pic
        ,u.birthday
        ,u.sex
        ,u.phone_no
        ,u.email
        from (select * from sys_user where delete_flag=0) u
        ${ew.customSqlSegment}
    </select>
 
    <select id="findAllUserDepartExtList" resultMap="userDepartExt">
        select u.user_id
        ,u.username
        ,u.nickname
        ,u.password
        ,u.user_type
        ,u.user_status
        ,u.user_pic
        ,u.birthday
        ,u.sex
        ,u.phone_no
        ,u.email
        from sys_user u
        where u.delete_flag=0
    </select>
</mapper>