mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 12:48:59 +08:00
feat:订单接口
This commit is contained in:
parent
7f9a6823f8
commit
8996499a91
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
||||
|
@ -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;
|
@ -9,7 +9,7 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PmsSpuBO {
|
||||
public class SpuBO {
|
||||
|
||||
private PmsSpu spu;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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<T> implements Serializable {
|
||||
|
||||
private String msg;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
private Long total;
|
||||
|
||||
public static <T> Result<T> success() {
|
||||
return success(null);
|
||||
@ -51,7 +54,6 @@ public class Result<T> implements Serializable {
|
||||
return result(resultCode.getCode(), resultCode.getMsg(), null);
|
||||
}
|
||||
|
||||
|
||||
private static <T> Result<T> result(IResultCode resultCode, T data) {
|
||||
return result(resultCode.getCode(), resultCode.getMsg(), data);
|
||||
}
|
||||
@ -64,4 +66,13 @@ public class Result<T> implements Serializable {
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user