From fe493ce3353faaa42708c1b85f61f398e3c6fa2f Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期二, 30 十二月 2025 17:55:09 +0800
Subject: [PATCH] AI对接

---
 ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/H5AICallbackController.java |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/H5AICallbackController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/H5AICallbackController.java
index 38e527b..1b27334 100644
--- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/H5AICallbackController.java
+++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/H5AICallbackController.java
@@ -15,6 +15,7 @@
 import com.ruoyi.system.utils.util.RsaSimpleUtil;
 import com.ruoyi.system.utils.wx.model.WeixinProperties;
 import com.ruoyi.system.utils.wx.tools.WxAppletTools;
+import com.ruoyi.system.utils.xiMaUtil.AesUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -127,4 +128,31 @@
         return "success";
     }
 
+
+
+    @PostMapping("/xiMaReportPush")
+    public String xiMaReportPush(JSONObject jsonObject) throws Exception {
+        TSysAiConfig sysAiConfig = sysAiConfigService.getById(1);
+        // 应用AES秘钥
+        String clientKey = sysAiConfig.getClientKey();
+        // 平台RSA公钥
+        String clientIV = sysAiConfig.getClientIV();
+
+        String data = jsonObject.getString("data");
+        // 解密
+        String raw = AesUtil.decrypt(clientKey, clientIV , data);
+        log.info("H5舌面报告推送,解密后:{}",raw);
+
+        return "success";
+    }
+
+    @PostMapping("/xiMaDoubleScreenReportPush")
+    public JSONObject xiMaDoubleScreenReportPush(JSONObject jsonObject) throws Exception {
+        log.info("双屏仪报告推送:{}",jsonObject);
+
+        JSONObject response = new JSONObject();
+        response.put("error_code",0);
+        return response;
+    }
+
 }

--
Gitblit v1.7.1