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
| <?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
| from
| t_address_book
| where
| del_flag = 0
| and community_id =#{communityId}
| and app_user_id =#{userId}
| ORDER BY tab.is_default DESC , tab.create_time DESC
| </select>
|
| <select id="addressBookList" resultType="com.ruoyi.errand.object.vo.app.AddressBookListVO">
| select
| tab.id,
| tab.community_id,
| tc.communityName,
| tab.recipient_name,
| tab.recipient_phone,
| tab.address_detail,
| tab.is_default
| 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>
|
|