- 修改订单 page 返回类,增加 total 条数
This commit is contained in:
@@ -2,14 +2,12 @@ package cn.iocoder.mall.order.application.controller.admins;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.order.api.OrderService;
|
||||
import cn.iocoder.mall.order.api.dto.OrderItemUpdateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderPageBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderQueryDTO;
|
||||
import cn.iocoder.mall.order.api.dto.*;
|
||||
import cn.iocoder.mall.order.application.convert.OrderConvertAPP;
|
||||
import cn.iocoder.mall.order.application.vo.OrderItemUpdateVO;
|
||||
import cn.iocoder.mall.order.application.vo.OrderLogisticsVO;
|
||||
import cn.iocoder.mall.order.application.vo.OrderPageQueryVO;
|
||||
import cn.iocoder.mall.order.application.vo.OrderPageVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -34,10 +32,9 @@ public class AdminsOrderController {
|
||||
|
||||
@GetMapping("page")
|
||||
@ApiOperation("订单列表")
|
||||
public CommonResult<List<OrderPageBO>> getOrderPage(@Validated OrderPageQueryVO orderPageQueryVO) {
|
||||
public CommonResult<OrderPageBO> getOrderPage(@Validated OrderPageQueryVO orderPageQueryVO) {
|
||||
OrderQueryDTO orderQueryDTO = OrderConvertAPP.INSTANCE.convertPageBO(orderPageQueryVO);
|
||||
CommonResult<List<OrderPageBO>> result = orderService.getOrderPage(orderQueryDTO);
|
||||
return result;
|
||||
return orderService.getOrderPage(orderQueryDTO);
|
||||
}
|
||||
|
||||
@PutMapping("order_item/update")
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.iocoder.mall.order.application.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -34,16 +35,27 @@ public class OrderPageQueryVO implements Serializable {
|
||||
* 付款时间(待发货)
|
||||
*/
|
||||
@ApiModelProperty("start付款时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startPaymentTime;
|
||||
@ApiModelProperty("end付款时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endPaymentTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("start订单创建时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startCreateTime;
|
||||
@ApiModelProperty("end订单创建时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endCreateTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty("start成交时间")
|
||||
private Date startClosingTime;
|
||||
@ApiModelProperty("end成交时间")
|
||||
private Date endClosingTime;
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
@@ -64,6 +76,8 @@ public class OrderPageQueryVO implements Serializable {
|
||||
", endPaymentTime=" + endPaymentTime +
|
||||
", startCreateTime=" + startCreateTime +
|
||||
", endCreateTime=" + endCreateTime +
|
||||
", startClosingTime=" + startClosingTime +
|
||||
", endClosingTime=" + endClosingTime +
|
||||
", deleted=" + deleted +
|
||||
", pageNo=" + pageNo +
|
||||
", pageSize=" + pageSize +
|
||||
@@ -133,6 +147,24 @@ public class OrderPageQueryVO implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getStartClosingTime() {
|
||||
return startClosingTime;
|
||||
}
|
||||
|
||||
public OrderPageQueryVO setStartClosingTime(Date startClosingTime) {
|
||||
this.startClosingTime = startClosingTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getEndClosingTime() {
|
||||
return endClosingTime;
|
||||
}
|
||||
|
||||
public OrderPageQueryVO setEndClosingTime(Date endClosingTime) {
|
||||
this.endClosingTime = endClosingTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package cn.iocoder.mall.order.application.vo;
|
||||
|
||||
import cn.iocoder.mall.order.api.dto.OrderBO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单分页 vo
|
||||
*
|
||||
* @author Sin
|
||||
* @time 2019-03-27 21:23
|
||||
*/
|
||||
@ApiModel("订单VO")
|
||||
public class OrderPageVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
@ApiModelProperty("分页下表当前")
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 总条数
|
||||
*/
|
||||
@ApiModelProperty("总条数")
|
||||
private Integer total;
|
||||
/**
|
||||
* 订单 list
|
||||
*/
|
||||
@ApiModelProperty("订单信息")
|
||||
private List<OrderBO> orders;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OrderPageVO{" +
|
||||
"pageNo=" + pageNo +
|
||||
", total=" + total +
|
||||
", orders=" + orders +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Integer getPageNo() {
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
public OrderPageVO setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public OrderPageVO setTotal(Integer total) {
|
||||
this.total = total;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<OrderBO> getOrders() {
|
||||
return orders;
|
||||
}
|
||||
|
||||
public OrderPageVO setOrders(List<OrderBO> orders) {
|
||||
this.orders = orders;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user