From 679ff0acafb6d4c8f70dfa35c9b618708899836d Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Tue, 12 Nov 2024 10:33:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=87=91=E9=A2=9D=E5=80=BC=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=B5=AE=E7=82=B9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cashier/mybatis/entity/TbActivateInRecord.java | 5 +++-- .../cn/ysk/cashier/mybatis/entity/TbShopCoupon.java | 13 +++++++------ .../service/impl/TbShopCouponServiceImpl.java | 4 ++-- .../impl/shopimpl/TbShopTableServiceImpl.java | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbActivateInRecord.java b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbActivateInRecord.java index e1d9f790..2d5c0691 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbActivateInRecord.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbActivateInRecord.java @@ -1,5 +1,6 @@ package cn.ysk.cashier.mybatis.entity; +import java.math.BigDecimal; import java.util.Date; import com.baomidou.mybatisplus.annotation.FieldFill; @@ -31,9 +32,9 @@ public class TbActivateInRecord extends Model { //商品id private Integer proId; //满多少金额 - private Integer fullAmount; + private BigDecimal fullAmount; //减多少金额 - private Integer discountAmount; + private BigDecimal discountAmount; //赠送数量 private Integer num; //未使用数量 diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbShopCoupon.java b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbShopCoupon.java index 06ba5ee3..7bcd9aae 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbShopCoupon.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/entity/TbShopCoupon.java @@ -1,5 +1,6 @@ package cn.ysk.cashier.mybatis.entity; +import java.math.BigDecimal; import java.time.LocalTime; import java.util.Date; @@ -26,9 +27,9 @@ public class TbShopCoupon extends Model { //1-满减 2-商品 private Integer type; //满多少金额 - private Integer fullAmount; + private BigDecimal fullAmount; //减多少金额 - private Integer discountAmount; + private BigDecimal discountAmount; //描述 private String description; //发放数量 @@ -98,19 +99,19 @@ public class TbShopCoupon extends Model { this.type = type; } - public Integer getFullAmount() { + public BigDecimal getFullAmount() { return fullAmount; } - public void setFullAmount(Integer fullAmount) { + public void setFullAmount(BigDecimal fullAmount) { this.fullAmount = fullAmount; } - public Integer getDiscountAmount() { + public BigDecimal getDiscountAmount() { return discountAmount; } - public void setDiscountAmount(Integer discountAmount) { + public void setDiscountAmount(BigDecimal discountAmount) { this.discountAmount = discountAmount; } diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java index 50405d7f..4c82d704 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java @@ -198,7 +198,7 @@ public class TbShopCouponServiceImpl extends ServiceImpl Date: Tue, 12 Nov 2024 15:45:31 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=89=A9=E4=BD=99=E6=95=B0=E9=87=8F=20?= =?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8A=E4=B8=8B=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/service/impl/TbShopCouponServiceImpl.java | 1 + .../ysk/cashier/repository/product/TbProductRepository.java | 4 ++++ .../cashier/repository/product/TbProductSkuRepository.java | 3 +++ .../cashier/service/impl/productimpl/StockServiceImpl.java | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java index 4c82d704..179de4d1 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopCouponServiceImpl.java @@ -120,6 +120,7 @@ public class TbShopCouponServiceImpl extends ServiceImpl, @Query(value = "select b.* from tb_product_sku as a left join tb_product as b on a.product_id=b.id where a.id=:skuId", nativeQuery = true) TbProduct selectBySkuId(@Param("skuId") Integer skuId); + @Modifying + @Query("update TbProduct set isGrounding=0 where id=:id") + void upGrounding(@Param("id") Integer id); + @Modifying @Query("update TbProduct set lowPrice=:lowPrice where id=:id") void upLowPrice(@Param("id") Integer id, @Param("lowPrice") BigDecimal lowPrice); diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java index d39d2c41..52a96d87 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java @@ -32,6 +32,9 @@ public interface TbProductSkuRepository extends JpaRepository Date: Tue, 12 Nov 2024 15:51:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ysk/cashier/repository/product/TbProductSkuRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java index 52a96d87..ba6dcd1f 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/TbProductSkuRepository.java @@ -32,7 +32,7 @@ public interface TbProductSkuRepository extends JpaRepository