限时折扣商品
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
package com.czg.order.dto;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 限时折扣dto
|
||||
* order专用 对应mk_limit_time_discount
|
||||
*
|
||||
* @author ww
|
||||
* @description
|
||||
*/
|
||||
@@ -31,4 +37,16 @@ public class LimitRateDTO {
|
||||
* 参与商品
|
||||
*/
|
||||
private String foods;
|
||||
|
||||
private Set<Long> foodIds;
|
||||
|
||||
public Set<Long> getFoodIds() {
|
||||
if (CollUtil.isEmpty(foodIds)) {
|
||||
foodIds = CollUtil.newHashSet(StrUtil.split(foods, ","))
|
||||
.stream()
|
||||
.map(Long::parseLong)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
return foodIds;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ import java.math.BigDecimal;
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrderInfoAddDTO implements Serializable {
|
||||
//限时折扣部分
|
||||
private LimitRateDTO limitRate;
|
||||
|
||||
private Long orderId;
|
||||
/**
|
||||
|
||||
@@ -84,6 +84,10 @@ public class CashierCart implements Serializable {
|
||||
* 是否赠送
|
||||
*/
|
||||
private Integer isGift;
|
||||
/**
|
||||
* 是否参加限时折扣
|
||||
*/
|
||||
private Integer isTimeDiscount;
|
||||
|
||||
/**
|
||||
* 是否是临时菜
|
||||
|
||||
@@ -136,6 +136,10 @@ public class OrderDetail implements Serializable {
|
||||
* 当前下单次数
|
||||
*/
|
||||
private Integer placeNum;
|
||||
/**
|
||||
* 是否参加限时折扣
|
||||
*/
|
||||
private Integer isTimeDiscount;
|
||||
/**
|
||||
* 是否是临时菜品
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,7 @@ public interface OrderInfoService extends IService<OrderInfo> {
|
||||
|
||||
OrderInfo createPayOrder(Long shopId, BigDecimal amount, String remark);
|
||||
void getOrderAmount(List<OrderDetail> orderDetails, BigDecimalDTO totalAmount, BigDecimalDTO packAmount,
|
||||
BigDecimalDTO tempAmount, boolean isAllPack, Integer userAllPack, boolean isVipPrice);
|
||||
BigDecimalDTO tempAmount, LimitRateDTO limitRate, boolean isAllPack, Integer userAllPack, boolean isVipPrice);
|
||||
Boolean printOrder(Long shopId, OrderInfoPrintDTO orderInfoPrintDTO);
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public class ShopProductVo implements Serializable {
|
||||
* 商品id
|
||||
*/
|
||||
private Long id;
|
||||
private Long syncId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user