Bläddra i källkod

Merge branch 'test'

zhaoxian 2 år sedan
förälder
incheckning
c976a7a3a3

+ 6 - 3
ruixuan-live/src/main/java/com/ruixuan/report/controller/KuaishouLiveAccountReportController.java

@@ -112,9 +112,12 @@ public class KuaishouLiveAccountReportController extends BaseController {
 
 
     @ApiOperation(value = "账户数据报表")
-    @PostMapping("/getAccountDataReport")
-    public TableDataInfo getAccountDataReport(@RequestBody JSONObject request) {
-        List<JSONObject> list = KuaishouLiveAccountReportService.getAccountDataReport(request);
+    @GetMapping("/getAccountDataReport")
+    public TableDataInfo getAccountDataReport(@ApiParam("userId") @RequestParam(value = "userId", required = true) Long userId,
+                                              @ApiParam("accountIdList") @RequestParam(value = "accountIdList", required = false) String accountIdList,
+                                              @ApiParam("startDate") @RequestParam(value = "startDate", required = false) String startDate,
+                                              @ApiParam("endDate") @RequestParam(value = "endDate", required = false) String endDate) {
+        List<JSONObject> list = KuaishouLiveAccountReportService.getAccountDataReport(userId, accountIdList, startDate, endDate);
         return getDataTable(list);
     }
 

+ 2 - 3
ruixuan-live/src/main/java/com/ruixuan/report/service/IKuaishouLiveAccountReportService.java

@@ -1,7 +1,6 @@
 package com.ruixuan.report.service;
 
 import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.JSONPObject;
 import com.ruixuan.common.utils.Result;
 
 import java.util.List;
@@ -22,7 +21,7 @@ public interface IKuaishouLiveAccountReportService {
 
     List<JSONObject> getOperateCostList(Long userId, String startDate, String endDate);
 
-    JSONObject getOperateCostTrendChartList(Long userId,String type, String startDate, String endDate);
+    JSONObject getOperateCostTrendChartList(Long userId, String type, String startDate, String endDate);
 
     JSONObject getStatisticalReportHead(JSONObject request);
 
@@ -30,7 +29,7 @@ public interface IKuaishouLiveAccountReportService {
 
     List<JSONObject> nodeAccountCost(JSONObject request);
 
-    List<JSONObject> getAccountDataReport(JSONObject request);
+    List<JSONObject> getAccountDataReport(Long userId, String accountIdList, String startDate, String endDate);
 
     List<JSONObject> exportAccountDataReport(JSONObject request);
 

+ 3 - 4
ruixuan-live/src/main/java/com/ruixuan/report/service/impl/KuaishouLiveAccountReportServiceImpl.java

@@ -1,5 +1,6 @@
 package com.ruixuan.report.service.impl;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.ruixuan.common.core.domain.entity.SysUser;
 import com.ruixuan.common.utils.Check;
@@ -300,12 +301,10 @@ public class KuaishouLiveAccountReportServiceImpl implements IKuaishouLiveAccoun
     }
 
     @Override
-    public List<JSONObject> getAccountDataReport(JSONObject request) {
-        String startDate = request.getString("startDate");
-        String endDate = request.getString("endDate");
+    public List<JSONObject> getAccountDataReport(Long userId, String accountIdList, String startDate, String endDate) {
         //整理入参时间
         Map<String, Object> map = getDateTime(startDate, endDate);
-        map.put("accountIdList", request.getJSONArray("accountIdList"));
+        map.put("accountIdList", JSONArray.parseArray(accountIdList));
         String type = map.get("type").toString();
         String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.getKuaishouAccountReport());
         System.out.println(filedAll);