java110
2022-10-10 e739add1e75473eae6a6067d1a1f5f7267ad4462
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?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="storeShopV1ServiceDaoImpl">
 
 
 
 
 
    <!-- 保存店铺信息 add by wuxw 2018-07-03 -->
    <insert id="saveStoreShopInfo" parameterType="Map">
        insert into s_shop(
shop_desc,return_person,shop_logo,shop_name,store_id,map_y,map_x,send_address,return_address,open_type,area_code,return_link,shop_id,state,shop_type
) values (
#{shopDesc},#{returnPerson},#{shopLogo},#{shopName},#{storeId},#{mapY},#{mapX},#{sendAddress},#{returnAddress},#{openType},#{areaCode},#{returnLink},#{shopId},#{state},#{shopType}
)
    </insert>
 
 
 
    <!-- 查询店铺信息 add by wuxw 2018-07-03 -->
    <select id="getStoreShopInfo" parameterType="Map" resultType="Map">
        select  t.shop_desc,t.shop_desc shopDesc,t.return_person,t.return_person returnPerson,t.shop_logo,t.shop_logo shopLogo,t.shop_name,t.shop_name shopName,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.map_y,t.map_y mapY,t.map_x,t.map_x mapX,t.send_address,t.send_address sendAddress,t.return_address,t.return_address returnAddress,t.open_type,t.open_type openType,t.area_code,t.area_code areaCode,t.return_link,t.return_link returnLink,t.shop_id,t.shop_id shopId,t.state,t.shop_type,t.shop_type shopType 
from s_shop t 
where 1 =1 
<if test="shopDesc !=null and shopDesc != ''">
   and t.shop_desc= #{shopDesc}
</if> 
<if test="returnPerson !=null and returnPerson != ''">
   and t.return_person= #{returnPerson}
</if> 
<if test="shopLogo !=null and shopLogo != ''">
   and t.shop_logo= #{shopLogo}
</if> 
<if test="shopName !=null and shopName != ''">
   and t.shop_name= #{shopName}
</if> 
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if> 
<if test="storeId !=null and storeId != ''">
   and t.store_id= #{storeId}
</if> 
<if test="mapY !=null and mapY != ''">
   and t.map_y= #{mapY}
</if> 
<if test="mapX !=null and mapX != ''">
   and t.map_x= #{mapX}
</if> 
<if test="sendAddress !=null and sendAddress != ''">
   and t.send_address= #{sendAddress}
</if> 
<if test="returnAddress !=null and returnAddress != ''">
   and t.return_address= #{returnAddress}
</if> 
<if test="openType !=null and openType != ''">
   and t.open_type= #{openType}
</if> 
<if test="areaCode !=null and areaCode != ''">
   and t.area_code= #{areaCode}
</if> 
<if test="returnLink !=null and returnLink != ''">
   and t.return_link= #{returnLink}
</if> 
<if test="shopId !=null and shopId != ''">
   and t.shop_id= #{shopId}
</if> 
<if test="state !=null and state != ''">
   and t.state= #{state}
</if> 
<if test="shopType !=null and shopType != ''">
   and t.shop_type= #{shopType}
</if> 
order by t.create_time desc
<if test="page != -1 and page != null ">
   limit #{page}, #{row}
</if> 
 
    </select>
 
 
 
 
    <!-- 修改店铺信息 add by wuxw 2018-07-03 -->
    <update id="updateStoreShopInfo" parameterType="Map">
        update  s_shop t set t.status_cd = #{statusCd}
<if test="newBId != null and newBId != ''">
,t.b_id = #{newBId}
</if> 
<if test="shopDesc !=null and shopDesc != ''">
, t.shop_desc= #{shopDesc}
</if> 
<if test="returnPerson !=null and returnPerson != ''">
, t.return_person= #{returnPerson}
</if> 
<if test="shopLogo !=null and shopLogo != ''">
, t.shop_logo= #{shopLogo}
</if> 
<if test="shopName !=null and shopName != ''">
, t.shop_name= #{shopName}
</if> 
<if test="storeId !=null and storeId != ''">
, t.store_id= #{storeId}
</if> 
<if test="mapY !=null and mapY != ''">
, t.map_y= #{mapY}
</if> 
<if test="mapX !=null and mapX != ''">
, t.map_x= #{mapX}
</if> 
<if test="sendAddress !=null and sendAddress != ''">
, t.send_address= #{sendAddress}
</if> 
<if test="returnAddress !=null and returnAddress != ''">
, t.return_address= #{returnAddress}
</if> 
<if test="openType !=null and openType != ''">
, t.open_type= #{openType}
</if> 
<if test="areaCode !=null and areaCode != ''">
, t.area_code= #{areaCode}
</if> 
<if test="returnLink !=null and returnLink != ''">
, t.return_link= #{returnLink}
</if> 
<if test="state !=null and state != ''">
, t.state= #{state}
</if> 
<if test="shopType !=null and shopType != ''">
, t.shop_type= #{shopType}
</if> 
 where 1=1 <if test="shopId !=null and shopId != ''">
and t.shop_id= #{shopId}
</if> 
 
    </update>
 
    <!-- 查询店铺数量 add by wuxw 2018-07-03 -->
     <select id="queryStoreShopsCount" parameterType="Map" resultType="Map">
        select  count(1) count 
from s_shop t 
where 1 =1 
<if test="shopDesc !=null and shopDesc != ''">
   and t.shop_desc= #{shopDesc}
</if> 
<if test="returnPerson !=null and returnPerson != ''">
   and t.return_person= #{returnPerson}
</if> 
<if test="shopLogo !=null and shopLogo != ''">
   and t.shop_logo= #{shopLogo}
</if> 
<if test="shopName !=null and shopName != ''">
   and t.shop_name= #{shopName}
</if> 
<if test="statusCd !=null and statusCd != ''">
   and t.status_cd= #{statusCd}
</if> 
<if test="storeId !=null and storeId != ''">
   and t.store_id= #{storeId}
</if> 
<if test="mapY !=null and mapY != ''">
   and t.map_y= #{mapY}
</if> 
<if test="mapX !=null and mapX != ''">
   and t.map_x= #{mapX}
</if> 
<if test="sendAddress !=null and sendAddress != ''">
   and t.send_address= #{sendAddress}
</if> 
<if test="returnAddress !=null and returnAddress != ''">
   and t.return_address= #{returnAddress}
</if> 
<if test="openType !=null and openType != ''">
   and t.open_type= #{openType}
</if> 
<if test="areaCode !=null and areaCode != ''">
   and t.area_code= #{areaCode}
</if> 
<if test="returnLink !=null and returnLink != ''">
   and t.return_link= #{returnLink}
</if> 
<if test="shopId !=null and shopId != ''">
   and t.shop_id= #{shopId}
</if> 
<if test="state !=null and state != ''">
   and t.state= #{state}
</if> 
<if test="shopType !=null and shopType != ''">
   and t.shop_type= #{shopType}
</if> 
 
 
     </select>
 
</mapper>