Showing
1 changed file
with
202 additions
and
202 deletions
1 | -# 查询资源(分页) | ||
2 | - | ||
3 | -> 接口名: `/resources/queryResource | ||
4 | - | ||
5 | -### 方法 | ||
6 | - | ||
7 | -> POST JSONRAW | ||
8 | - | ||
9 | -### 入参 | ||
10 | - | ||
11 | -------------------------- | ||
12 | -|属性名称|类型|例子|说明|是否必填|长度限制| | ||
13 | -|--------|----|----|---|----|--------| | ||
14 | -|name|string|男首|资源名称|否|100 | ||
15 | -|sortId|int|2|分类编号|否|11 | ||
16 | -|platformId|int|1|平台编号|否|11 | ||
17 | -|page|int|1|1|页码|否|无 | ||
18 | - | ||
19 | -### 对应SQL的操作库表 | ||
20 | - | ||
21 | -```xml | ||
22 | - <select id="selectCountByNameLikeAndSortIdAndPlatFormId" resultType="java.lang.Integer"> | ||
23 | - select | ||
24 | - count(1) | ||
25 | - from resources | ||
26 | - where 1 = 1 | ||
27 | - <if test="name != null" > | ||
28 | - and name like #{name,jdbcType=VARCHAR} | ||
29 | - </if> | ||
30 | - <if test="sortId != null" > | ||
31 | - and sort_id = #{sortId,jdbcType=INTEGER} | ||
32 | - </if> | ||
33 | - <if test="platformId != null" > | ||
34 | - and platform_id = #{platformId,jdbcType=INTEGER} | ||
35 | - </if> | ||
36 | - </select> | ||
37 | - | ||
38 | - <select id="selectByNameLikeAndSortIdAndPlatFormId" resultMap="BaseResultMap"> | ||
39 | - select | ||
40 | - <include refid="Base_Column_List" /> | ||
41 | - from resources | ||
42 | - where 1 = 1 | ||
43 | - <if test="name != null" > | ||
44 | - and name like #{name,jdbcType=VARCHAR} | ||
45 | - </if> | ||
46 | - <if test="sortId != null" > | ||
47 | - and sort_id = #{sortId,jdbcType=INTEGER} | ||
48 | - </if> | ||
49 | - <if test="platformId != null" > | ||
50 | - and platform_id = #{platformId,jdbcType=INTEGER} | ||
51 | - </if> | ||
52 | - limit #{page.startIndex,jdbcType=INTEGER},#{page.pageSize,jdbcType=INTEGER} | ||
53 | - </select> | ||
54 | - | ||
55 | - <select id="selectAll" resultMap="BaseResultMap"> | ||
56 | - select | ||
57 | - <include refid="Base_Column_List" /> | ||
58 | - from platform order by create_time DESC | ||
59 | - </select> | ||
60 | - | ||
61 | - <select id="selectAll" resultMap="BaseResultMap"> | ||
62 | - select | ||
63 | - <include refid="Base_Column_List" /> | ||
64 | - from resources_sort order by create_time desc | ||
65 | - </select> | ||
66 | -``` | ||
67 | - | ||
68 | -### 错误编码 | ||
69 | - | ||
70 | -------------------------- | ||
71 | -|错误码code|消息|说明| | ||
72 | -|--------|----|----| | ||
73 | -|200|操作成功| | | ||
74 | - | ||
75 | -### 返回 | ||
76 | - | ||
77 | -``` json | ||
78 | -{ | ||
79 | - "code": 200, | ||
80 | - "data": { | ||
81 | - "list": [ | ||
82 | - { | ||
83 | - "code": "201504091403001", | ||
84 | - "createTime": 1430378310, | ||
85 | - "id": 8, | ||
86 | - "matchCode": "", | ||
87 | - "name": "男首页", | ||
88 | - "platformId": 1, | ||
89 | - "platformName": "yohoApp", | ||
90 | - "sortId": 2, | ||
91 | - "sortName": "男首" | ||
92 | - }, | ||
93 | - { | ||
94 | - "code": "201504091403002", | ||
95 | - "createTime": 1430382471, | ||
96 | - "id": 10, | ||
97 | - "matchCode": "", | ||
98 | - "name": "女首页", | ||
99 | - "platformId": 1, | ||
100 | - "platformName": "yohoApp", | ||
101 | - "sortId": 3, | ||
102 | - "sortName": "女首" | ||
103 | - }, | ||
104 | - { | ||
105 | - "code": "92cc5ace088dd2ddfb850e2fa673302e", | ||
106 | - "createTime": 1430581214, | ||
107 | - "id": 11, | ||
108 | - "matchCode": "", | ||
109 | - "name": "逛.潮人列表页广告", | ||
110 | - "platformId": 1, | ||
111 | - "platformName": "yohoApp", | ||
112 | - "sortId": 4, | ||
113 | - "sortName": "逛列表页" | ||
114 | - }, | ||
115 | - { | ||
116 | - "code": "b51a4c7211a658c800472c9abf30c746", | ||
117 | - "createTime": 1430583683, | ||
118 | - "id": 12, | ||
119 | - "matchCode": "", | ||
120 | - "name": "逛.话题列表广告", | ||
121 | - "platformId": 1, | ||
122 | - "platformName": "yohoApp", | ||
123 | - "sortId": 4, | ||
124 | - "sortName": "逛列表页" | ||
125 | - }, | ||
126 | - { | ||
127 | - "code": "180a31250622f11180f808d4404d0e78", | ||
128 | - "createTime": 1430583783, | ||
129 | - "id": 13, | ||
130 | - "matchCode": "", | ||
131 | - "name": "逛. 搭配列表广告", | ||
132 | - "platformId": 1, | ||
133 | - "platformName": "yohoApp", | ||
134 | - "sortId": 4, | ||
135 | - "sortName": "逛列表页" | ||
136 | - }, | ||
137 | - { | ||
138 | - "code": "5b2f6bb1547c817e30d96007c60c1893", | ||
139 | - "createTime": 1430583858, | ||
140 | - "id": 14, | ||
141 | - "matchCode": "", | ||
142 | - "name": "逛.潮品列表广告", | ||
143 | - "platformId": 1, | ||
144 | - "platformName": "yohoApp", | ||
145 | - "sortId": 4, | ||
146 | - "sortName": "逛列表页" | ||
147 | - }, | ||
148 | - { | ||
149 | - "code": "268654b65a362c866378b092ad8a5342", | ||
150 | - "createTime": 1430584009, | ||
151 | - "id": 15, | ||
152 | - "matchCode": "", | ||
153 | - "name": "逛.小贴士", | ||
154 | - "platformId": 1, | ||
155 | - "platformName": "yohoApp", | ||
156 | - "sortId": 4, | ||
157 | - "sortName": "逛列表页" | ||
158 | - }, | ||
159 | - { | ||
160 | - "code": "8c48745a39373d621bf5fd80edf59b5e", | ||
161 | - "createTime": 1430725440, | ||
162 | - "id": 16, | ||
163 | - "matchCode": "", | ||
164 | - "name": "男装底部切换到女装首页banner", | ||
165 | - "platformId": 1, | ||
166 | - "platformName": "yohoApp", | ||
167 | - "sortId": 2, | ||
168 | - "sortName": "男首" | ||
169 | - }, | ||
170 | - { | ||
171 | - "code": "c63939b2ad458e9cb51147940c1da2e5", | ||
172 | - "createTime": 1430725950, | ||
173 | - "id": 17, | ||
174 | - "matchCode": "", | ||
175 | - "name": "女首进入男首的banner", | ||
176 | - "platformId": 1, | ||
177 | - "platformName": "yohoApp", | ||
178 | - "sortId": 3, | ||
179 | - "sortName": "女首" | ||
180 | - }, | ||
181 | - { | ||
182 | - "code": "b714c25f503ab4e6bc143a42d1404cbb", | ||
183 | - "createTime": 1430809519, | ||
184 | - "id": 18, | ||
185 | - "matchCode": "", | ||
186 | - "name": "Plus 国际优选推荐头部广告", | ||
187 | - "platformId": 1, | ||
188 | - "platformName": "yohoApp", | ||
189 | - "sortId": 5, | ||
190 | - "sortName": "Plus/Star" | ||
191 | - } | ||
192 | - ], | ||
193 | - "page": 1, | ||
194 | - "size": 10, | ||
195 | - "total": 308, | ||
196 | - "totalPage": 31 | ||
197 | - }, | ||
198 | - "md5": "9c6777ba7425010536cd342e80610119", | ||
199 | - "message": "操作成功" | ||
200 | -} | ||
201 | - | ||
202 | -``` | 1 | +# 查询资源(分页) |
2 | + | ||
3 | +> 接口名: `/resources/queryResource | ||
4 | + | ||
5 | +### 方法 | ||
6 | + | ||
7 | +> POST JSONRAW | ||
8 | + | ||
9 | +### 入参 | ||
10 | + | ||
11 | +------------------------- | ||
12 | +|属性名称|类型|例子|说明|是否必填|长度限制| | ||
13 | +|--------|----|----|---|----|--------| | ||
14 | +|name|string|男首|资源名称|否|100 | ||
15 | +|sortId|int|2|分类编号|否|11 | ||
16 | +|platformId|int|1|平台编号|否|11 | ||
17 | +|page|int|1|页码|否|无 | ||
18 | + | ||
19 | +### 对应SQL的操作库表 | ||
20 | + | ||
21 | +```xml | ||
22 | + <select id="selectCountByNameLikeAndSortIdAndPlatFormId" resultType="java.lang.Integer"> | ||
23 | + select | ||
24 | + count(1) | ||
25 | + from resources | ||
26 | + where 1 = 1 | ||
27 | + <if test="name != null" > | ||
28 | + and name like #{name,jdbcType=VARCHAR} | ||
29 | + </if> | ||
30 | + <if test="sortId != null" > | ||
31 | + and sort_id = #{sortId,jdbcType=INTEGER} | ||
32 | + </if> | ||
33 | + <if test="platformId != null" > | ||
34 | + and platform_id = #{platformId,jdbcType=INTEGER} | ||
35 | + </if> | ||
36 | + </select> | ||
37 | + | ||
38 | + <select id="selectByNameLikeAndSortIdAndPlatFormId" resultMap="BaseResultMap"> | ||
39 | + select | ||
40 | + <include refid="Base_Column_List" /> | ||
41 | + from resources | ||
42 | + where 1 = 1 | ||
43 | + <if test="name != null" > | ||
44 | + and name like #{name,jdbcType=VARCHAR} | ||
45 | + </if> | ||
46 | + <if test="sortId != null" > | ||
47 | + and sort_id = #{sortId,jdbcType=INTEGER} | ||
48 | + </if> | ||
49 | + <if test="platformId != null" > | ||
50 | + and platform_id = #{platformId,jdbcType=INTEGER} | ||
51 | + </if> | ||
52 | + limit #{page.startIndex,jdbcType=INTEGER},#{page.pageSize,jdbcType=INTEGER} | ||
53 | + </select> | ||
54 | + | ||
55 | + <select id="selectAll" resultMap="BaseResultMap"> | ||
56 | + select | ||
57 | + <include refid="Base_Column_List" /> | ||
58 | + from platform order by create_time DESC | ||
59 | + </select> | ||
60 | + | ||
61 | + <select id="selectAll" resultMap="BaseResultMap"> | ||
62 | + select | ||
63 | + <include refid="Base_Column_List" /> | ||
64 | + from resources_sort order by create_time desc | ||
65 | + </select> | ||
66 | +``` | ||
67 | + | ||
68 | +### 错误编码 | ||
69 | + | ||
70 | +------------------------- | ||
71 | +|错误码code|消息|说明| | ||
72 | +|--------|----|----| | ||
73 | +|200|操作成功| | | ||
74 | + | ||
75 | +### 返回 | ||
76 | + | ||
77 | +``` json | ||
78 | +{ | ||
79 | + "code": 200, | ||
80 | + "data": { | ||
81 | + "list": [ | ||
82 | + { | ||
83 | + "code": "201504091403001", | ||
84 | + "createTime": 1430378310, | ||
85 | + "id": 8, | ||
86 | + "matchCode": "", | ||
87 | + "name": "男首页", | ||
88 | + "platformId": 1, | ||
89 | + "platformName": "yohoApp", | ||
90 | + "sortId": 2, | ||
91 | + "sortName": "男首" | ||
92 | + }, | ||
93 | + { | ||
94 | + "code": "201504091403002", | ||
95 | + "createTime": 1430382471, | ||
96 | + "id": 10, | ||
97 | + "matchCode": "", | ||
98 | + "name": "女首页", | ||
99 | + "platformId": 1, | ||
100 | + "platformName": "yohoApp", | ||
101 | + "sortId": 3, | ||
102 | + "sortName": "女首" | ||
103 | + }, | ||
104 | + { | ||
105 | + "code": "92cc5ace088dd2ddfb850e2fa673302e", | ||
106 | + "createTime": 1430581214, | ||
107 | + "id": 11, | ||
108 | + "matchCode": "", | ||
109 | + "name": "逛.潮人列表页广告", | ||
110 | + "platformId": 1, | ||
111 | + "platformName": "yohoApp", | ||
112 | + "sortId": 4, | ||
113 | + "sortName": "逛列表页" | ||
114 | + }, | ||
115 | + { | ||
116 | + "code": "b51a4c7211a658c800472c9abf30c746", | ||
117 | + "createTime": 1430583683, | ||
118 | + "id": 12, | ||
119 | + "matchCode": "", | ||
120 | + "name": "逛.话题列表广告", | ||
121 | + "platformId": 1, | ||
122 | + "platformName": "yohoApp", | ||
123 | + "sortId": 4, | ||
124 | + "sortName": "逛列表页" | ||
125 | + }, | ||
126 | + { | ||
127 | + "code": "180a31250622f11180f808d4404d0e78", | ||
128 | + "createTime": 1430583783, | ||
129 | + "id": 13, | ||
130 | + "matchCode": "", | ||
131 | + "name": "逛. 搭配列表广告", | ||
132 | + "platformId": 1, | ||
133 | + "platformName": "yohoApp", | ||
134 | + "sortId": 4, | ||
135 | + "sortName": "逛列表页" | ||
136 | + }, | ||
137 | + { | ||
138 | + "code": "5b2f6bb1547c817e30d96007c60c1893", | ||
139 | + "createTime": 1430583858, | ||
140 | + "id": 14, | ||
141 | + "matchCode": "", | ||
142 | + "name": "逛.潮品列表广告", | ||
143 | + "platformId": 1, | ||
144 | + "platformName": "yohoApp", | ||
145 | + "sortId": 4, | ||
146 | + "sortName": "逛列表页" | ||
147 | + }, | ||
148 | + { | ||
149 | + "code": "268654b65a362c866378b092ad8a5342", | ||
150 | + "createTime": 1430584009, | ||
151 | + "id": 15, | ||
152 | + "matchCode": "", | ||
153 | + "name": "逛.小贴士", | ||
154 | + "platformId": 1, | ||
155 | + "platformName": "yohoApp", | ||
156 | + "sortId": 4, | ||
157 | + "sortName": "逛列表页" | ||
158 | + }, | ||
159 | + { | ||
160 | + "code": "8c48745a39373d621bf5fd80edf59b5e", | ||
161 | + "createTime": 1430725440, | ||
162 | + "id": 16, | ||
163 | + "matchCode": "", | ||
164 | + "name": "男装底部切换到女装首页banner", | ||
165 | + "platformId": 1, | ||
166 | + "platformName": "yohoApp", | ||
167 | + "sortId": 2, | ||
168 | + "sortName": "男首" | ||
169 | + }, | ||
170 | + { | ||
171 | + "code": "c63939b2ad458e9cb51147940c1da2e5", | ||
172 | + "createTime": 1430725950, | ||
173 | + "id": 17, | ||
174 | + "matchCode": "", | ||
175 | + "name": "女首进入男首的banner", | ||
176 | + "platformId": 1, | ||
177 | + "platformName": "yohoApp", | ||
178 | + "sortId": 3, | ||
179 | + "sortName": "女首" | ||
180 | + }, | ||
181 | + { | ||
182 | + "code": "b714c25f503ab4e6bc143a42d1404cbb", | ||
183 | + "createTime": 1430809519, | ||
184 | + "id": 18, | ||
185 | + "matchCode": "", | ||
186 | + "name": "Plus 国际优选推荐头部广告", | ||
187 | + "platformId": 1, | ||
188 | + "platformName": "yohoApp", | ||
189 | + "sortId": 5, | ||
190 | + "sortName": "Plus/Star" | ||
191 | + } | ||
192 | + ], | ||
193 | + "page": 1, | ||
194 | + "size": 10, | ||
195 | + "total": 308, | ||
196 | + "totalPage": 31 | ||
197 | + }, | ||
198 | + "md5": "9c6777ba7425010536cd342e80610119", | ||
199 | + "message": "操作成功" | ||
200 | +} | ||
201 | + | ||
202 | +``` |
-
Please register or login to post a comment