huliguo
6 天以前 adac148db7cefc6848933989d407b1827749a5a6
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
<?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.ruoyi.errand.mapper.AddressBookMapper">
 
 
 
    <select id="addressBookByCommunityId" resultType="com.ruoyi.errand.object.vo.app.AddressBookByCommunityIdVO">
        select
            id,
            recipient_name,
            recipient_phone,
            address_detail,
            is_default,
            region_extend
        from
            t_address_book
        where
            del_flag = 0
        and community_id =#{communityId}
        and app_user_id =#{userId}
        ORDER BY is_default DESC , create_time DESC
    </select>
 
    <select id="addressBookList" resultType="com.ruoyi.errand.object.vo.app.AddressBookListVO">
        select
            tab.id,
            tab.community_id,
            tc.name communityName,
            tab.recipient_name,
            tab.recipient_phone,
            tab.address_detail,
            tab.is_default,
            tc.region_id,
            tab.region_extend
        from
            t_address_book  tab
        inner join
            t_community  tc on tab.community_id =tc.id
        where
            tab.del_flag = 0
          and tc.del_flag=0
          and tab.app_user_id =#{userId}
        ORDER BY tab.community_id ASC, tab.is_default DESC , tab.create_time DESC
    </select>
</mapper>