mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 02:39:19 +08:00
wip: 订单导入
This commit is contained in:
-13
@@ -42,12 +42,6 @@ public class CreateOrderDTO {
|
||||
@NotNull(message = "商家实收金额不能为空")
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 运费
|
||||
*/
|
||||
@Schema(description = "运费", example = "10.00")
|
||||
private BigDecimal shippingFee;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@@ -102,11 +96,4 @@ public class CreateOrderDTO {
|
||||
@Schema(description = "成本价", example = "8000.00", required = true)
|
||||
@NotNull(message = "成本价不能为空")
|
||||
private BigDecimal costPrice;
|
||||
|
||||
/**
|
||||
* 成本小计
|
||||
*/
|
||||
@Schema(description = "成本小计", example = "8000.00", required = true)
|
||||
@NotNull(message = "成本小计不能为空")
|
||||
private BigDecimal costTotal;
|
||||
}
|
||||
|
||||
-12
@@ -40,12 +40,6 @@ public class UpdateOrderDTO {
|
||||
@NotNull(message = "商家实收金额不能为空")
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 运费
|
||||
*/
|
||||
@Schema(description = "运费", example = "10.00")
|
||||
private BigDecimal shippingFee;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@@ -94,10 +88,4 @@ public class UpdateOrderDTO {
|
||||
*/
|
||||
@Schema(description = "成本价", example = "8000.00")
|
||||
private BigDecimal costPrice;
|
||||
|
||||
/**
|
||||
* 成本小计
|
||||
*/
|
||||
@Schema(description = "成本小计", example = "8000.00")
|
||||
private BigDecimal costTotal;
|
||||
}
|
||||
|
||||
-12
@@ -87,24 +87,12 @@ public class OrderPO {
|
||||
@TableField("cost_price")
|
||||
private BigDecimal costPrice;
|
||||
|
||||
/**
|
||||
* 成本小计
|
||||
*/
|
||||
@TableField("cost_total")
|
||||
private BigDecimal costTotal;
|
||||
|
||||
/**
|
||||
* 商家实收金额
|
||||
*/
|
||||
@TableField("received_amount")
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 运费
|
||||
*/
|
||||
@TableField("shipping_fee")
|
||||
private BigDecimal shippingFee;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
|
||||
-12
@@ -61,12 +61,6 @@ public class OrderVO {
|
||||
@Schema(description = "商家实收金额", example = "9999.00")
|
||||
private BigDecimal receivedAmount;
|
||||
|
||||
/**
|
||||
* 运费
|
||||
*/
|
||||
@Schema(description = "运费", example = "10.00")
|
||||
private BigDecimal shippingFee;
|
||||
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@@ -138,10 +132,4 @@ public class OrderVO {
|
||||
*/
|
||||
@Schema(description = "成本价", example = "8000.00")
|
||||
private BigDecimal costPrice;
|
||||
|
||||
/**
|
||||
* 成本小计
|
||||
*/
|
||||
@Schema(description = "成本小计", example = "8000.00")
|
||||
private BigDecimal costTotal;
|
||||
}
|
||||
|
||||
-2
@@ -106,9 +106,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderPO> implemen
|
||||
order.setQuantity(createOrderDTO.getQuantity());
|
||||
order.setUnitPrice(createOrderDTO.getUnitPrice());
|
||||
order.setCostPrice(createOrderDTO.getCostPrice());
|
||||
order.setCostTotal(createOrderDTO.getCostTotal());
|
||||
order.setReceivedAmount(createOrderDTO.getReceivedAmount());
|
||||
order.setShippingFee(createOrderDTO.getShippingFee() != null ? createOrderDTO.getShippingFee() : java.math.BigDecimal.ZERO);
|
||||
order.setOrderDate(createOrderDTO.getOrderDate());
|
||||
order.setCreateBy(currentUserContext.getCurrentUserId());
|
||||
|
||||
|
||||
@@ -96,18 +96,16 @@ CREATE TABLE `ec_order` (
|
||||
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '订单ID',
|
||||
`company_id` BIGINT UNSIGNED NOT NULL COMMENT '公司ID',
|
||||
`shop_id` BIGINT UNSIGNED NOT NULL COMMENT '店铺ID',
|
||||
`platform_order_no` VARCHAR(100) DEFAULT NULL COMMENT '平台订单号',
|
||||
`status_id` BIGINT UNSIGNED NOT NULL COMMENT '订单状态ID',
|
||||
`product_id` BIGINT UNSIGNED NOT NULL COMMENT '商品ID',
|
||||
`product_spec_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '商品规格ID',
|
||||
`status_id` BIGINT UNSIGNED NOT NULL COMMENT '订单状态ID',
|
||||
`platform_order_no` VARCHAR(100) DEFAULT NULL COMMENT '平台订单号',
|
||||
`product_name` VARCHAR(255) NOT NULL COMMENT '商品名称(冗余存储)',
|
||||
`spec_name` VARCHAR(200) DEFAULT NULL COMMENT '规格名称(冗余存储)',
|
||||
`received_amount` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '商家实收金额',
|
||||
`quantity` INT NOT NULL DEFAULT 1 COMMENT '数量',
|
||||
`unit_price` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '销售单价',
|
||||
`cost_price` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '成本价(下单时快照)',
|
||||
`cost_total` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '成本小计',
|
||||
`received_amount` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '商家实收金额',
|
||||
`shipping_fee` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '运费',
|
||||
`order_date` TIMESTAMP NOT NULL COMMENT '下单时间',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
|
||||
Reference in New Issue
Block a user