From 59a242f06b5a0c323438d5282b9f716022567bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E6=99=A8?= <136767481@qq.com> Date: Sat, 2 Aug 2025 14:58:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(backend):=20=E6=B7=BB=E5=8A=A0=E9=9B=86?= =?UTF-8?q?=E6=9D=90=E7=A4=BE=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 HomeController 类,实现集材社调用的接口 - 添加订单信息获取和更新功能 - 使用 Swagger 注解进行接口文档化 -集成幂等性注解防止重复提交 --- .../org/dromara/web/common/WxXcxUtils.java | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 ruoyi-admin/src/main/java/org/dromara/web/common/WxXcxUtils.java diff --git a/ruoyi-admin/src/main/java/org/dromara/web/common/WxXcxUtils.java b/ruoyi-admin/src/main/java/org/dromara/web/common/WxXcxUtils.java deleted file mode 100644 index 60a638b..0000000 --- a/ruoyi-admin/src/main/java/org/dromara/web/common/WxXcxUtils.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.dromara.web.common; - - -import cn.hutool.http.HttpRequest; -import cn.hutool.http.HttpUtil; -import com.alibaba.fastjson.JSONObject; - -/** - * @author Maosw - */ -public class WxXcxUtils { - - static String appid = "wxf1d78a0b58fc890c"; - static String secret = "e1a3e888471d48addf1a23e4c9ea7f84"; - - public static String getAccessToken(){ - String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appid+"&secret="+secret; - String result = HttpUtil.get(url); - JSONObject jsonObject = JSONObject.parseObject(result); - return jsonObject.get("access_token").toString(); - } - - public static JSONObject getUserPhoneNumber(String code){ - String accessToken = getAccessToken(); - String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token="+accessToken; - - JSONObject json = new JSONObject(); - json.put("code", code); - String result = HttpRequest.post(url).body(json.toString()).execute().body(); - - JSONObject jsonObject = JSONObject.parseObject(result); - return jsonObject; - } - -}