|
|
@@ -12,6 +12,7 @@ import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.CustomerServiceRenewOrderRecordMapper;
|
|
|
import com.cyksj.mapper.GroupsRelationMapper;
|
|
|
+import com.cyksj.mapper.OrderDonMapper;
|
|
|
import com.cyksj.mapper.UserMapper;
|
|
|
import com.cyksj.mapper.corp.CorpUserAuthMapper;
|
|
|
import com.cyksj.mapper.manage.CustomerServiceEveryMonthDetailMapper;
|
|
|
@@ -40,9 +41,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/*
|
|
|
@@ -79,7 +78,7 @@ public class StatisticsDataController {
|
|
|
|
|
|
private final CorpUserAuthMapper corpUserAuthMapper;
|
|
|
|
|
|
- private final HttpServletRequest request;
|
|
|
+ private final OrderDonMapper orderDonMapper;
|
|
|
|
|
|
/**
|
|
|
* 查询统计数据
|
|
|
@@ -384,7 +383,7 @@ public class StatisticsDataController {
|
|
|
* 获取每日平台订单折线数据
|
|
|
*/
|
|
|
@GetMapping("/get/plat/brokenLine")
|
|
|
- public Result<Map<Long, List<PlatOrderDonBrokenLineView>>> getPlatBrokenLine(Long firstDate, Long lastDate) {
|
|
|
+ public Result<BrokenLineObjView> getPlatBrokenLine(Long firstDate, Long lastDate) {
|
|
|
String first = null;
|
|
|
String end = null;
|
|
|
if (firstDate != null) {
|
|
|
@@ -397,7 +396,9 @@ public class StatisticsDataController {
|
|
|
.field(PersonDistributeBrokenLineView::getDate, first, end).op(Operator.Between)
|
|
|
.orderBy(PersonDistributeBrokenLineView::getDate).asc()
|
|
|
.build());
|
|
|
+ BrokenLineObjView brokenLineObjView = orderDonMapper.selectPlatBrokenLineMoney(first, end);
|
|
|
Map<Long, List<PlatOrderDonBrokenLineView>> goodsMap = views.stream().collect(Collectors.groupingBy(PlatOrderDonBrokenLineView::getGoodsId));
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(goodsMap);
|
|
|
+ brokenLineObjView.setGoodsData(goodsMap);
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(brokenLineObjView);
|
|
|
}
|
|
|
}
|