소스 검색

第三方接口开发修改

yurk 2 년 전
부모
커밋
912064d7ff

+ 3 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -1,6 +1,7 @@
 package com.management.platform.controller;
 
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -1232,8 +1233,8 @@ public class ReportController {
     /*提供第三方接口获取日报数据*/
     @LimitRequest(count = 10)
     @PostMapping("/getReportListByToken")
-    public HttpRespMsg getReportListByToken(@RequestParam String token, @RequestParam String startDate, @RequestParam String endDate){
-        return reportService.getReportListByToken(token,startDate,endDate);
+    public HttpRespMsg getReportListByToken(@RequestBody String json){
+        return reportService.getReportListByToken(json);
     }
 
     @GetMapping("/fixIssue")

+ 14 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/vo/TokenVo.java

@@ -0,0 +1,14 @@
+package com.management.platform.entity.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class TokenVo {
+    public String token;
+    public String startDate;
+    public String endDate;
+}

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ReportService.java

@@ -83,7 +83,7 @@ public interface ReportService extends IService<Report> {
 
     HttpRespMsg denyHisReport(Integer hisId, String reason, HttpServletRequest request);
 
-    HttpRespMsg getReportListByToken(String token, String startDate, String endDate);
+    HttpRespMsg getReportListByToken(String json);
 
     HttpRespMsg fixIssue();
 

+ 6 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -1,5 +1,6 @@
 package com.management.platform.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -3963,8 +3964,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     }
 
     @Override
-    public HttpRespMsg getReportListByToken(String token, String startDate, String endDate) {
+    public HttpRespMsg getReportListByToken(String json) {
         HttpRespMsg msg=new HttpRespMsg();
+        TokenVo tokenVo = JSON.parseObject(json, TokenVo.class);
+        String token = tokenVo.getToken();
+        String startDate =tokenVo.getStartDate();
+        String endDate = tokenVo.getEndDate();
         DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
         DateFormat dft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         LocalDate openDate = LocalDate.parse(startDate, df);