|
|
@@ -14,6 +14,8 @@ import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.net.URLEncoder; |
|
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
|
|
|
|
/** |
|
|
@@ -87,4 +89,23 @@ public class DingInfoPullController { |
|
|
|
public String init() { |
|
|
|
return procDefManage.init(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "系统流程配置初始化", notes = "系统流程配置初始化") |
|
|
|
@GetMapping("/test") |
|
|
|
public String test() throws NoSuchAlgorithmException, UnsupportedEncodingException { |
|
|
|
String appSecret = "e066f496194540afa829c66983d4710e"; |
|
|
|
String appkey = "8fb070a1f1194b2ebffdc6f596bb8a96"; |
|
|
|
String dataName = URLEncoder.encode("丽水市数管公司","UTF-8"); |
|
|
|
long timestamp = System.currentTimeMillis(); |
|
|
|
String sign = CryptUtils.MD5Encode(appkey + appSecret + timestamp); |
|
|
|
String url = "https://interface.ls.local/a/api/shared/1689239219101?data_name=" + dataName + "&appKey=" + appkey + |
|
|
|
"&sign=" + sign + "&requestTime=" + timestamp; |
|
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
|
log.info("url:" + url); |
|
|
|
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); |
|
|
|
|
|
|
|
System.out.println(JSON.toJSONString(forEntity)); |
|
|
|
|
|
|
|
return JSON.toJSONString(forEntity); |
|
|
|
} |
|
|
|
} |