Authored by Lixiaodi

bug修改

@@ -18,7 +18,7 @@ public class StoragePrice { @@ -18,7 +18,7 @@ public class StoragePrice {
18 private Integer sellerUid; 18 private Integer sellerUid;
19 19
20 private BigDecimal price; 20 private BigDecimal price;
21 - 21 + /** 1:可售,2卖出,3鉴定失败,4卖家取消, 5客服取消. */
22 private Integer status; 22 private Integer status;
23 23
24 private Integer updateTime; 24 private Integer updateTime;
@@ -174,17 +174,17 @@ @@ -174,17 +174,17 @@
174 where id = #{id,jdbcType=INTEGER} 174 where id = #{id,jdbcType=INTEGER}
175 </update> 175 </update>
176 176
177 - <select id="selectProductStorageCount" resultMap="java.lang.Integer">  
178 - select count(*) from from product p where <include refid="skuPageCondition" /> 177 + <select id="selectProductStorageCount" resultType="java.lang.Integer">
  178 + select count(*) from from product p where <include refid="skcPageCondition" />
179 </select> 179 </select>
180 180
181 <select id="selectProductStorageList" resultMap="BaseResultMap"> 181 <select id="selectProductStorageList" resultMap="BaseResultMap">
182 select id, brand_id, product_name 182 select id, brand_id, product_name
183 from product p 183 from product p
184 - where <include refid="skuPageCondition" /> limit #{start},#{rows} 184 + where <include refid="skcPageCondition" /> limit #{start},#{rows}
185 </select> 185 </select>
186 186
187 - <sql id="skuPageCondition"> 187 + <sql id="skcPageCondition">
188 <if test="product.id != null and product.id > 0"> 188 <if test="product.id != null and product.id > 0">
189 and p.id = #{product.id} 189 and p.id = #{product.id}
190 </if> 190 </if>
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 </select> 54 </select>
55 <update id="addStorageNum"> 55 <update id="addStorageNum">
56 update storage set storage_num = storage_num + #{storageNum,jdbcType=INTEGER}, 56 update storage set storage_num = storage_num + #{storageNum,jdbcType=INTEGER},
57 - update_time = #{updateTime,jdbcType=INTEGER}, 57 + update_time = unix_timestamp()
58 where id = #{storageId,jdbcType=INTEGER} 58 where id = #{storageId,jdbcType=INTEGER}
59 </update> 59 </update>
60 <select id="selectByIds" resultMap="BaseResultMap"> 60 <select id="selectByIds" resultMap="BaseResultMap">
@@ -97,9 +97,9 @@ @@ -97,9 +97,9 @@
97 </sql> 97 </sql>
98 98
99 <update id="cancelSaleSkup" parameterType="java.lang.Integer"> 99 <update id="cancelSaleSkup" parameterType="java.lang.Integer">
100 - update storage_price set status = 1,  
101 - update_time = unix_timestamp(),  
102 - where skup = #{skup,jdbcType=INTEGER} and status = 2 100 + update storage_price set status = 5,
  101 + update_time = unix_timestamp()
  102 + where skup = #{skup,jdbcType=INTEGER} and status = 1
103 </update> 103 </update>
104 <select id="selectBySkup" parameterType="java.lang.Integer" resultMap="BaseResultMap"> 104 <select id="selectBySkup" parameterType="java.lang.Integer" resultMap="BaseResultMap">
105 select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status, 105 select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
@@ -108,18 +108,18 @@ @@ -108,18 +108,18 @@
108 where skup = #{skup,jdbcType=INTEGER} 108 where skup = #{skup,jdbcType=INTEGER}
109 </select> 109 </select>
110 110
111 - <select id="selectStoragePriceCount" resultMap="java.lang.Integer">  
112 - select count(*) from from storage_price where <include refid="skupPageCondition" /> 111 + <select id="selectStoragePriceCount" resultType="java.lang.Integer">
  112 + select count(*) from from storage_price where <include refid="skupPageCondition2" />
113 </select> 113 </select>
114 114
115 <select id="selectStoragePriceList" resultMap="BaseResultMap"> 115 <select id="selectStoragePriceList" resultMap="BaseResultMap">
116 select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status, 116 select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
117 update_time, create_time 117 update_time, create_time
118 from storage_price 118 from storage_price
119 - where <include refid="skupPageCondition" /> limit #{start},#{rows} 119 + where <include refid="skupPageCondition2" /> limit #{start},#{rows}
120 </select> 120 </select>
121 121
122 - <sql id="skupPageCondition" > 122 + <sql id="skupPageCondition2" >
123 <if test="storagePrice.status != null and storagePrice.status > -1"> 123 <if test="storagePrice.status != null and storagePrice.status > -1">
124 and status = #{storagePrice.status} 124 and status = #{storagePrice.status}
125 </if> 125 </if>
@@ -84,13 +84,6 @@ @@ -84,13 +84,6 @@
84 select <include refid="queryColumns"/> 84 select <include refid="queryColumns"/>
85 from size where sort_id = #{sortId} 85 from size where sort_id = #{sortId}
86 </select> 86 </select>
87 - <select id="selectByIdList" resultMap="sizeMap">  
88 - select id,size_name  
89 - from size where sort_id in  
90 - <foreach item="item" index="index" collection="list" open="(" separator="," close=")">  
91 - #{item}  
92 - </foreach>  
93 - </select>  
94 87
95 <select id="selectByIdList" resultMap="sizeMap"> 88 <select id="selectByIdList" resultMap="sizeMap">
96 select id, size_name 89 select id, size_name
@@ -52,7 +52,7 @@ public class ProductController { @@ -52,7 +52,7 @@ public class ProductController {
52 52
53 @RequestMapping(value = "/skupList") 53 @RequestMapping(value = "/skupList")
54 public ApiResponse<PageResponseBO<ProductResponceBo>> skupList(ProductRequestBo bo) { 54 public ApiResponse<PageResponseBO<ProductResponceBo>> skupList(ProductRequestBo bo) {
55 - LOGGER.info("product.detailList param = {}", bo); 55 + LOGGER.info("product.skupList param = {}", bo);
56 return productService.getSkupDetailList(bo); 56 return productService.getSkupDetailList(bo);
57 } 57 }
58 58
@@ -64,7 +64,7 @@ public class ProductController { @@ -64,7 +64,7 @@ public class ProductController {
64 64
65 @RequestMapping(value = "/cancelSaleSkup") 65 @RequestMapping(value = "/cancelSaleSkup")
66 public ApiResponse<Void> cancelSaleSkup(ProductRequestBo bo) { 66 public ApiResponse<Void> cancelSaleSkup(ProductRequestBo bo) {
67 - LOGGER.info("product.detailList param = {}", bo); 67 + LOGGER.info("product.cancelSaleSkup param = {}", bo);
68 return productService.cancelSaleSkup(bo); 68 return productService.cancelSaleSkup(bo);
69 } 69 }
70 70
@@ -511,7 +511,7 @@ public static void main(String[] args) { @@ -511,7 +511,7 @@ public static void main(String[] args) {
511 if ((product.getShelveStatus() == null || product.getShelveStatus() != 1) && bo.getStatus()==0) { 511 if ((product.getShelveStatus() == null || product.getShelveStatus() != 1) && bo.getStatus()==0) {
512 return new ApiResponse<>(400, "商品不能下架"); 512 return new ApiResponse<>(400, "商品不能下架");
513 } 513 }
514 - int n = productMapper.updateStatusByPrimaryKey(bo.getId(), bo.getShelveStatus()); 514 + int n = productMapper.updateStatusByPrimaryKey(bo.getId(), bo.getStatus());
515 if (n == 1) { 515 if (n == 1) {
516 return new ApiResponse<>(400, "操作成功"); 516 return new ApiResponse<>(400, "操作成功");
517 } 517 }