Browse Source

👎 商品订单全部导出不用分页

sj
Loki 2 years ago
parent
commit
d84528ee14
  1. 10
      zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java
  2. 2
      zsw-bxg/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java
  3. 4
      zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java

10
zsw-bxg/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java

@ -365,7 +365,8 @@ public class StoreOrderController {
@RequestParam(name = "listContent") String listContent) throws IOException, ParseException {
List<YxStoreOrderDto> list;
if (StringUtils.isEmpty(listContent)) {
list = getYxStoreList(criteria, pageable, orderStatus, orderType).getContent();
// 到处全部走这里直接把条件去掉了 如果需要增加导出本页可以对照git增加上分页
list = getYxStoreList(criteria, orderStatus, orderType);
} else {
List<String> idList = JSONArray.parseArray(listContent).toJavaList(String.class);
list = yxStoreOrderService.queryAll(idList).getContent();
@ -377,18 +378,17 @@ public class StoreOrderController {
* 下载数据
*
* @param criteria criteria
* @param pageable pageable
* @param orderStatus orderStatus
* @param orderType orderType
* @return Map
*/
private AdminOrderDto getYxStoreList(YxStoreOrderQueryCriteria criteria,
Pageable pageable,
private List<YxStoreOrderDto> getYxStoreList(YxStoreOrderQueryCriteria criteria,
String orderStatus,
String orderType) {
YxStoreOrderQueryCriteria newCriteria = this.handleQuery(criteria, orderStatus, orderType);
return yxStoreOrderService.queryAll(newCriteria, pageable);
List<YxStoreOrder> list = yxStoreOrderService.queryAll(newCriteria);
return yxStoreOrderService.newAssemble(list);
}

2
zsw-bxg/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java

@ -256,6 +256,8 @@ public interface YxStoreOrderService extends BaseService<YxStoreOrder>{
*/
AdminOrderDto queryManyType(String[] typeList, Pageable pageable, YxStoreOrderQueryCriteria criteria, String orderStatus);
List<YxStoreOrderDto> newAssemble(List<YxStoreOrder> orderList);
/**
* 查询数据分页
* @param criteria 条件

4
zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java

@ -110,7 +110,6 @@ import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
@ -2574,7 +2573,8 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
* @param orderList 订单列表
* @return 组装后的订单列表
*/
private List<YxStoreOrderDto> newAssemble(List<YxStoreOrder> orderList){
@Override
public List<YxStoreOrderDto> newAssemble(List<YxStoreOrder> orderList){
//返回的数据List
List<YxStoreOrderDto> dtoList = new ArrayList<>();
if (!orderList.isEmpty()){

Loading…
Cancel
Save