fix: 手动添加getter/setter解决Lombok编译问题
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package com.example.building.dto;
|
package com.example.building.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
@@ -15,7 +13,6 @@ import java.util.List;
|
|||||||
* 2. 计算优惠金额(discount_amount) = total_amount × (100 - discount_rate) / 100
|
* 2. 计算优惠金额(discount_amount) = total_amount × (100 - discount_rate) / 100
|
||||||
* 3. 计算实付金额(actual_amount) = total_amount - discount_amount
|
* 3. 计算实付金额(actual_amount) = total_amount - discount_amount
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
public class CreateOrderRequest {
|
public class CreateOrderRequest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,10 +41,50 @@ public class CreateOrderRequest {
|
|||||||
*/
|
*/
|
||||||
private String paymentMethod;
|
private String paymentMethod;
|
||||||
|
|
||||||
|
// Getters and Setters
|
||||||
|
public String getCustomerId() {
|
||||||
|
return customerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustomerId(String customerId) {
|
||||||
|
this.customerId = customerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<OrderItemDTO> getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItems(List<OrderItemDTO> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getDiscountRate() {
|
||||||
|
return discountRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscountRate(BigDecimal discountRate) {
|
||||||
|
this.discountRate = discountRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPaymentMethod() {
|
||||||
|
return paymentMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPaymentMethod(String paymentMethod) {
|
||||||
|
this.paymentMethod = paymentMethod;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单明细项DTO
|
* 订单明细项DTO
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
public static class OrderItemDTO {
|
public static class OrderItemDTO {
|
||||||
/**
|
/**
|
||||||
* 商品ID
|
* 商品ID
|
||||||
@@ -65,5 +102,30 @@ public class CreateOrderRequest {
|
|||||||
* 销售单价(用户可自定义)
|
* 销售单价(用户可自定义)
|
||||||
*/
|
*/
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
|
// Getters and Setters
|
||||||
|
public String getProductId() {
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductId(String productId) {
|
||||||
|
this.productId = productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getQuantity() {
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantity(Integer quantity) {
|
||||||
|
this.quantity = quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(BigDecimal price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user