xiangpei
2025-07-07 468139d617c56536b07bd4ddcf52f5330c3449b8
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
<?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="cn.lili.modules.member.mapper.MemberMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="cn.lili.modules.member.entity.vo.MemberVO">
        <id column="id" property="id"/>
        <result column="username" property="username"/>
        <result column="nick_name" property="nickName"/>
        <result column="sex" property="sex"/>
        <result column="birthday" property="birthday"/>
        <result column="region_id" property="regionId"/>
        <result column="region" property="region"/>
        <result column="mobile" property="mobile"/>
        <result column="point" property="point"/>
        <result column="total_point" property="totalPoint"/>
        <result column="face" property="face"/>
        <result column="disabled" property="disabled"/>
        <result column="have_store" property="haveStore"/>
        <result column="store_id" property="storeId"/>
        <result column="open_id" property="openId"/>
        <result column="client_enum" property="clientEnum"/>
        <result column="last_login_date" property="lastLoginDate"/>
        <result column="grade_id" property="gradeId"/>
        <result column="experience" property="experience"/>
        <collection property="tags" ofType="cn.lili.modules.lmk.domain.vo.MemberTagVO">
            <id column="member_tag_id" property="id"/>
            <result column="tag_name" property="tagName"/>
            <result column="tag_id" property="tagId"/>
        </collection>
 
    </resultMap>
    <select id="getVoById" resultMap="BaseResultMap">
        select m.*, mt.id member_tag_id, mt.tag_name, mt.tag_id
        from li_member m
                 left join lmk_member_tag mt on m.id = mt.member_id and mt.delete_flag = 0
        where m.id = #{id} and m.delete_flag = 0
    </select>
 
 
</mapper>