代码生成功能中,点击同步,会清除已添加并存在的字段

pull/10/head
YunaiV 2022-08-19 20:04:56 +08:00
parent 29fff03f93
commit e5c4c747a4
14 changed files with 2 additions and 1125 deletions

View File

@ -154,12 +154,12 @@ public class CodegenServiceImpl implements CodegenService {
// 构建 CodegenColumnDO 数组,只同步新增的字段
List<CodegenColumnDO> codegenColumns = codegenColumnMapper.selectListByTableId(tableId);
Set<String> codegenColumnNames = CollectionUtils.convertSet(codegenColumns, CodegenColumnDO::getColumnName);
// 移除已经存在的字段
tableFields.removeIf(column -> codegenColumnNames.contains(column.getColumnName()));
// 计算需要删除的字段
Set<String> tableFieldNames = CollectionUtils.convertSet(tableFields, TableField::getName);
Set<Long> deleteColumnIds = codegenColumns.stream().filter(column -> !tableFieldNames.contains(column.getColumnName()))
.map(CodegenColumnDO::getId).collect(Collectors.toSet());
// 移除已经存在的字段
tableFields.removeIf(column -> codegenColumnNames.contains(column.getColumnName()));
if (CollUtil.isEmpty(tableFields) && CollUtil.isEmpty(deleteColumnIds)) {
throw exception(CODEGEN_SYNC_NONE_CHANGE);
}

View File

@ -1,21 +0,0 @@
package cn.iocoder.mall.promotion.api.rpc.price;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.promotion.api.rpc.price.dto.PriceProductCalcReqDTO;
import cn.iocoder.mall.promotion.api.rpc.price.dto.PriceProductCalcRespDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* Title:
* Description:
*
* @author zhuyang
* @version 1.0 2021/10/9
*/
@FeignClient("promotion-service")
public interface PriceFeign {
@PostMapping("/promotion/price/calcProductPrice")
public CommonResult<PriceProductCalcRespDTO> calcProductPrice(@RequestBody PriceProductCalcReqDTO calcReqDTO) ;
}

View File

@ -1,67 +0,0 @@
package cn.iocoder.mall.promotion.api.rpc.price.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* Request DTO
*/
@Data
@Accessors(chain = true)
public class PriceProductCalcReqDTO implements Serializable {
/**
*
*/
private Integer userId;
/**
*
*/
private Integer couponCardId;
/**
* SKU
*/
@NotNull(message = "商品数组不能为空")
private List<Item> items;
/**
* SKU
*/
@Data
@Accessors(chain = true)
public static class Item implements Serializable {
/**
* SKU
*/
@NotNull(message = "商品 SKU 编号不能为空")
private Integer skuId;
/**
*
*/
@NotNull(message = "商品 SKU 数量不能为空")
private Integer quantity;
/**
*
*/
@NotNull(message = "是否选中不能为空")
private Boolean selected;
public Item() {
}
public Item(Integer skuId, Integer quantity, Boolean selected) {
this.skuId = skuId;
this.quantity = quantity;
this.selected = selected;
}
}
}

View File

@ -1,200 +0,0 @@
package cn.iocoder.mall.promotion.api.rpc.price.dto;
import cn.iocoder.mall.promotion.api.enums.activity.PromotionActivityTypeEnum;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List;
/**
* Request DTO
*/
@Data
@Accessors(chain = true)
public class PriceProductCalcRespDTO implements Serializable {
/**
*
*/
private List<ItemGroup> itemGroups;
/**
*
*/
private Integer couponCardId;
/**
*
*
* 1. 使 null
* 2. Item discountTotal
*/
private Integer couponCardDiscountTotal;
/**
*
*
* TODO
*/
private Postage postage;
/**
*
*/
private Fee fee;
/**
*
*
*
*/
@Data
@Accessors(chain = true)
public static class ItemGroup implements Serializable {
/**
*
*
* {@link PromotionActivityTypeEnum#FULL_PRIVILEGE}
*
* // TODO 芋艿,目前只会有【满减送】的情况,未来有新的促销方式,可能需要改成数组
*/
private Integer activityId;
/**
*
*
* 1. null
* 2. Item discountTotal
*/
private Integer activityDiscountTotal;
/**
*
*/
private List<Item> items;
// /**
// * 费用
// *
// * TODO 芋艿这里先偷懒postageTotal 字段用不到。
// */
// private Fee fee; // 注释原因,不用这里了
}
@Data
@Accessors(chain = true)
public static class Item implements Serializable {
/**
* SPU
*/
private Integer spuId;
/**
* SKU
*/
private Integer skuId;
/**
* Category
*/
private Integer cid;
// 非 SKU 自带信息
/**
*
*/
private Boolean selected;
/**
*
*/
private Integer buyQuantity;
/**
*
*
* {@link PromotionActivityTypeEnum#TIME_LIMITED_DISCOUNT}
*/
private Integer activityId;
/**
*
*/
private Integer originPrice;
/**
*
*/
private Integer buyPrice;
/**
*
*/
private Integer presentPrice;
/**
*
*
* {@link #presentTotal}
*/
private Integer buyTotal;
/**
*
*/
private Integer discountTotal;
/**
*
*
* presentPrice * quantity presentTotal
*
* presentPrice = 8.33 quantity = 3 presentTotal 24.99 25
*
*/
private Integer presentTotal;
}
/**
*
*/
@Data
@Accessors(chain = true)
public static class Fee implements Serializable {
/**
*
*/
private Integer buyTotal;
/**
*
*
*
*/
private Integer discountTotal;
/**
* TODO postage logistics
*/
private Integer postageTotal;
/**
*
*
* = - +
*/
private Integer presentTotal;
public Fee() {
}
public Fee(Integer buyTotal, Integer discountTotal, Integer postageTotal, Integer presentTotal) {
this.buyTotal = buyTotal;
this.discountTotal = discountTotal;
this.postageTotal = postageTotal;
this.presentTotal = presentTotal;
}
}
/**
*
*/
@Data
@Accessors(chain = true)
public static class Postage implements Serializable {
/**
*
*/
private Integer threshold;
}
}

View File

@ -1,83 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.security.user.core.context.UserSecurityContextHolder;
import cn.iocoder.mall.shopweb.controller.trade.vo.cart.CartDetailVO;
import cn.iocoder.mall.shopweb.service.trade.CartManager;
import cn.iocoder.security.annotations.RequiresAuthenticate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Set;
import static cn.iocoder.common.framework.vo.CommonResult.success;
@Api(tags = "购物车 API")
@RestController
@RequestMapping("/cart")
@Validated
public class CartController {
@Autowired
private CartManager cartManager;
@PostMapping("add")
@ApiOperation("添加商品到购物车")
@ApiImplicitParams({
@ApiImplicitParam(name = "skuId", value = "商品 SKU 编号", required = true, example = "1"),
@ApiImplicitParam(name = "quantity", value = "增加数量", required = true, example = "1024")
})
@RequiresAuthenticate
public CommonResult<Boolean> addCartItem(@RequestParam("skuId") Integer skuId,
@RequestParam("quantity") Integer quantity) {
cartManager.addCartItem(UserSecurityContextHolder.getUserId(), skuId, quantity);
return success(true);
}
@GetMapping("sum-quantity")
@ApiOperation("查询用户在购物车中的商品数量")
@RequiresAuthenticate
public CommonResult<Integer> sumCartItemQuantity() {
return success(cartManager.sumCartItemQuantity(UserSecurityContextHolder.getUserId()));
}
@GetMapping("/get-detail")
@ApiOperation("查询用户的购物车的商品列表")
@RequiresAuthenticate
public CommonResult<CartDetailVO> getCartDetail() {
return success(cartManager.getCartDetail(UserSecurityContextHolder.getUserId()));
}
@PostMapping("update-quantity")
@ApiOperation("更新购物车商品数量")
@ApiImplicitParams({
@ApiImplicitParam(name = "skuId", value = "商品 SKU 编号", required = true, example = "1"),
@ApiImplicitParam(name = "quantity", value = "增加数量", required = true, example = "1024")
})
@RequiresAuthenticate
public CommonResult<Boolean> updateCartItemQuantity(@RequestParam("skuId") Integer skuId,
@RequestParam("quantity") Integer quantity) {
cartManager.updateCartItemQuantity(UserSecurityContextHolder.getUserId(), skuId, quantity);
return success(true);
}
@PostMapping("update-selected")
@ApiOperation("更新购物车商品是否选中")
@ApiImplicitParams({
@ApiImplicitParam(name = "skuIds", value = "商品 SKU 编号数组", required = true, example = "1,3"),
@ApiImplicitParam(name = "selected", value = "是否选中", required = true, example = "true")
})
@RequiresAuthenticate
public CommonResult<Boolean> updateCartItemSelected(@RequestParam("skuIds") Set<Integer> skuIds,
@RequestParam("selected") Boolean selected) {
cartManager.updateCartItemSelected(UserSecurityContextHolder.getUserId(), skuIds, selected);
// 获得目前购物车明细
return success(true);
}
}

View File

@ -1,31 +0,0 @@
### /trade-order/confirm-create-order-info 基于商品,确认创建订单
GET {{shop-api-base-url}}/trade-order/confirm-create-order-info?skuId=33&quantity=1
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {{user-access-token}}
### /trade-order/confirm-create-order-info-from-cart 基于购物车,确认创建订单
GET {{shop-api-base-url}}/trade-order/confirm-create-order-info-from-cart
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {{user-access-token}}
### /trade-order/confirm-create-order-info-from-cart 基于商品,创建订单
POST {{shop-api-base-url}}/trade-order/create
Content-Type: application/json
Authorization: Bearer {{user-access-token}}
{
"userAddressId": 19,
"remark": "我是备注",
"orderItems": [
{
"skuId": 3,
"quantity": 1
}
]
}
### /trade-order/page 获得订单交易分页
GET {{shop-api-base-url}}/trade-order/page?status=1&pageNo=1&pageSize=10
Content-Type: application/x-www-form-urlencoded
###

View File

@ -1,84 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade;
import cn.iocoder.common.framework.util.HttpUtil;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.security.user.core.context.UserSecurityContextHolder;
import cn.iocoder.mall.shopweb.controller.trade.vo.order.*;
import cn.iocoder.mall.shopweb.service.trade.TradeOrderService;
import cn.iocoder.security.annotations.RequiresAuthenticate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import static cn.iocoder.common.framework.vo.CommonResult.success;
@Api(tags = "交易订单 API")
@RestController
@RequestMapping("/trade-order")
@Validated
public class TradeOrderController {
@Autowired
private TradeOrderService tradeOrderService;
@GetMapping("confirm-create-order-info")
@ApiOperation("基于商品,确认创建订单")
@ApiImplicitParams({
@ApiImplicitParam(name = "skuId", required = true, value = "商品 SKU 编号", example = "1024"),
@ApiImplicitParam(name = "quantity", required = true, value = "购买数量", example = "2"),
@ApiImplicitParam(name = "couponCardId", value = "优惠劵编号", example = "1"),
})
@RequiresAuthenticate
public CommonResult<TradeOrderConfirmCreateInfoRespVO> getTradeOrderConfirmCreateInfo(
@RequestParam("skuId") Integer skuId,
@RequestParam("quantity") Integer quantity,
@RequestParam(value = "couponCardId", required = false) Integer couponCardId) {
return success(tradeOrderService.getOrderConfirmCreateInfo(UserSecurityContextHolder.getUserId(), skuId, quantity, couponCardId));
}
@GetMapping("confirm-create-order-info-from-cart")
@ApiOperation("基于购物车,确认创建订单")
@ApiImplicitParam(name = "couponCardId", value = "优惠劵编号", example = "1")
@RequiresAuthenticate
public CommonResult<TradeOrderConfirmCreateInfoRespVO> getTradeOrderConfirmCreateInfoFromCart(
@RequestParam(value = "couponCardId", required = false) Integer couponCardId) {
return success(tradeOrderService.getOrderConfirmCreateInfoFromCart(UserSecurityContextHolder.getUserId(), couponCardId));
}
@PostMapping("create")
@ApiOperation("基于商品,创建订单")
@RequiresAuthenticate
public CommonResult<Integer> createTradeOrder(@RequestBody TradeOrderCreateReqVO createReqVO,
HttpServletRequest servletRequest) {
return success(tradeOrderService.createTradeOrder(UserSecurityContextHolder.getUserId(),
HttpUtil.getIp(servletRequest), createReqVO));
}
@GetMapping("create-from-cart")
@ApiOperation("基于购物车,创建订单")
@RequiresAuthenticate
public CommonResult<Integer> createTradeOrder(TradeOrderCreateFromCartReqVO createReqVO) {
return null;
}
@GetMapping("/get")
@ApiOperation("获得交易订单")
@ApiImplicitParam(name = "tradeOrderId", value = "交易订单编号", required = true)
public CommonResult<TradeOrderRespVO> getTradeOrder(@RequestParam("tradeOrderId") Integer tradeOrderId) {
return success(tradeOrderService.getTradeOrder(tradeOrderId));
}
@GetMapping("/page")
@ApiOperation("获得订单交易分页")
public CommonResult<PageResult<TradeOrderRespVO>> pageTradeOrder(TradeOrderPageReqVO pageVO) {
return success(tradeOrderService.pageTradeOrder(UserSecurityContextHolder.getUserId(), pageVO));
}
}

View File

@ -1,213 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade.vo.cart;
import cn.iocoder.mall.promotion.api.rpc.activity.dto.PromotionActivityRespDTO;
import cn.iocoder.mall.shopweb.controller.product.vo.attr.ProductAttrKeyValueRespVO;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
@ApiModel(value = "用户的购物车明细 Response VO") // TODO 芋艿swagger 文档完善
@Data
@Accessors(chain = true)
public class CartDetailVO {
/**
*
*/
private List<ItemGroup> itemGroups;
/**
*
*/
private Fee fee;
/**
*
*
*
*/
@Data
@Accessors(chain = true)
public static class ItemGroup {
/**
*
*/
private PromotionActivityRespDTO activity; // TODO 芋艿,偷懒
/**
*
*
* 1. null
* 2. Item discountTotal
*/
private Integer activityDiscountTotal;
/**
*
*/
private List<Sku> items;
}
@Data
@Accessors(chain = true)
public static class Sku {
// SKU 自带信息
/**
* sku
*/
private Integer id;
/**
* SPU
*/
private Spu spu;
/**
*
*/
private String picURL;
/**
*
*/
private List<ProductAttrKeyValueRespVO> attrs; // TODO 后面改下
/**
*
*/
private Integer price;
/**
*
*/
private Integer quantity;
// 非 SKU 自带信息
/**
*
*/
private Integer buyQuantity;
/**
*
*/
private Boolean selected;
/**
*
*/
private PromotionActivityRespDTO activity; // TODO 芋艿,偷懒
/**
*
*/
private Integer originPrice;
/**
*
*/
private Integer buyPrice;
/**
*
*/
private Integer presentPrice;
/**
*
*
* {@link #presentTotal}
*/
private Integer buyTotal;
/**
*
*/
private Integer discountTotal;
/**
*
*
* presentPrice * quantity presentTotal
*
* presentPrice = 8.33 quantity = 3 presentTotal 24.99 25
*
*/
private Integer presentTotal;
}
@Data
@Accessors(chain = true)
public static class Spu {
/**
* SPU
*/
private Integer id;
// ========== 基本信息 =========
/**
* SPU
*/
private String name;
/**
*
*/
private Integer cid;
/**
*
*
*
*
* 800*80015
*/
private List<String> picUrls;
}
/**
*
*/
@Data
@Accessors(chain = true)
public static class Fee {
/**
*
*/
private Integer buyTotal;
/**
*
*
*
*/
private Integer discountTotal;
/**
*
*/
private Integer postageTotal;
/**
*
*
* = - +
*/
private Integer presentTotal;
public Fee() {
}
public Fee(Integer buyTotal, Integer discountTotal, Integer postageTotal, Integer presentTotal) {
this.buyTotal = buyTotal;
this.discountTotal = discountTotal;
this.postageTotal = postageTotal;
this.presentTotal = presentTotal;
}
}
/**
* TODO
*/
@Data
@Accessors(chain = true)
public static class Postage {
/**
*
*/
private Integer threshold;
}
}

View File

@ -1,216 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade.vo.order;
import cn.iocoder.mall.promotion.api.rpc.activity.dto.PromotionActivityRespDTO;
import cn.iocoder.mall.promotion.api.rpc.coupon.dto.card.CouponCardAvailableRespDTO;
import cn.iocoder.mall.shopweb.controller.trade.vo.cart.CartDetailVO;
import cn.iocoder.mall.shopweb.controller.product.vo.attr.ProductAttrKeyValueRespVO;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
@ApiModel(value = "订单确认创建信息 Response VO") // TODO 芋艿swagger 文档完善
@Data
@Accessors(chain = true) // TODO 芋艿:和 CartDetailVO、ProductSkuCalcPriceRespVO 有点重复,后续要优化下;
public class TradeOrderConfirmCreateInfoRespVO {
/**
*
*/
private List<ItemGroup> itemGroups;
/**
*
*/
private Fee fee;
/**
* TODO
*/
private List<CouponCardAvailableRespDTO> couponCards;
/**
*
*
*
*/
@Data
@Accessors(chain = true)
public static class ItemGroup {
/**
*
*/
private PromotionActivityRespDTO activity; // TODO 芋艿,偷懒
/**
*
*
* 1. null
* 2. Item discountTotal
*/
private Integer activityDiscountTotal;
/**
*
*/
private List<CartDetailVO.Sku> items;
}
@Data
@Accessors(chain = true)
public static class Sku {
// SKU 自带信息
/**
* sku
*/
private Integer id;
/**
* SPU
*/
private Spu spu;
/**
*
*/
private String picURL;
/**
*
*/
private List<ProductAttrKeyValueRespVO> attrs; // TODO 后面改下
/**
*
*/
private Integer price;
/**
*
*/
private Integer quantity;
// 非 SKU 自带信息
/**
*
*/
private Integer buyQuantity;
/**
*
*/
private PromotionActivityRespDTO activity; // TODO 芋艿,偷懒
/**
*
*/
private Integer originPrice;
/**
*
*/
private Integer buyPrice;
/**
*
*/
private Integer presentPrice;
/**
*
*
* {@link #presentTotal}
*/
private Integer buyTotal;
/**
*
*/
private Integer discountTotal;
/**
*
*
* presentPrice * quantity presentTotal
*
* presentPrice = 8.33 quantity = 3 presentTotal 24.99 25
*
*/
private Integer presentTotal;
}
@Data
@Accessors(chain = true)
public static class Spu {
/**
* SPU
*/
private Integer id;
// ========== 基本信息 =========
/**
* SPU
*/
private String name;
/**
*
*/
private Integer cid;
/**
*
*
*
*
* 800*80015
*/
private List<String> picUrls;
}
/**
*
*/
@Data
@Accessors(chain = true)
public static class Fee {
/**
*
*/
private Integer buyTotal;
/**
*
*
*
*/
private Integer discountTotal;
/**
*
*/
private Integer postageTotal;
/**
*
*
* = - +
*/
private Integer presentTotal;
public Fee() {
}
public Fee(Integer buyTotal, Integer discountTotal, Integer postageTotal, Integer presentTotal) {
this.buyTotal = buyTotal;
this.discountTotal = discountTotal;
this.postageTotal = postageTotal;
this.presentTotal = presentTotal;
}
}
/**
* TODO
*/
@Data
@Accessors(chain = true)
public static class Postage {
/**
*
*/
private Integer threshold;
}
}

View File

@ -1,23 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade.vo.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
@ApiModel(value = "创建交易订单 VO基于购物车")
@Data
@Accessors(chain = true)
public class TradeOrderCreateFromCartReqVO {
@ApiModelProperty(name = "收件地址编号", required = true, example = "1")
@NotNull(message = "用户地址不能为空")
private Integer userAddressId;
@ApiModelProperty(name = "优惠劵编号", example = "1024")
private Integer couponCardId;
@ApiModelProperty(name = "备注", example = "1024")
private String remark;
}

View File

@ -1,45 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade.vo.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel(value = "创建交易订单 VO基于商品")
@Data
@Accessors(chain = true)
public class TradeOrderCreateReqVO {
@ApiModelProperty(name = "收件地址编号", required = true, example = "1")
@NotNull(message = "收件地址不能为空")
private Integer userAddressId;
@ApiModelProperty(name = "优惠劵编号", example = "1024")
private Integer couponCardId;
@ApiModelProperty(name = "备注", example = "1024")
private String remark;
/**
*
*/
@NotNull(message = "必须选择购买的商品")
private List<OrderItem> orderItems;
@ApiModel(value = "订单商品项")
@Data
@Accessors(chain = true)
public static class OrderItem {
@ApiModelProperty(name = "商品 SKU 编号", required = true, example = "111")
@NotNull(message = "商品 SKU 编号不能为空")
private Integer skuId;
@ApiModelProperty(name = "商品 SKU 购买数量", required = true, example = "1024")
@NotNull(message = "商品 SKU 购买数量不能为空")
@Min(value = 1, message = "商品 SKU 购买数量必须大于 0")
private Integer quantity;
}
}

View File

@ -1,53 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade.vo.order;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ApiModel("交易订单项 Response VO")
@Data
public class TradeOrderItemRespVO {
@ApiModelProperty(value = "id自增长", required = true)
private Integer id;
@ApiModelProperty(value = "订单编号", required = true)
private Integer orderId;
@ApiModelProperty(value = "订单项状态", required = true)
private Integer status;
@ApiModelProperty(value = "商品 SKU 编号", required = true)
private Integer skuId;
@ApiModelProperty(value = "商品 SPU 编号", required = true)
private Integer spuId;
@ApiModelProperty(value = "商品名字", required = true)
private String skuName;
@ApiModelProperty(value = "图片名字", required = true)
private String skuImage;
@ApiModelProperty(value = "商品数量", required = true)
private Integer quantity;
@ApiModelProperty(value = "原始单价,单位:分", required = true)
private Integer originPrice;
@ApiModelProperty(value = "购买单价,单位:分", required = true)
private Integer buyPrice;
@ApiModelProperty(value = "最终价格,单位:分", required = true)
private Integer presentPrice;
@ApiModelProperty(value = "购买总金额,单位:分", required = true)
private Integer buyTotal;
@ApiModelProperty(value = "优惠总金额,单位:分", required = true)
private Integer discountTotal;
@ApiModelProperty(value = "最终总金额,单位:分", required = true)
private Integer presentTotal;
@ApiModelProperty(value = "退款总金额,单位:分", required = true)
private Integer refundTotal;
@ApiModelProperty(value = "物流id")
private Integer logisticsId;
@ApiModelProperty(value = "售后状态", required = true)
private Integer afterSaleStatus;
@ApiModelProperty(value = "售后订单编号")
private Integer afterSaleOrderId;
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
}

View File

@ -1,17 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade.vo.order;
import cn.iocoder.common.framework.vo.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ApiModel("交易订单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class TradeOrderPageReqVO extends PageParam {
@ApiModelProperty(value = "订单状态", example = "1", notes = "参见 TradeOrderStatusEnum 枚举")
private Integer orderStatus;
}

View File

@ -1,70 +0,0 @@
package cn.iocoder.mall.shopweb.controller.trade.vo.order;
import lombok.*;
import io.swagger.annotations.*;
import java.util.*;
@ApiModel("订单交易 Response VO")
@Data
public class TradeOrderRespVO {
@ApiModelProperty(value = "订单编号", required = true)
private Integer id;
@ApiModelProperty(value = "用户编号", required = true)
private Integer userId;
@ApiModelProperty(value = "订单单号", required = true)
private String orderNo;
@ApiModelProperty(value = "订单状态", required = true)
private Integer orderStatus;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "订单结束时间")
private Date endTime;
@ApiModelProperty(value = "订单金额(总金额),单位:分", required = true)
private Integer buyPrice;
@ApiModelProperty(value = "优惠总金额,单位:分", required = true)
private Integer discountPrice;
@ApiModelProperty(value = "物流金额,单位:分", required = true)
private Integer logisticsPrice;
@ApiModelProperty(value = "最终金额,单位:分", required = true)
private Integer presentPrice;
@ApiModelProperty(value = "支付金额,单位:分", required = true)
private Integer payPrice;
@ApiModelProperty(value = "退款金额,单位:分", required = true)
private Integer refundPrice;
@ApiModelProperty(value = "付款时间")
private Date payTime;
@ApiModelProperty(value = "支付订单编号")
private Integer payTransactionId;
@ApiModelProperty(value = "支付渠道")
private Integer payChannel;
@ApiModelProperty(value = "配送类型", required = true)
private Integer deliveryType;
@ApiModelProperty(value = "发货时间")
private Date deliveryTime;
@ApiModelProperty(value = "收货时间")
private Date receiveTime;
@ApiModelProperty(value = "收件人名称", required = true)
private String receiverName;
@ApiModelProperty(value = "手机号", required = true)
private String receiverMobile;
@ApiModelProperty(value = "地区编码", required = true)
private Integer receiverAreaCode;
@ApiModelProperty(value = "收件详细地址", required = true)
private String receiverDetailAddress;
@ApiModelProperty(value = "售后状态", required = true)
private Integer afterSaleStatus;
@ApiModelProperty(value = "优惠劵编号")
private Integer couponCardId;
@ApiModelProperty(value = "创建时间", required = true)
private Date createTime;
/**
*
*
* // TODO 芋艿,后续考虑怎么优化下,目前是内嵌了别的 dto
*/
private List<TradeOrderItemRespVO> orderItems;
}