From f5762c6de5310ccc87ed44bd1ac4696bc2dfecd7 Mon Sep 17 00:00:00 2001 From: taozi <552920369@qq.com> Date: Wed, 30 Dec 2020 14:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80=E4=BA=A7=E5=93=81=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/StoreProductAttrValueMapper.java | 14 ++++++++------ .../product/service/mapper/StoreProductMapper.java | 12 ++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrValueMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrValueMapper.java index f4f8019a..48f98729 100644 --- a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrValueMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrValueMapper.java @@ -31,7 +31,7 @@ public interface StoreProductAttrValueMapper extends CoreMapper= #{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); /** @@ -83,7 +83,8 @@ public interface StoreProductAttrValueMapper extends CoreMapper= #{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= #{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); } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductMapper.java index d9831da6..ec8d9852 100644 --- a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductMapper.java @@ -34,7 +34,7 @@ public interface StoreProductMapper extends CoreMapper { */ @Update("update yx_store_product set stock=stock-#{num}, sales=sales+#{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 { */ @Update("update yx_store_product set stock=stock+#{num}, sales=sales-#{num}" + " 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}") @@ -59,7 +59,7 @@ public interface StoreProductMapper extends CoreMapper { */ @Update("update yx_store_combination set stock=stock-#{num}, sales=sales+#{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 { */ @Update("update yx_store_seckill set stock=stock-#{num}, sales=sales+#{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 { */ @Update("update yx_store_combination set stock=stock+#{num}, sales=sales-#{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 { */ @Update("update yx_store_seckill set stock=stock+#{num}, sales=sales-#{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); /** * 商品浏览量