商品列表 分组排序
优惠券字段修改为 浮点数
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.chaozhanggui.system.cashierservice.entity;
|
package com.chaozhanggui.system.cashierservice.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@@ -36,11 +37,11 @@ public class TbActivateInRecord implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 满多少金额
|
* 满多少金额
|
||||||
*/
|
*/
|
||||||
private Integer fullAmount;
|
private BigDecimal fullAmount;
|
||||||
/**
|
/**
|
||||||
* 减多少金额
|
* 减多少金额
|
||||||
*/
|
*/
|
||||||
private Integer discountAmount;
|
private BigDecimal discountAmount;
|
||||||
/**
|
/**
|
||||||
* 赠送数量
|
* 赠送数量
|
||||||
*/
|
*/
|
||||||
@@ -124,19 +125,19 @@ public class TbActivateInRecord implements Serializable {
|
|||||||
this.proId = proId;
|
this.proId = proId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getFullAmount() {
|
public BigDecimal getFullAmount() {
|
||||||
return fullAmount;
|
return fullAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFullAmount(Integer fullAmount) {
|
public void setFullAmount(BigDecimal fullAmount) {
|
||||||
this.fullAmount = fullAmount;
|
this.fullAmount = fullAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getDiscountAmount() {
|
public BigDecimal getDiscountAmount() {
|
||||||
return discountAmount;
|
return discountAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDiscountAmount(Integer discountAmount) {
|
public void setDiscountAmount(BigDecimal discountAmount) {
|
||||||
this.discountAmount = discountAmount;
|
this.discountAmount = discountAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.chaozhanggui.system.cashierservice.entity;
|
package com.chaozhanggui.system.cashierservice.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@@ -29,11 +30,11 @@ public class TbShopCoupon implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 满多少金额
|
* 满多少金额
|
||||||
*/
|
*/
|
||||||
private Integer fullAmount;
|
private BigDecimal fullAmount;
|
||||||
/**
|
/**
|
||||||
* 减多少金额
|
* 减多少金额
|
||||||
*/
|
*/
|
||||||
private Integer discountAmount;
|
private BigDecimal discountAmount;
|
||||||
/**
|
/**
|
||||||
* 描述
|
* 描述
|
||||||
*/
|
*/
|
||||||
@@ -132,19 +133,19 @@ public class TbShopCoupon implements Serializable {
|
|||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getFullAmount() {
|
public BigDecimal getFullAmount() {
|
||||||
return fullAmount;
|
return fullAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFullAmount(Integer fullAmount) {
|
public void setFullAmount(BigDecimal fullAmount) {
|
||||||
this.fullAmount = fullAmount;
|
this.fullAmount = fullAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getDiscountAmount() {
|
public BigDecimal getDiscountAmount() {
|
||||||
return discountAmount;
|
return discountAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDiscountAmount(Integer discountAmount) {
|
public void setDiscountAmount(BigDecimal discountAmount) {
|
||||||
this.discountAmount = discountAmount;
|
this.discountAmount = discountAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,9 +119,9 @@ public class TbShopShare implements Serializable {
|
|||||||
//1 满减 2 商品
|
//1 满减 2 商品
|
||||||
private Integer type;
|
private Integer type;
|
||||||
//满多少金额
|
//满多少金额
|
||||||
private Integer fullAmount;
|
private BigDecimal fullAmount;
|
||||||
//优惠多少金额
|
//优惠多少金额
|
||||||
private Integer discountAmount;
|
private BigDecimal discountAmount;
|
||||||
//使用描述
|
//使用描述
|
||||||
private String useDetail;
|
private String useDetail;
|
||||||
//商品描述
|
//商品描述
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class TbShopCouponServiceImpl implements TbShopCouponService {
|
|||||||
TbShopCoupon tbShopCoupon = couponMapper.queryById(tbUserCouponVo.getCouponId());
|
TbShopCoupon tbShopCoupon = couponMapper.queryById(tbUserCouponVo.getCouponId());
|
||||||
StringBuilder useRestrictions = new StringBuilder("每天 ");
|
StringBuilder useRestrictions = new StringBuilder("每天 ");
|
||||||
if (tbShopCoupon.getType().equals(1)) {
|
if (tbShopCoupon.getType().equals(1)) {
|
||||||
if (amount.compareTo(new BigDecimal(tbShopCoupon.getFullAmount())) < 0) {
|
if (amount.compareTo(tbShopCoupon.getFullAmount()) < 0) {
|
||||||
isUse = false;
|
isUse = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||||
<result property="proId" column="pro_id" jdbcType="INTEGER"/>
|
<result property="proId" column="pro_id" jdbcType="INTEGER"/>
|
||||||
<result property="fullAmount" column="full_amount" jdbcType="INTEGER"/>
|
<result property="fullAmount" column="full_amount" jdbcType="DECIMAL"/>
|
||||||
<result property="discountAmount" column="discount_amount" jdbcType="INTEGER"/>
|
<result property="discountAmount" column="discount_amount" jdbcType="DECIMAL"/>
|
||||||
<result property="num" column="num" jdbcType="INTEGER"/>
|
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||||
<result property="overNum" column="over_num" jdbcType="INTEGER"/>
|
<result property="overNum" column="over_num" jdbcType="INTEGER"/>
|
||||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||||
|
|||||||
@@ -937,7 +937,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectHot" resultMap="BaseResultMap">
|
<select id="selectHot" resultMap="BaseResultMap">
|
||||||
select min(sku.suit) as suit, tb.* ,realSalesNumber as stockNumber
|
select min(sku.suit) as suit, tb.* ,top_products.realSalesNumber as stockNumber
|
||||||
from tb_product tb
|
from tb_product tb
|
||||||
LEFT JOIN tb_product_sku sku ON tb.id = sku.product_id
|
LEFT JOIN tb_product_sku sku ON tb.id = sku.product_id
|
||||||
JOIN (SELECT product_id ,SUM(real_sales_number) as realSalesNumber
|
JOIN (SELECT product_id ,SUM(real_sales_number) as realSalesNumber
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<result property="shopId" column="shop_id" jdbcType="VARCHAR"/>
|
<result property="shopId" column="shop_id" jdbcType="VARCHAR"/>
|
||||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||||
<result property="fullAmount" column="full_amount" jdbcType="INTEGER"/>
|
<result property="fullAmount" column="full_amount" jdbcType="DECIMAL"/>
|
||||||
<result property="discountAmount" column="discount_amount" jdbcType="INTEGER"/>
|
<result property="discountAmount" column="discount_amount" jdbcType="DECIMAL"/>
|
||||||
<result property="description" column="description" jdbcType="VARCHAR"/>
|
<result property="description" column="description" jdbcType="VARCHAR"/>
|
||||||
<result property="number" column="number" jdbcType="INTEGER"/>
|
<result property="number" column="number" jdbcType="INTEGER"/>
|
||||||
<result property="leftNumber" column="left_number" jdbcType="INTEGER"/>
|
<result property="leftNumber" column="left_number" jdbcType="INTEGER"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user