Merge branch 'dev' into hph
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@@ -22,6 +24,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -868,8 +871,16 @@ public class OrderService {
|
||||
}
|
||||
|
||||
|
||||
public Result findOrder(Integer shopId, String status, Integer page, Integer size, String orderNo) {
|
||||
String day = DateUtils.getDay();
|
||||
public Result findOrder(Integer shopId, String status, Integer page, Integer size, String orderNo,
|
||||
Date startTime, Date endTime) {
|
||||
|
||||
String day = null;
|
||||
if (startTime == null && endTime == null) {
|
||||
startTime = DateUtil.beginOfDay(DateUtil.date());
|
||||
endTime = DateUtil.endOfDay(DateUtil.date());
|
||||
day = DateUtils.getDay();
|
||||
}
|
||||
|
||||
PageHelperUtil.startPage(page, size);
|
||||
String orderType = "";
|
||||
if (StringUtils.isNotEmpty(status)) {
|
||||
@@ -881,7 +892,8 @@ public class OrderService {
|
||||
}
|
||||
log.info("orderType:" + orderType);
|
||||
log.info("status:" + status);
|
||||
List<OrderPo> list = tbOrderInfoMapper.selectAllByShop(shopId, orderType, day, orderNo);
|
||||
List<OrderPo> list = tbOrderInfoMapper.selectAllByShop(shopId, orderType, day, orderNo,
|
||||
startTime == null ? null : startTime.getTime(), endTime == null ? null : endTime.getTime());
|
||||
|
||||
for (OrderPo orderInfo : list) {
|
||||
if (StringUtils.isEmpty(orderInfo.getImgUrl())) {
|
||||
@@ -894,7 +906,7 @@ public class OrderService {
|
||||
}
|
||||
orderInfo.setSkuInfos(skuInfoPos);
|
||||
orderInfo.setZdNo("POS");
|
||||
orderInfo.setNames(orderInfo.getProductName().split(","));
|
||||
orderInfo.setNames(orderInfo.getProductName() == null ? new String[]{""} : orderInfo.getProductName().split(","));
|
||||
}
|
||||
PageInfo pageInfo = new PageInfo(list);
|
||||
log.info("获取订单:{}", JSONUtil.toJSONString(pageInfo));
|
||||
|
||||
Reference in New Issue
Block a user