ApiReportGenController.java
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.lhcredit.project.webbusiness.controller;
import cn.hutool.http.server.HttpServerRequest;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.lhcredit.framework.web.domain.AjaxResult;
import com.lhcredit.project.business.reportDirectoryData.service.QxbHttpUtils;
import com.lhcredit.project.business.reportMake.reportTemp.WebTempConfig;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 报告自调用数据接口
*/
@RestController()
@RequestMapping("web/reportApi")
public class ApiReportGenController {
public void tokenValid(HttpServerRequest request){
String token = request.getHeader("token");
if (!token.equals("78add0c8-4950-4d66-2b31-35780bfe64ec")){
throw new RuntimeException("验证失败");
}
}
@RequestMapping()
public AjaxResult bgxx(String name){
JSONObject map=new JSONObject();
map.put("name",name);
Object object = QxbHttpUtils.sendHttpRequest("http://lhapi.lhdna.com/api/qxb/api/changeRecords",map );
return null;
}
}