参加消费赠券
新客立减 50%
This commit is contained in:
@@ -15,6 +15,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 消费赠券表 实体类。
|
||||
@@ -26,6 +27,7 @@ import lombok.NoArgsConstructor;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@Table("mk_shop_consumer_coupon")
|
||||
public class MkShopConsumerCoupon implements Serializable {
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.czg.market.entity.MkShopConsumerCoupon;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 消费赠券表 服务层。
|
||||
*
|
||||
@@ -14,8 +16,17 @@ import com.mybatisflex.core.service.IService;
|
||||
public interface MkShopConsumerCouponService extends IService<MkShopConsumerCoupon> {
|
||||
|
||||
Page<MkShopConsumerCouponDTO> getConsumerCouponPage(MkShopConsumerCouponDTO param);
|
||||
|
||||
/**
|
||||
* 参加消费赠券
|
||||
*/
|
||||
void receiveConsumerCoupon(Long shopId, Long orderId, BigDecimal orderAmount, Long userId, Long shopUserId);
|
||||
|
||||
MkShopConsumerCouponDTO getConsumerCouponById(Long id);
|
||||
|
||||
void addConsumerCoupon(MkShopConsumerCouponDTO param);
|
||||
|
||||
void updateConsumerCouponById(MkShopConsumerCouponDTO param);
|
||||
|
||||
void deleteConsumerCoupon(Long id);
|
||||
}
|
||||
|
||||
@@ -56,6 +56,11 @@ public class CheckOrderPay implements Serializable {
|
||||
* 手动优惠金额
|
||||
*/
|
||||
private BigDecimal discountAmount;
|
||||
/**
|
||||
* 新客立减
|
||||
*/
|
||||
private BigDecimal newCustomerDiscountId;
|
||||
private BigDecimal newCustomerDiscountAmount;
|
||||
|
||||
/**
|
||||
* 商品优惠券抵扣金额
|
||||
@@ -114,6 +119,12 @@ public class CheckOrderPay implements Serializable {
|
||||
// }
|
||||
// return discountRatio.setScale(2, RoundingMode.UP);
|
||||
// }
|
||||
/**
|
||||
* 新客立减金额
|
||||
*/
|
||||
public BigDecimal getNewCustomerDiscountAmount() {
|
||||
return newCustomerDiscountAmount == null ? BigDecimal.ZERO : newCustomerDiscountAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getOtherCouponDiscountAmount() {
|
||||
return otherCouponDiscountAmount == null ? BigDecimal.ZERO : otherCouponDiscountAmount;
|
||||
|
||||
@@ -88,6 +88,11 @@ public class OrderInfo implements Serializable {
|
||||
*/
|
||||
private Integer pointsNum;
|
||||
|
||||
/**
|
||||
* 新客立减金额
|
||||
*/
|
||||
private BigDecimal newCustomerDiscountAmount;
|
||||
|
||||
/**
|
||||
* 商品优惠券抵扣金额
|
||||
*/
|
||||
@@ -279,6 +284,10 @@ public class OrderInfo implements Serializable {
|
||||
return StrUtil.isBlank(refundRemark) ? "" : refundRemark + " ";
|
||||
}
|
||||
|
||||
public BigDecimal getNewCustomerDiscountAmount() {
|
||||
return newCustomerDiscountAmount == null ? BigDecimal.ZERO : newCustomerDiscountAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getOriginAmount() {
|
||||
return originAmount == null ? BigDecimal.ZERO : originAmount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user