霸王餐 充值

This commit is contained in:
2025-03-03 18:00:50 +08:00
parent b9cd922bbb
commit 575bd686e2
8 changed files with 122 additions and 25 deletions

View File

@@ -0,0 +1,22 @@
package com.czg.order.dto;
import lombok.Data;
import java.math.BigDecimal;
/**
* @author ww
* @description
*/
@Data
public class BigDecimalDTO {
private BigDecimal price;
public BigDecimalDTO(BigDecimal price) {
this.price = price;
}
public BigDecimal getPrice() {
return price == null ? BigDecimal.ZERO : price;
}
}

View File

@@ -30,6 +30,10 @@ public class CheckOrderPay implements Serializable {
private Long userId;
private Integer vipPrice;
/**
* 是否整单打包
*/
private Integer allPack;
/**
* 用餐人数
@@ -124,4 +128,8 @@ public class CheckOrderPay implements Serializable {
public boolean isVipPrice() {
return vipPrice != null && vipPrice == 1;
}
public boolean isAllPack() {
return allPack != null && allPack == 1;
}
}

View File

@@ -43,7 +43,7 @@ public class OrderPayment implements Serializable {
private Long sourceId;
/**
* 支付方式order,refund, memberIn,memberRefund
* 支付方式order,refund, memberIn,memberRefund, free
*/
private String payType;

View File

@@ -1,9 +1,11 @@
package com.czg.order.service;
import com.alibaba.fastjson2.JSONObject;
import com.czg.order.dto.BigDecimalDTO;
import com.czg.order.dto.CheckOrderPay;
import com.czg.order.dto.OrderInfoAddDTO;
import com.czg.order.dto.OrderInfoQueryDTO;
import com.czg.order.entity.OrderDetail;
import com.czg.order.entity.OrderInfo;
import com.czg.order.enums.PayEnums;
import com.czg.order.vo.HistoryOrderVo;
@@ -15,6 +17,8 @@ import org.jetbrains.annotations.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 订单表 服务层。
@@ -42,6 +46,8 @@ public interface OrderInfoService extends IService<OrderInfo> {
OrderInfo createPayOrder(Long shopId, BigDecimal amount, String remark);
void processOrderDetails2(List<OrderDetail> orderDetails, Map<Long, Integer> prodCouponMap,
BigDecimalDTO prodCouponAmount, BigDecimalDTO totalAmount, BigDecimalDTO packAmount,
boolean isAllPack, boolean isVipPrice);
}