feat:订单接口

This commit is contained in:
haoxr 2020-11-26 19:56:50 +08:00
parent 7f9a6823f8
commit 8996499a91
7 changed files with 50 additions and 37 deletions

View File

@ -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<OmsOrderItem> orderItems;
}

View File

@ -5,10 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.youlai.common.core.base.BaseEntity; import com.youlai.common.core.base.BaseEntity;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Data @Data
public class OmsOrder extends BaseEntity { public class OmsOrder extends BaseEntity {
@ -33,25 +31,28 @@ public class OmsOrder extends BaseEntity {
private Long couponId; 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 String payId;
private Integer payType; private Integer payChannel;
private Date payTime; private Date payTime;
private String shipSn; private String logisticsChannel;
private String logisticsNo;
private Date deliveryTime;
} }

View File

@ -6,8 +6,11 @@ import com.youlai.common.core.base.BaseEntity;
import lombok.Data; import lombok.Data;
/**
* 订单明细
*/
@Data @Data
public class OmsOrderSku extends BaseEntity { public class OmsOrderItem extends BaseEntity {
@TableId(type= IdType.AUTO) @TableId(type= IdType.AUTO)
private Long id; private Long id;
@ -20,6 +23,8 @@ public class OmsOrderSku extends BaseEntity {
private String spuName; private String spuName;
private String skuId;
private String skuBarCode; private String skuBarCode;
private String skuSpecifications; private String skuSpecifications;

View File

@ -9,7 +9,7 @@ import lombok.Data;
import java.util.List; import java.util.List;
@Data @Data
public class PmsSpuBO { public class SpuBO {
private PmsSpu spu; private PmsSpu spu;

View File

@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.youlai.common.core.base.BaseEntity; import com.youlai.common.core.base.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors;
@Data @Data
@Accessors(chain = true)
public class SysDict extends BaseEntity { public class SysDict extends BaseEntity {
@TableId(type= IdType.AUTO) @TableId(type= IdType.AUTO)

View File

@ -1,23 +0,0 @@
package com.youlai.common.core.result;
import lombok.Data;
/**
* @author haoxr
* @date 2020-06-24
**/
@Data
public class PageResult<T> extends Result {
private long total;
public static <T> PageResult<T> success(T data, Long total) {
PageResult<T> pageResult = new PageResult();
pageResult.setCode(ResultCode.SUCCESS.getCode());
pageResult.setMsg(ResultCode.SUCCESS.getMsg());
pageResult.setData(data);
pageResult.setTotal(total);
return pageResult;
}
}

View File

@ -1,5 +1,6 @@
package com.youlai.common.core.result; package com.youlai.common.core.result;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -17,6 +18,8 @@ public class Result<T> implements Serializable {
private String msg; private String msg;
@JsonInclude(JsonInclude.Include.NON_NULL)
private Long total;
public static <T> Result<T> success() { public static <T> Result<T> success() {
return success(null); return success(null);
@ -51,7 +54,6 @@ public class Result<T> implements Serializable {
return result(resultCode.getCode(), resultCode.getMsg(), null); return result(resultCode.getCode(), resultCode.getMsg(), null);
} }
private static <T> Result<T> result(IResultCode resultCode, T data) { private static <T> Result<T> result(IResultCode resultCode, T data) {
return result(resultCode.getCode(), resultCode.getMsg(), data); return result(resultCode.getCode(), resultCode.getMsg(), data);
} }
@ -64,4 +66,13 @@ public class Result<T> implements Serializable {
return result; return result;
} }
public static <T> Result<T> success(T data, Long total) {
Result<T> result = new Result();
result.setCode(ResultCode.SUCCESS.getCode());
result.setMsg(ResultCode.SUCCESS.getMsg());
result.setData(data);
result.setTotal(total);
return result;
}
} }