Commit a81b83d2 authored by 周健威's avatar 周健威

添加接口

parent 583f5827
...@@ -105,6 +105,39 @@ public class LmyxmonitorimageController extends BaseController<LmyxmonitorimageB ...@@ -105,6 +105,39 @@ public class LmyxmonitorimageController extends BaseController<LmyxmonitorimageB
return ObjectRestResponse.succ(result); return ObjectRestResponse.succ(result);
} }
@RequestMapping(value = "/app/unauth/orderInfo",method={RequestMethod.GET})
@ResponseBody
public ObjectRestResponse<String> order(String id) throws Exception {
Long timelong = new Date().getTime();
String uuid = timelong+ "";
String time = (timelong + 1L) + "";
String pvtKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALcPs3K2jRrdYSWFvsgMOogWgwa15kmEUC3AxlL4OwTOUFcxakZXKJdfBERK2Amz1ctf7RBGCq8WeAM07vcGSa9Ipp511w6YSezQIei748gN368o7lLfeXXE2ht8zLfCF05soLHtigjCYgM3pZPPfwRste+SV3G/Up8Ij/eW3hi1AgMBAAECgYANXw05fNITu0XkSr+jtxjzZcmOTO0UQ6DjpqgV2WHeOP+vTsG3f5hMbjlOj7T2CHe+UjRrsuIG5fpAKbamvoPVNQWT3C+PjA0xQqWU/LOnoIPfTI/JUYBkKtP3NAjib5bI61pqGJ0tLW4C6w1y3F0Qx0X8vyEnE9gLVuZ9c3+DwQJBAPGQc4kahnyKOQ0UO2+G0EjcuzLFkiZ6R83w5gBpe4i2EFGNzIrq8O3JxTI8n9nk+3CEXkvj6sEauRw/NyEsAtECQQDCAD95GBnADDZ4nshlhF0aA98+B37t2Uf/I7ZeRlT1jsdgeHsEAQXUUTRkQriAb1oX6GiEwjxx1OZ1+jSPvcilAkAhB5BUodTbuIaefDK4SCW4oL3T7mHScwvYY+T/D209vy8yB4J9SCyTRvB4swNkZsPemarPE6Xoq3++FgKyvXLRAkEAmCEZpRwBFVh+XpglDXZ+i6f9p+a44ktA6hJXMBZ3CRitwDi6PqmOqLAFJZoslIq9W4Ikc/bc72bEUj+ieBWbAQJAOGzhE6H3mR+XIM7S5mkZvjswtyGApjYuIq1Sm7b0aQm1L4IN9pXaHtQOhEnigPTMAexu/GX4LDyWlKZIcv8M+A==";
String original = "appKey=guangdong&uid="+uuid+"&timestamp="+time;
String sign = LoginDigestUtil.sign(original, pvtKey);
System.out.println(uuid);
System.out.println(time);
System.out.println(sign);
HttpRequest httpRequest = HttpRequest.post("https://smartplanting.cm-agri.com:442/plant-service/openApi/orderInfo?id="+ id);
Map<String, String> headers = CollUtil.newHashMap();
headers.put("appKey", "guangdong");
headers.put("uid", uuid);
headers.put("timestamp", time);
headers.put("sign", sign);
// Map<String, Object> form = CollUtil.newHashMap();
// form.put("moduleCode", "landResource");
// form.put("regionCode", "440200");
// form.put("startTime", "2023-12-01");
// form.put("endTime", "2024-01-01");
httpRequest.addHeaders(headers);
// httpRequest.form(form);
String result = httpRequest.execute().body();
return ObjectRestResponse.succ(result);
}
@Data @Data
public static class PublishMapDTO { public static class PublishMapDTO {
String workSpace; String workSpace;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment