huanghongfa
2021-06-16 6af3a9c58565a5616105d8c76b1cf91bae36d38a
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
<?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.panzhihua.service_community.dao.ComEldersAuthUserMapper">
 
     <resultMap id="baseResult" type="com.panzhihua.service_community.model.dos.ComEldersAuthUserDO">
        <result property="id" column="id"/>
        <result property="userId" column="user_id"/>
        <result property="relation" column="relation"/>
        <result property="isAuth" column="is_auth"/>
        <result property="name" column="name"/>
        <result property="idCard" column="id_card"/>
        <result property="communityId" column="community_id"/>
        <result property="bigAgeId" column="big_age_id"/>
    </resultMap>
 
    <sql id="columns">
    <![CDATA[
        id,user_id,relation,is_auth,name,id_card,community_id,big_age_id
    ]]>
    </sql>
 
    <!-- 分页查询 -->
    <select id="findByPage" resultType="com.panzhihua.common.model.vos.elders.ComElderAuthUserAppVO">
        SELECT
            ceau.id AS elderId,
            ceau.`name`,
            ceau.id_card,
            ceau.relation,
            ceau.is_auth,
            ca.`name` AS communityName
        FROM
            com_elders_auth_user AS ceau
            LEFT JOIN com_act AS ca ON ca.community_id = ceau.community_id
        where ceau.user_id = #{userId}
            order by ceau.create_at desc
 
 
    </select>
 
 
 
</mapper>