lcl 1 year ago
parent
commit
b2f855f560

BIN
.DS_Store


BIN
src/.DS_Store


BIN
src/main/.DS_Store


BIN
src/main/java/.DS_Store


BIN
src/main/java/com/.DS_Store


BIN
src/main/java/com/ym/.DS_Store


BIN
src/main/java/com/ym/adminap/.DS_Store


+ 8 - 6
src/main/java/com/ym/adminap/controller/DesController.java

@@ -17,7 +17,7 @@ public class DesController {
 
 	@RequestMapping("/des")
 	public String des() {
-		String value = DesUtil.encrypt("{\"UserId\":5438}");
+		String value = DesUtil.encrypt("{\"UserId\":\"5436\",\"Balance\":\"0.05\",\"NoticeUrl\":\"https://xxx.xxxxx.com:8030/trans/paynotify4\",\"OrderNo\":\"11000000000002202307261004285640\"}");
 		//发送请求
 		// try {
 		// 	String content = HttpClientOriginUtil.doGet("https://ap.yunmic.com/api/v1/users/querybalance?value=" + value);
@@ -31,11 +31,13 @@ public class DesController {
 		// } catch (Exception e) {
 		// 	e.printStackTrace();
 		// }
-		String content = "";
-		MultiValueMap<String, String> param = new LinkedMultiValueMap<String, String>();
-		param.add("value", value);
-		content = HttpRestUtils.post("https://ap.yunmic.com/api/v1/users/querybalance", param);
+		// String content = "";
+		// MultiValueMap<String, String> param = new LinkedMultiValueMap<String, String>();
+		// param.add("value", value);
+		// content = HttpRestUtils.post("http://localhost:5201/api/v1/users/usebalance", param);
+
+		// String value = DesUtil.decrypt("yfYokORyAWCPn0wPy3rTmPjTLxD2JGBo3I7i0nyUL+bbRgCu9Y7j5gq4N9ho pq+VkPkvw1yn9FZTpqyJ+4c7lScJbEIZCj0+mevk/l8Zugakouy72fKZ3bgi eZoz+UpV1UQ2TyW6//sU0tIZ17tggOteXxVSfeEJ7ltEd+Tyn/Uj2hYW5DOj 5Hx00wpx77FnNPXZVL4t2owsabtt8KbTQA==");
 		
-		return content;
+		return value;
 	}
 }

+ 1 - 1
src/main/java/com/ym/adminap/util/HttpRestUtils.java

@@ -36,7 +36,7 @@ public class HttpRestUtils {
             // headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
             HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<MultiValueMap<String, String>>(params, headers);
             // 执行HTTP请求
-            ResponseEntity<String> response = client.exchange(url, HttpMethod.POST, requestEntity, String.class);
+            ResponseEntity<String> response = client.exchange(url, method, requestEntity, String.class);
             return response.getBody();
         } catch (Exception e) {
             return "";