营销产品参数报错

This commit is contained in:
taozi
2020-12-30 14:56:16 +08:00
parent 80aa53803c
commit f5762c6de5
2 changed files with 14 additions and 12 deletions

View File

@ -31,7 +31,7 @@ public interface StoreProductAttrValueMapper extends CoreMapper<YxStoreProductAt
*/ */
@Update("update yx_store_product_attr_value set stock=stock+#{num}, sales=sales-#{num}" + @Update("update yx_store_product_attr_value set stock=stock+#{num}, sales=sales-#{num}" +
" where product_id=#{productId} and `unique`=#{unique}") " where product_id=#{productId} and `unique`=#{unique}")
int incStockDecSales(@Param("num") int num,@Param("productId") Long productId, int incStockDecSales(@Param("num") Integer num,@Param("productId") Long productId,
@Param("unique") String unique); @Param("unique") String unique);
@ -45,7 +45,7 @@ public interface StoreProductAttrValueMapper extends CoreMapper<YxStoreProductAt
@Update("update yx_store_product_attr_value set stock=stock+#{num}, pink_stock=pink_stock+#{num}, sales=sales-#{num}" + @Update("update yx_store_product_attr_value set stock=stock+#{num}, pink_stock=pink_stock+#{num}, sales=sales-#{num}" +
" where product_id=#{productId} and `unique`=#{unique}") " where product_id=#{productId} and `unique`=#{unique}")
int incCombinationStockDecSales(@Param("num") int num,@Param("productId") Long productId, int incCombinationStockDecSales(@Param("num") Integer num,@Param("productId") Long productId,
@Param("unique") String unique); @Param("unique") String unique);
@ -58,7 +58,7 @@ public interface StoreProductAttrValueMapper extends CoreMapper<YxStoreProductAt
*/ */
@Update("update yx_store_product_attr_value set stock=stock+#{num},seckill_stock=seckill_stock+#{num}, sales=sales-#{num}" + @Update("update yx_store_product_attr_value set stock=stock+#{num},seckill_stock=seckill_stock+#{num}, sales=sales-#{num}" +
" where product_id=#{productId} and `unique`=#{unique}") " where product_id=#{productId} and `unique`=#{unique}")
int incSeckillStockDecSales(@Param("num") int num,@Param("productId") Long productId, int incSeckillStockDecSales(@Param("num") Integer num,@Param("productId") Long productId,
@Param("unique") String unique); @Param("unique") String unique);
@ -71,7 +71,7 @@ public interface StoreProductAttrValueMapper extends CoreMapper<YxStoreProductAt
*/ */
@Update("update yx_store_product_attr_value set stock=stock-#{num}, sales=sales+#{num}" + @Update("update yx_store_product_attr_value set stock=stock-#{num}, sales=sales+#{num}" +
" where product_id=#{productId} and `unique`=#{unique} and stock >= #{num}") " where product_id=#{productId} and `unique`=#{unique} and stock >= #{num}")
int decStockIncSales(@Param("num") int num, @Param("productId") Long productId, int decStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,
@Param("unique") String unique); @Param("unique") String unique);
/** /**
@ -83,7 +83,8 @@ public interface StoreProductAttrValueMapper extends CoreMapper<YxStoreProductAt
*/ */
@Update("update yx_store_product_attr_value set stock=stock-#{num}, pink_stock=pink_stock-#{num} ,sales=sales+#{num}" + @Update("update yx_store_product_attr_value set stock=stock-#{num}, pink_stock=pink_stock-#{num} ,sales=sales+#{num}" +
" where product_id=#{productId} and `unique`=#{unique} and stock >= #{num} and pink_stock>=#{num}") " where product_id=#{productId} and `unique`=#{unique} and stock >= #{num} and pink_stock>=#{num}")
int decCombinationStockIncSales(int num, Long productId, String unique); int decCombinationStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,
@Param("unique") String unique);
/** /**
* 秒杀产品 减库存 加销量 * 秒杀产品 减库存 加销量
@ -94,5 +95,6 @@ public interface StoreProductAttrValueMapper extends CoreMapper<YxStoreProductAt
*/ */
@Update("update yx_store_product_attr_value set stock=stock-#{num}, seckill_stock=seckill_stock-#{num},sales=sales+#{num}" + @Update("update yx_store_product_attr_value set stock=stock-#{num}, seckill_stock=seckill_stock-#{num},sales=sales+#{num}" +
" where product_id=#{productId} and `unique`=#{unique} and stock >= #{num} and seckill_stock>=#{num}") " where product_id=#{productId} and `unique`=#{unique} and stock >= #{num} and seckill_stock>=#{num}")
int decSeckillStockIncSales(int num, Long productId, String unique); int decSeckillStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,
@Param("unique") String unique);
} }

View File

@ -34,7 +34,7 @@ public interface StoreProductMapper extends CoreMapper<YxStoreProduct> {
*/ */
@Update("update yx_store_product set stock=stock-#{num}, sales=sales+#{num}" + @Update("update yx_store_product set stock=stock-#{num}, sales=sales+#{num}" +
" where id=#{productId} and stock >= #{num}") " where id=#{productId} and stock >= #{num}")
int decStockIncSales(@Param("num") int num,@Param("productId") Long productId); int decStockIncSales(@Param("num") Integer num,@Param("productId") Long productId);
/** /**
* 正常商品库存 加库存 减销量 * 正常商品库存 加库存 减销量
@ -44,7 +44,7 @@ public interface StoreProductMapper extends CoreMapper<YxStoreProduct> {
*/ */
@Update("update yx_store_product set stock=stock+#{num}, sales=sales-#{num}" + @Update("update yx_store_product set stock=stock+#{num}, sales=sales-#{num}" +
" where id=#{productId}") " where id=#{productId}")
int incStockDecSales(@Param("num") int num,@Param("productId") Long productId); int incStockDecSales(@Param("num") Integer num,@Param("productId") Long productId);
@Update("update yx_store_product set is_show = #{status} where id = #{id}") @Update("update yx_store_product set is_show = #{status} where id = #{id}")
@ -59,7 +59,7 @@ public interface StoreProductMapper extends CoreMapper<YxStoreProduct> {
*/ */
@Update("update yx_store_combination set stock=stock-#{num}, sales=sales+#{num}" + @Update("update yx_store_combination set stock=stock-#{num}, sales=sales+#{num}" +
" where id=#{activityId} and stock >= #{num}") " where id=#{activityId} and stock >= #{num}")
int decCombinationStockIncSales(int num, Long productId,Long activityId); int decCombinationStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId);
/** /**
* 秒杀产品库存 减库存,加销量 * 秒杀产品库存 减库存,加销量
@ -70,7 +70,7 @@ public interface StoreProductMapper extends CoreMapper<YxStoreProduct> {
*/ */
@Update("update yx_store_seckill set stock=stock-#{num}, sales=sales+#{num}" + @Update("update yx_store_seckill set stock=stock-#{num}, sales=sales+#{num}" +
" where id=#{activityId} and stock >= #{num}") " where id=#{activityId} and stock >= #{num}")
int decSeckillStockIncSales(int num, Long productId,Long activityId); int decSeckillStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId);
/** /**
* 拼团商品库存,加库存 减销量 * 拼团商品库存,加库存 减销量
@ -80,7 +80,7 @@ public interface StoreProductMapper extends CoreMapper<YxStoreProduct> {
*/ */
@Update("update yx_store_combination set stock=stock+#{num}, sales=sales-#{num}" + @Update("update yx_store_combination set stock=stock+#{num}, sales=sales-#{num}" +
" where id=#{activityId} and stock >= #{num}") " where id=#{activityId} and stock >= #{num}")
void incCombinationStockIncSales(Integer num, Long productId, Long activityId); void incCombinationStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId);
/** /**
* 秒杀产品库存 加库存,减销量 * 秒杀产品库存 加库存,减销量
@ -91,7 +91,7 @@ public interface StoreProductMapper extends CoreMapper<YxStoreProduct> {
*/ */
@Update("update yx_store_seckill set stock=stock+#{num}, sales=sales-#{num}" + @Update("update yx_store_seckill set stock=stock+#{num}, sales=sales-#{num}" +
" where id=#{activityId} and stock >= #{num}") " where id=#{activityId} and stock >= #{num}")
void incSeckillStockIncSales(Integer num, Long productId, Long activityId); void incSeckillStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId);
/** /**
* 商品浏览量 * 商品浏览量