Authored by Lixiaodi

bug修改

... ... @@ -18,7 +18,7 @@ public class StoragePrice {
private Integer sellerUid;
private BigDecimal price;
/** 1:可售,2卖出,3鉴定失败,4卖家取消, 5客服取消. */
private Integer status;
private Integer updateTime;
... ...
... ... @@ -174,17 +174,17 @@
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectProductStorageCount" resultMap="java.lang.Integer">
select count(*) from from product p where <include refid="skuPageCondition" />
<select id="selectProductStorageCount" resultType="java.lang.Integer">
select count(*) from from product p where <include refid="skcPageCondition" />
</select>
<select id="selectProductStorageList" resultMap="BaseResultMap">
select id, brand_id, product_name
from product p
where <include refid="skuPageCondition" /> limit #{start},#{rows}
where <include refid="skcPageCondition" /> limit #{start},#{rows}
</select>
<sql id="skuPageCondition">
<sql id="skcPageCondition">
<if test="product.id != null and product.id > 0">
and p.id = #{product.id}
</if>
... ...
... ... @@ -54,7 +54,7 @@
</select>
<update id="addStorageNum">
update storage set storage_num = storage_num + #{storageNum,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=INTEGER},
update_time = unix_timestamp()
where id = #{storageId,jdbcType=INTEGER}
</update>
<select id="selectByIds" resultMap="BaseResultMap">
... ...
... ... @@ -97,9 +97,9 @@
</sql>
<update id="cancelSaleSkup" parameterType="java.lang.Integer">
update storage_price set status = 1,
update_time = unix_timestamp(),
where skup = #{skup,jdbcType=INTEGER} and status = 2
update storage_price set status = 5,
update_time = unix_timestamp()
where skup = #{skup,jdbcType=INTEGER} and status = 1
</update>
<select id="selectBySkup" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
... ... @@ -108,18 +108,18 @@
where skup = #{skup,jdbcType=INTEGER}
</select>
<select id="selectStoragePriceCount" resultMap="java.lang.Integer">
select count(*) from from storage_price where <include refid="skupPageCondition" />
<select id="selectStoragePriceCount" resultType="java.lang.Integer">
select count(*) from from storage_price where <include refid="skupPageCondition2" />
</select>
<select id="selectStoragePriceList" resultMap="BaseResultMap">
select id, skup, product_id, goods_id, storage_id, depot_num, seller_uid, price, status,
update_time, create_time
from storage_price
where <include refid="skupPageCondition" /> limit #{start},#{rows}
where <include refid="skupPageCondition2" /> limit #{start},#{rows}
</select>
<sql id="skupPageCondition" >
<sql id="skupPageCondition2" >
<if test="storagePrice.status != null and storagePrice.status > -1">
and status = #{storagePrice.status}
</if>
... ...
... ... @@ -84,13 +84,6 @@
select <include refid="queryColumns"/>
from size where sort_id = #{sortId}
</select>
<select id="selectByIdList" resultMap="sizeMap">
select id,size_name
from size where sort_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="selectByIdList" resultMap="sizeMap">
select id, size_name
... ...
... ... @@ -52,7 +52,7 @@ public class ProductController {
@RequestMapping(value = "/skupList")
public ApiResponse<PageResponseBO<ProductResponceBo>> skupList(ProductRequestBo bo) {
LOGGER.info("product.detailList param = {}", bo);
LOGGER.info("product.skupList param = {}", bo);
return productService.getSkupDetailList(bo);
}
... ... @@ -64,7 +64,7 @@ public class ProductController {
@RequestMapping(value = "/cancelSaleSkup")
public ApiResponse<Void> cancelSaleSkup(ProductRequestBo bo) {
LOGGER.info("product.detailList param = {}", bo);
LOGGER.info("product.cancelSaleSkup param = {}", bo);
return productService.cancelSaleSkup(bo);
}
... ...
... ... @@ -511,7 +511,7 @@ public static void main(String[] args) {
if ((product.getShelveStatus() == null || product.getShelveStatus() != 1) && bo.getStatus()==0) {
return new ApiResponse<>(400, "商品不能下架");
}
int n = productMapper.updateStatusByPrimaryKey(bo.getId(), bo.getShelveStatus());
int n = productMapper.updateStatusByPrimaryKey(bo.getId(), bo.getStatus());
if (n == 1) {
return new ApiResponse<>(400, "操作成功");
}
... ...