Blame view

api-doc/product/netSale/queryList.md 11.2 KB
mali authored
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
# 查询网销信息

> 接口名: `/product/queryNetSaleInforList`

### 方法

> POST JSONRAW

### 入参

-------------------------
|属性名称|类型|例子|说明|是否必填|长度限制|
|--------|----|----|---|----|--------|
|productSkn|number||商品skn|N|10|
|productSkc|number||商品skc|N|10|
|productSku|number||商品sku|N|10|
|productName|字符串||名称|N|无|
|shopId|number||店铺Id|N|5|
|brandId|number||品牌Id|N|5|
|isJit|枚举型(字符串)||是否jit商品|"Y" 或者 "N"|1|
|stock|枚举型(数字型)||是否有库存|0 或者 1|11|
|isScreen|枚举型||是否拍摄状态|"Y" 或者 "N"|1|
|isMeasure|枚举型||是否测量状态|"Y" 或者 "N"|1|
|gender|枚举型||性别|1男2女 3通用|1|
|maxSortId|数字型||一级分类Id|N|5|
|middleSortId|数字型||二级分类Id|N|5|
|smallSortId|数字型||三级分类Id|N|5|
|isOutLets|枚举型||是否奥莱"Y" 或者 "N""B"|N|1|
|productStatus|数字型||状态8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过|N|5|
|productStatusStr|字符串,多个用逗号隔开||状态8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过|N|20|
|page|数字型||当前页数|N|11|
|size|数字型||每页显示条数默认10|N|11|
|sortFlag|数字型||1代表按操作时间排序,2按库存排序默认1|N|10|
|descFlag|字符串||asc升序  desc 倒序  默认倒序|N|10|
|isInfoMiss|字符串||是否信息缺失,上架后信息缺失页面专用,取值Y|N|1|
36
|isAdvance|字符串||是否预售,取值Y|N|1|
37 38
|skcOnsaleStatus|数字型||skc上架状态,取值0 1(skc都已经上架)|N|1|
mali authored
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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297



### 对应SQL的操作库表

```xml
   <select id="selectSknListByReq" resultMap="BaseResultMap">
    select   <include refid="Base_Column_List" /> from product where 1 = 1
      <if test="baseProduct.productSkn != null" >
        And product_skn = #{baseProduct.productSkn, jdbcType=INTEGER}
      </if>
      <if test="baseProduct.productName != null" >
        And product_name like concat('%', #{baseProduct.productName, jdbcType=VARCHAR}, '%')
      </if>
      <if test="baseProduct.brandId != null" >
        And brand_id = #{baseProduct.brandId, jdbcType=SMALLINT}
      </if>
      <if test="baseProduct.isScreen != null" >
        And is_screen = #{baseProduct.isScreen, jdbcType=CHAR}
      </if>
      <if test="baseProduct.isMeasure != null" >
        And is_measure = #{baseProduct.isMeasure, jdbcType=CHAR}
      </if>
      <if test="baseProduct.supplierId != null" >
        And supplier_id = #{baseProduct.supplierId, jdbcType=INTEGER}
      </if>
      <if test="baseProduct.isJit != null" >
        And is_jit = #{baseProduct.isJit, jdbcType=CHAR}
      </if>
      <if test="baseProduct.maxSortId != null" >
        And max_sort_id = #{baseProduct.maxSortId, jdbcType=SMALLINT}
      </if>
      <if test="baseProduct.middleSortId != null" >
        And middle_sort_id = #{baseProduct.middleSortId, jdbcType=SMALLINT}
      </if>
      <if test="baseProduct.smallSortId != null" >
        And small_sort_id = #{baseProduct.smallSortId, jdbcType=SMALLINT}
      </if>
       <if test="baseProduct.isOutLets != null" >
        And is_outlets = #{baseProduct.isOutLets, jdbcType=CHAR}
      </if>
      <if test="baseProduct.isAdvance != null" >
        And is_advance = #{baseProduct.isAdvance, jdbcType=CHAR}
      </if>
      <if test="baseProduct.gender != null" >
       And gender = #{baseProduct.gender, jdbcType=CHAR}
      </if>
      <if test="baseProduct.isInfoMiss != null" >
       And is_info_miss = #{baseProduct.isInfoMiss, jdbcType=CHAR}
      </if>
      <if test="baseProduct.stock != null" >
        <if test="baseProduct.stock == 1" >
        	And stock >= #{baseProduct.stock, jdbcType=SMALLINT}
        </if>
        <if test="baseProduct.stock == 0" >
        		And (stock = 0 OR stock is null)
        </if>
      </if>
      <if test="baseProduct.isAuditing != null" >
      	<if test="baseProduct.isAuditing == 200" >
      		 And is_auditing = 200
      	</if>
      	<if test="baseProduct.isAuditing != 200" >
      		And is_auditing in(100, 300)
      	</if>
      </if>
      <if test="baseProduct.status != null" >
      	<if test="baseProduct.status == 1" >
      		 And status = 1
      	</if>
      	<if test="baseProduct.status != 1" >
      		And status != 1
      	</if>
      </if>
      <if test="baseProduct.productStatusList != null" >
      	 AND status in
      	 <foreach collection="baseProduct.productStatusList" item="item" index="index" separator="," open="(" close=")">
			#{item}
		</foreach>
      </if>
      <if test="baseProduct.onlyShowSknList != null" >
      	 AND (product_skn in
      	 <foreach collection="baseProduct.onlyShowSknList" item="item" index="index" separator="," open="(" close=")">
			#{item, jdbcType=INTEGER}
		</foreach> OR shop_id = #{baseProduct.shopId, jdbcType=SMALLINT} )
      </if>
      <if test="baseProduct.onlyShowSknList == null" >
      	 <if test="baseProduct.shopId != null" >
	        And shop_id = #{baseProduct.shopId, jdbcType=SMALLINT}
	      </if>
      </if>
      <if test="baseProduct.sortFlag != null">
      	order by ${baseProduct.sortFlag}  ${baseProduct.descFlag}
      </if>
    Limit #{startIndex,jdbcType=INTEGER}, #{length,jdbcType=INTEGER}
  </select>
  <select id="selectSknListByReqCount" resultType="java.lang.Integer" parameterType="com.yohobuy.platform.dal.product.model.BaseProductEx">
    select   count(0) from product where 1 = 1
      <if test="baseProduct.productSkn != null" >
        And product_skn = #{baseProduct.productSkn, jdbcType=INTEGER}
      </if>
      <if test="baseProduct.productName != null" >
        And product_name like concat('%', #{baseProduct.productName, jdbcType=VARCHAR}, '%')
      </if>
      <if test="baseProduct.brandId != null" >
        And brand_id = #{baseProduct.brandId, jdbcType=SMALLINT}
      </if>
      <if test="baseProduct.isScreen != null" >
        And is_screen = #{baseProduct.isScreen, jdbcType=CHAR}
      </if>
      <if test="baseProduct.isMeasure != null" >
        And is_measure = #{baseProduct.isMeasure, jdbcType=CHAR}
      </if>
      <if test="baseProduct.supplierId != null" >
        And supplier_id = #{baseProduct.supplierId, jdbcType=INTEGER}
      </if>
      <if test="baseProduct.isJit != null" >
        And is_jit = #{baseProduct.isJit, jdbcType=CHAR}
      </if>
      <if test="baseProduct.maxSortId != null" >
        And max_sort_id = #{baseProduct.maxSortId, jdbcType=SMALLINT}
      </if>
      <if test="baseProduct.middleSortId != null" >
        And middle_sort_id = #{baseProduct.middleSortId, jdbcType=SMALLINT}
      </if>
      <if test="baseProduct.smallSortId != null" >
        And small_sort_id = #{baseProduct.smallSortId, jdbcType=SMALLINT}
      </if>
       <if test="baseProduct.isOutLets != null" >
        And is_outlets = #{baseProduct.isOutLets, jdbcType=CHAR}
      </if>
      <if test="baseProduct.isAdvance != null" >
        And is_advance = #{baseProduct.isAdvance, jdbcType=CHAR}
      </if>
      <if test="baseProduct.gender != null" >
       And gender = #{baseProduct.gender, jdbcType=CHAR}
      </if>
      <if test="baseProduct.isInfoMiss != null" >
       And is_info_miss = #{baseProduct.isInfoMiss, jdbcType=CHAR}
      </if>
      <if test="baseProduct.stock != null" >
        <if test="baseProduct.stock == 1" >
        	And stock >= #{baseProduct.stock, jdbcType=SMALLINT}
        </if>
        <if test="baseProduct.stock == 0" >
        	And (stock = 0 OR stock is null)
        </if>
      </if>
      <if test="baseProduct.isAuditing != null" >
      	<if test="baseProduct.isAuditing == 200" >
      		 And is_auditing = 200
      	</if>
      	<if test="baseProduct.isAuditing != 200" >
      		And is_auditing in(100, 300)
      	</if>
      </if>
      <if test="baseProduct.status != null" >
      	<if test="baseProduct.status == 1" >
      		 And status = 1
      	</if>
      	<if test="baseProduct.status != 1" >
      		And status != 1
      	</if>
      </if>
      <if test="baseProduct.productStatusList != null" >
      	 AND status in
      	 <foreach collection="baseProduct.productStatusList" item="item" index="index" separator="," open="(" close=")">
			#{item}
		</foreach>
      </if>
      <if test="baseProduct.onlyShowSknList != null" >
      	 AND (product_skn in
      	 <foreach collection="baseProduct.onlyShowSknList" item="item" index="index" separator="," open="(" close=")">
			#{item, jdbcType=INTEGER}
		</foreach> OR shop_id = #{baseProduct.shopId, jdbcType=SMALLINT} )
      </if>
      <if test="baseProduct.onlyShowSknList == null" >
      	 <if test="baseProduct.shopId != null" >
	        And shop_id = #{baseProduct.shopId, jdbcType=SMALLINT}
	      </if>
      </if>
  </select>
```

### 错误编码

-------------------------
|错误码code|消息|说明|
|--------|----|----|
|200| 添加成功!| |
|400| 操作失败!|  |
|500| 操作失败!|  |

### 返回

``` json
{
  "code": 200,
  "data": {
    "list": [
       {
        "ageLevel": "1",
        "attribute": 1,
        "brandId": 166,
        "brandName": "九口山",
        "editTime": "2016-03-02 15:43:21",
        "gender": "3",
        "isLimitbuy": "N",
        "isOutlets": "N",
        "maxSortId": 10,
        "maxSortName": "创意生活",
        "middleSortId": 101,
        "middleSortName": "文具",
        "missInfo": "文本信息,尺码信息,搜索/标签",              // 信息缺失字段
        "picImgUrl": "http://img12.static.yhbimg.com/goodsimg/2013/01/10/02/022170d6008746d452f03ee0fe8e0c1f86.jpg?imageView/0/w/60/h/60",
        "productName": "九口山  document1缝线本-工作日志-Timer",
        "productSkn": 51001872,
        "retailPrice": 18,
        "returnCoin": 0,
        "salesPrice": 18,
        "searchAndLabel": "",
        "shelveTime": "2016-03-11 11:03:04",                // 上架时间
        "smallSortId": 111,
        "smallSortName": "本子",
        "status": 1,
        "founderName":"操作人姓名",
        "shopId" : 431                                  // 店铺Id
      },
      {
        "attribute": 1,
        "brandId": 1523,
        "brandName": "冬冬腔",
        "gender": "2",
        "maxSortId": 4,
        "maxSortName": "裙装",
        "middleSortId": 31,
        "middleSortName": "连衣裙",
        "picImgUrl": "",
        "productName": "DFASDLKF;LASDKAAAAA",
        "productSkn": 51198302,
         "missInfo": "文本信息,尺码信息,搜索/标签",                         // 信息缺失字段
        "retailPrice": 495,
        "returnCoin": 0,
        "salesPrice": 495,
        "smallSortId": 134,
        "smallSortName": "连衣裙",
         "shelveTime": "2016-03-11 11:03:04"                    //上架时间
      }
      
    ],
    "page": 1,
    "size": 10,
    "total": 223703,
    "totalPage": 22371
  },
  "md5": "68e7e09515aec025162017290acf73d8",
  "message": "NetSale Information List."
}
马力 authored
298
```