|
@@ -199,7 +199,7 @@ public class KwaiXiaoDianReportController {
|
|
|
|
|
|
|
|
|
@GetMapping("/getGmvHours")
|
|
|
- public JSONObject getGmvHours(Long userId, Long companyId) {
|
|
|
+ public JSONObject getGmvHours(Long userId, Long companyId, Integer hourType) {
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
try {
|
|
|
if (Check.isNull(userId)) {
|
|
@@ -249,7 +249,12 @@ public class KwaiXiaoDianReportController {
|
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
requestMap.put("date", DateUtils.strDateToInt(nowDate));
|
|
|
List<JSONObject> today = kwaiXiaoDianReportService.getGmvHours(requestMap);
|
|
|
- String lastDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1); // 日期 -1
|
|
|
+ String lastDate = null;
|
|
|
+ if (hourType == 1) {
|
|
|
+ lastDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1); // 日期 -1
|
|
|
+ } else if (hourType == 2) {
|
|
|
+ lastDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -6); // 日期 -1
|
|
|
+ }
|
|
|
requestMap.put("date", DateUtils.strDateToInt(lastDate));
|
|
|
List<JSONObject> yesterday = kwaiXiaoDianReportService.getGmvHours(requestMap);
|
|
|
JSONObject data = new JSONObject();
|