Commit 39f5ab78 by 吕明尚

增加分页Vo

parent 874548cc
...@@ -11,6 +11,7 @@ import share.common.core.domain.AjaxResult; ...@@ -11,6 +11,7 @@ import share.common.core.domain.AjaxResult;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.common.vo.TableDataInfoVo;
import share.system.domain.SOrder; import share.system.domain.SOrder;
import share.system.domain.vo.SOrderDto; import share.system.domain.vo.SOrderDto;
import share.system.request.OrderRefundRequest; import share.system.request.OrderRefundRequest;
...@@ -37,7 +38,7 @@ public class SOrderController extends BaseController ...@@ -37,7 +38,7 @@ public class SOrderController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:order:list')") @PreAuthorize("@ss.hasPermi('system:order:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SOrder sOrder) public TableDataInfoVo list(SOrder sOrder)
{ {
return sOrderService.pageList(sOrder); return sOrderService.pageList(sOrder);
} }
......
package share.common.core.page; package share.common.core.page;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
...@@ -26,35 +25,6 @@ public class TableDataInfo implements Serializable ...@@ -26,35 +25,6 @@ public class TableDataInfo implements Serializable
private String msg; private String msg;
/** /**
* 总金额
*/
private BigDecimal totalAmount;
/**
* 实付金额
*/
private BigDecimal amount;
/**
* 已使用总金额
*/
private BigDecimal usedAmount;
/**
* 已使用实付金额
*/
private BigDecimal usedPayAmount;
/**
* 以退款总金额
*/
private BigDecimal refundAmount;
/**
* 以退款实付金额
*/
private BigDecimal refundPayAmount;
/**
* 表格数据对象 * 表格数据对象
*/ */
public TableDataInfo() public TableDataInfo()
...@@ -112,51 +82,5 @@ public class TableDataInfo implements Serializable ...@@ -112,51 +82,5 @@ public class TableDataInfo implements Serializable
this.msg = msg; this.msg = msg;
} }
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public BigDecimal getUsedAmount() {
return usedAmount;
}
public void setUsedAmount(BigDecimal usedAmount) {
this.usedAmount = usedAmount;
}
public BigDecimal getUsedPayAmount() {
return usedPayAmount;
}
public void setUsedPayAmount(BigDecimal usedPayAmount) {
this.usedPayAmount = usedPayAmount;
}
public BigDecimal getRefundAmount() {
return refundAmount;
}
public void setRefundAmount(BigDecimal refundAmount) {
this.refundAmount = refundAmount;
}
public BigDecimal getRefundPayAmount() {
return refundPayAmount;
}
public void setRefundPayAmount(BigDecimal refundPayAmount) {
this.refundPayAmount = refundPayAmount;
}
} }
package share.common.vo;
import share.common.core.page.TableDataInfo;
import java.math.BigDecimal;
public class TableDataInfoVo extends TableDataInfo {
/**
* 总金额
*/
private BigDecimal totalAmount;
/**
* 实付金额
*/
private BigDecimal amount;
/**
* 已使用总金额
*/
private BigDecimal usedAmount;
/**
* 已使用实付金额
*/
private BigDecimal usedPayAmount;
/**
* 以退款总金额
*/
private BigDecimal refundAmount;
/**
* 以退款实付金额
*/
private BigDecimal refundPayAmount;
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public BigDecimal getUsedAmount() {
return usedAmount;
}
public void setUsedAmount(BigDecimal usedAmount) {
this.usedAmount = usedAmount;
}
public BigDecimal getUsedPayAmount() {
return usedPayAmount;
}
public void setUsedPayAmount(BigDecimal usedPayAmount) {
this.usedPayAmount = usedPayAmount;
}
public BigDecimal getRefundAmount() {
return refundAmount;
}
public void setRefundAmount(BigDecimal refundAmount) {
this.refundAmount = refundAmount;
}
public BigDecimal getRefundPayAmount() {
return refundPayAmount;
}
public void setRefundPayAmount(BigDecimal refundPayAmount) {
this.refundPayAmount = refundPayAmount;
}
}
package share.system.service; package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import share.common.core.page.TableDataInfo; import share.common.vo.TableDataInfoVo;
import share.system.domain.SConsumerCoupon; import share.system.domain.SConsumerCoupon;
import share.system.domain.SOrder; import share.system.domain.SOrder;
import share.system.domain.vo.SOrderDto; import share.system.domain.vo.SOrderDto;
...@@ -191,5 +191,5 @@ public interface ISOrderService extends IService<SOrder> ...@@ -191,5 +191,5 @@ public interface ISOrderService extends IService<SOrder>
int modifyOrder(SOrderDto sOrderDto); int modifyOrder(SOrderDto sOrderDto);
TableDataInfo pageList(SOrder sOrder); TableDataInfoVo pageList(SOrder sOrder);
} }
...@@ -21,7 +21,6 @@ import org.springframework.stereotype.Service; ...@@ -21,7 +21,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import share.common.constant.Constants; import share.common.constant.Constants;
import share.common.core.page.PageDomain; import share.common.core.page.PageDomain;
import share.common.core.page.TableDataInfo;
import share.common.core.page.TableSupport; import share.common.core.page.TableSupport;
import share.common.core.redis.RedisUtil; import share.common.core.redis.RedisUtil;
import share.common.enums.*; import share.common.enums.*;
...@@ -31,6 +30,7 @@ import share.common.utils.DateUtil; ...@@ -31,6 +30,7 @@ import share.common.utils.DateUtil;
import share.common.utils.DateUtils; import share.common.utils.DateUtils;
import share.common.utils.SecurityUtils; import share.common.utils.SecurityUtils;
import share.common.utils.bean.BeanUtils; import share.common.utils.bean.BeanUtils;
import share.common.vo.TableDataInfoVo;
import share.system.domain.*; import share.system.domain.*;
import share.system.domain.vo.FrontTokenComponent; import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.SOrderDto; import share.system.domain.vo.SOrderDto;
...@@ -289,7 +289,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -289,7 +289,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
} }
@Override @Override
public TableDataInfo pageList(SOrder sOrder) { public TableDataInfoVo pageList(SOrder sOrder) {
List<SOrder> sOrders = selectSOrderList(sOrder); List<SOrder> sOrders = selectSOrderList(sOrder);
BigDecimal totalAmount = new BigDecimal("0.00"); BigDecimal totalAmount = new BigDecimal("0.00");
BigDecimal amount = new BigDecimal("0.00"); BigDecimal amount = new BigDecimal("0.00");
...@@ -323,7 +323,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -323,7 +323,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
int start = (pageNum - 1) * pageSize; int start = (pageNum - 1) * pageSize;
int end = Math.min(start + pageSize, sOrders.size()); int end = Math.min(start + pageSize, sOrders.size());
List<SOrder> pagedList = sOrders.subList(start, end); List<SOrder> pagedList = sOrders.subList(start, end);
TableDataInfo tableDataInfo = new TableDataInfo(); TableDataInfoVo tableDataInfo = new TableDataInfoVo();
tableDataInfo.setRows(pagedList); tableDataInfo.setRows(pagedList);
tableDataInfo.setTotal(sOrders.size()); tableDataInfo.setTotal(sOrders.size());
tableDataInfo.setCode(200); tableDataInfo.setCode(200);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment