diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/bo/OrderBO.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/bo/OrderBO.java new file mode 100644 index 000000000..0bbe32bc8 --- /dev/null +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/bo/OrderBO.java @@ -0,0 +1,17 @@ +package com.youlai.mall.oms.bo; + + +import com.youlai.mall.oms.pojo.OmsOrder; +import com.youlai.mall.oms.pojo.OmsOrderItem; +import lombok.Data; + +import java.util.List; + +@Data +public class OrderBO { + + private OmsOrder order; + + private List orderItems; + +} diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java index b0a79da96..402ddc607 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java @@ -5,14 +5,12 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.youlai.common.core.base.BaseEntity; import lombok.Data; -import java.math.BigDecimal; import java.util.Date; - @Data public class OmsOrder extends BaseEntity { - @TableId(type= IdType.AUTO) + @TableId(type = IdType.AUTO) private Long id; private String orderSn; @@ -33,25 +31,28 @@ public class OmsOrder extends BaseEntity { private Long couponId; - private BigDecimal skuPrice; + private Long skuPrice; - private BigDecimal freightPrice; + private Long freightPrice; - private BigDecimal couponPrice; + private Long couponPrice; - private BigDecimal orderPrice; + private Long orderPrice; - private BigDecimal integrationPrice; + private Long integrationPrice; - private BigDecimal payPrice; + private Long payPrice; private String payId; - private Integer payType; + private Integer payChannel; private Date payTime; - private String shipSn; + private String logisticsChannel; + private String logisticsNo; + + private Date deliveryTime; } diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderSku.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderItem.java similarity index 84% rename from mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderSku.java rename to mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderItem.java index 74e72bacb..36fdf4781 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderSku.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderItem.java @@ -6,8 +6,11 @@ import com.youlai.common.core.base.BaseEntity; import lombok.Data; +/** + * 订单明细 + */ @Data -public class OmsOrderSku extends BaseEntity { +public class OmsOrderItem extends BaseEntity { @TableId(type= IdType.AUTO) private Long id; @@ -20,6 +23,8 @@ public class OmsOrderSku extends BaseEntity { private String spuName; + private String skuId; + private String skuBarCode; private String skuSpecifications; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/PmsSpuBO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/SpuBO.java similarity index 94% rename from mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/PmsSpuBO.java rename to mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/SpuBO.java index 8572ceb79..6a518cde2 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/PmsSpuBO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/SpuBO.java @@ -9,7 +9,7 @@ import lombok.Data; import java.util.List; @Data -public class PmsSpuBO { +public class SpuBO { private PmsSpu spu; diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/SysDict.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/SysDict.java index 688f56d66..e2f50da8d 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/SysDict.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/SysDict.java @@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.youlai.common.core.base.BaseEntity; import lombok.Data; +import lombok.experimental.Accessors; @Data +@Accessors(chain = true) public class SysDict extends BaseEntity { @TableId(type= IdType.AUTO) diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/PageResult.java b/youlai-common/common-core/src/main/java/com/youlai/common/core/result/PageResult.java deleted file mode 100644 index bcaacc64f..000000000 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/PageResult.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.youlai.common.core.result; - -import lombok.Data; - -/** - * @author haoxr - * @date 2020-06-24 - **/ -@Data -public class PageResult extends Result { - - private long total; - - public static PageResult success(T data, Long total) { - PageResult pageResult = new PageResult(); - pageResult.setCode(ResultCode.SUCCESS.getCode()); - pageResult.setMsg(ResultCode.SUCCESS.getMsg()); - pageResult.setData(data); - pageResult.setTotal(total); - return pageResult; - } - -} diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/Result.java b/youlai-common/common-core/src/main/java/com/youlai/common/core/result/Result.java index 7906676ba..c21b9caea 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/Result.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/core/result/Result.java @@ -1,5 +1,6 @@ package com.youlai.common.core.result; +import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; import java.io.Serializable; @@ -17,6 +18,8 @@ public class Result implements Serializable { private String msg; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Long total; public static Result success() { return success(null); @@ -51,7 +54,6 @@ public class Result implements Serializable { return result(resultCode.getCode(), resultCode.getMsg(), null); } - private static Result result(IResultCode resultCode, T data) { return result(resultCode.getCode(), resultCode.getMsg(), data); } @@ -64,4 +66,13 @@ public class Result implements Serializable { return result; } + public static Result success(T data, Long total) { + Result result = new Result(); + result.setCode(ResultCode.SUCCESS.getCode()); + result.setMsg(ResultCode.SUCCESS.getMsg()); + result.setData(data); + result.setTotal(total); + return result; + } + }