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..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..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,6 +32,9 @@ public interface TbProductSkuRepository extends JpaRepository