|
@@ -33,7 +33,6 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
import java.math.RoundingMode;
|
|
|
-import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
import java.util.Optional;
|
|
import java.util.Optional;
|
|
@@ -145,14 +144,18 @@ public class DistributePopularizeController {
|
|
|
* 个人推广用户每日订单情况折线图
|
|
* 个人推广用户每日订单情况折线图
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/get/order/brokenLine")
|
|
@GetMapping("/get/order/brokenLine")
|
|
|
- public Result<Map<Long, List<PersonDistributeBrokenLineView>>> getPersonDistributeBrokenLineView(Date firstDate) {
|
|
|
|
|
|
|
+ public Result<Map<Long, List<PersonDistributeBrokenLineView>>> getPersonDistributeBrokenLineView(Long firstDate, Long lastDate) {
|
|
|
Long userId = StpUserUtil.getLoginIdAsLong();
|
|
Long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
- if (firstDate == null) {
|
|
|
|
|
- firstDate = DateUtil.beginOfWeek(DateTime.now());
|
|
|
|
|
|
|
+ String first = null;
|
|
|
|
|
+ String end = null;
|
|
|
|
|
+ if (firstDate != null) {
|
|
|
|
|
+ first = DateUtil.format(DateTime.of(firstDate), "yyyy-MM-dd");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (lastDate != null) {
|
|
|
|
|
+ end = DateUtil.format(DateTime.of(lastDate), "yyyy-MM-dd");
|
|
|
}
|
|
}
|
|
|
- String date = DateUtil.format(firstDate, "yyyy-MM-dd");
|
|
|
|
|
List<PersonDistributeBrokenLineView> views = beanSearcher.searchAll(PersonDistributeBrokenLineView.class, MapUtils.builder()
|
|
List<PersonDistributeBrokenLineView> views = beanSearcher.searchAll(PersonDistributeBrokenLineView.class, MapUtils.builder()
|
|
|
- .field(PersonDistributeBrokenLineView::getDate, date).op(Operator.GreaterEqual)
|
|
|
|
|
|
|
+ .field(PersonDistributeBrokenLineView::getDate, first, end).op(Operator.Between)
|
|
|
.put("userId", String.format("dw.shared_id = %s", userId))
|
|
.put("userId", String.format("dw.shared_id = %s", userId))
|
|
|
.orderBy(PersonDistributeBrokenLineView::getDate).asc()
|
|
.orderBy(PersonDistributeBrokenLineView::getDate).asc()
|
|
|
.build());
|
|
.build());
|