Authored by mali

接口文档

  1 +# 查询网销信息
  2 +
  3 +> 接口名: `/shop/getStorageStatisticsList`
  4 +
  5 +### 方法
  6 +
  7 +> POST JSONRAW
  8 +
  9 +### 入参
  10 +
  11 +-------------------------
  12 +|属性名称|类型|例子|说明|是否必填|长度限制|
  13 +|--------|----|----|---|----|--------|
  14 +|productSkn|number||商品skn|N|10|
  15 +|factory_code|字符串||商品厂家编码|N|30|
  16 +|productSku|number||商品sku|N|10|
  17 +|shopId|number||店铺Id|N|10|
  18 +|brandId|number||品牌Id|Y|10|
  19 +|maxSortId|数字型||一级分类Id|N|10|
  20 +|middleSortId|数字型||二级分类Id|N|10|
  21 +|smallSortId|数字型||三级分类Id|N|10|
  22 +
  23 +
  24 +
  25 +
  26 +### 对应SQL的操作库表
  27 +
  28 +```xml
  29 + <select id="selectCountByConf" parameterType="com.yoho.bigData.dal.model.StockStorage" resultType="java.lang.Integer">
  30 + select count(0) from stock_storage where 1 = 1
  31 + <if test="productSkn != null" >
  32 + And product_skn = #{productSkn, jdbcType=BIGINT}
  33 + </if>
  34 + <if test="productSkn != null" >
  35 + And product_sku = #{productSku, jdbcType=BIGINT}
  36 + </if>
  37 + <if test="factoryCode != null" >
  38 + And factory_code = #{factoryCode, jdbcType=VARCHAR}
  39 + </if>
  40 + <if test="maxSortId != null" >
  41 + And max_sort_id = #{maxSortId, jdbcType=INTEGER}
  42 + </if>
  43 + <if test="middleSortId != null" >
  44 + And middle_sort_id = #{middleSortId, jdbcType=INTEGER}
  45 + </if>
  46 + <if test="smallSortId != null" >
  47 + And small_sort_id = #{smallSortId, jdbcType=INTEGER}
  48 + </if>
  49 + </select>
  50 + <select id="selectListByConf" parameterType="com.yoho.bigData.dal.model.StockStorage" resultType="BaseResultMap">
  51 + select <include refid="Base_Column_List" /> from stock_storage where 1 = 1
  52 + <if test="productSkn != null" >
  53 + And product_skn = #{productSkn, jdbcType=BIGINT}
  54 + </if>
  55 + <if test="productSkn != null" >
  56 + And product_sku = #{productSku, jdbcType=BIGINT}
  57 + </if>
  58 + <if test="factoryCode != null" >
  59 + And factory_code = #{factoryCode, jdbcType=VARCHAR}
  60 + </if>
  61 + <if test="maxSortId != null" >
  62 + And max_sort_id = #{maxSortId, jdbcType=INTEGER}
  63 + </if>
  64 + <if test="middleSortId != null" >
  65 + And middle_sort_id = #{middleSortId, jdbcType=INTEGER}
  66 + </if>
  67 + <if test="smallSortId != null" >
  68 + And small_sort_id = #{smallSortId, jdbcType=INTEGER}
  69 + </if>
  70 + </select>
  71 +
  72 +
  73 + <select id="selectStorageStatistics" resultType="com.yoho.bigData.dal.model.StorageStatisticsDo">
  74 + select sum(store_nums) as storageTotalNum, sum(storage_amount) as storageTotalMoney, sum(1) as totalNum, status as status from stock_storage
  75 + where brand_id = #{brandId, jdbcType=BIGINT} group by status;
  76 + </select>
  77 +```
  78 +
  79 +### 错误编码
  80 +
  81 +-------------------------
  82 +|错误码code|消息|说明|
  83 +|--------|----|----|
  84 +|200| 查询成功!| |
  85 +|400| 操作失败!| |
  86 +|500| 操作失败!| |
  87 +
  88 +### 返回
  89 +
  90 +``` json
  91 +{
  92 + "code": 200,
  93 + "data": {
  94 + "list": [
  95 + {
  96 + "ageLevel": "1",
  97 + "attribute": 1,
  98 + "brandId": 166,
  99 + "brandName": "九口山",
  100 + "editTime": "2016-03-02 15:43:21",
  101 + "gender": "3",
  102 + "isLimitbuy": "N",
  103 + "isOutlets": "N",
  104 + "maxSortId": 10,
  105 + "maxSortName": "创意生活",
  106 + "middleSortId": 101,
  107 + "middleSortName": "文具",
  108 + "missInfo": "文本信息,尺码信息,搜索/标签", // 信息缺失字段
  109 + "picImgUrl": "http://img12.static.yhbimg.com/goodsimg/2013/01/10/02/022170d6008746d452f03ee0fe8e0c1f86.jpg?imageView/0/w/60/h/60",
  110 + "productName": "九口山 document1缝线本-工作日志-Timer",
  111 + "productSkn": 51001872,
  112 + "retailPrice": 18,
  113 + "returnCoin": 0,
  114 + "salesPrice": 18,
  115 + "searchAndLabel": "",
  116 + "shelveTime": "2016-03-11 11:03:04", // 上架时间
  117 + "smallSortId": 111,
  118 + "smallSortName": "本子",
  119 + "status": 1,
  120 + "founderName":"操作人姓名",
  121 + "shopId" : 431 // 店铺Id
  122 + },
  123 + {
  124 + "attribute": 1,
  125 + "brandId": 1523,
  126 + "brandName": "冬冬腔",
  127 + "gender": "2",
  128 + "maxSortId": 4,
  129 + "maxSortName": "裙装",
  130 + "middleSortId": 31,
  131 + "middleSortName": "连衣裙",
  132 + "picImgUrl": "",
  133 + "productName": "DFASDLKF;LASDKAAAAA",
  134 + "productSkn": 51198302,
  135 + "missInfo": "文本信息,尺码信息,搜索/标签", // 信息缺失字段
  136 + "retailPrice": 495,
  137 + "returnCoin": 0,
  138 + "salesPrice": 495,
  139 + "smallSortId": 134,
  140 + "smallSortName": "连衣裙",
  141 + "shelveTime": "2016-03-11 11:03:04" //上架时间
  142 + }
  143 +
  144 + ],
  145 + "page": 1,
  146 + "size": 10,
  147 + "total": 223703,
  148 + "totalPage": 22371
  149 + },
  150 + "md5": "68e7e09515aec025162017290acf73d8",
  151 + "message": "NetSale Information List."
  152 +}
  153 +
  154 +```