ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/H5AICallbackController.java
@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -134,7 +135,7 @@ @PostMapping("/xiMaReportPush") public JSONObject xiMaReportPush(JSONObject json) throws Exception { public JSONObject xiMaReportPush(@RequestBody JSONObject json){ TSysAiConfig sysAiConfig = sysAiConfigService.getById(1); // 应用AES秘钥 String clientKey = sysAiConfig.getClientKey(); @@ -217,7 +218,7 @@ } @PostMapping("/xiMaDoubleScreenReportPush") public JSONObject xiMaDoubleScreenReportPush(JSONObject jsonObject) throws Exception { public JSONObject xiMaDoubleScreenReportPush(@RequestBody JSONObject jsonObject){ log.info("双屏仪报告推送:{}",jsonObject); // 主体信息 String reportTime = jsonObject.getString("report_time"); // 报告时间 ruoyi-system/src/main/java/com/ruoyi/system/utils/xiMaUtil/AesUtil.java
@@ -1,16 +1,12 @@ package com.ruoyi.system.utils.xiMaUtil; import java.security.Security; import org.bouncycastle.jce.provider.BouncyCastleProvider; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import org.bouncycastle.jce.provider.BouncyCastleProvider; import java.security.Security; /** * @@ -41,8 +37,8 @@ byte[] iv = Base64.getDecoder().decode(keyStr); byte[] key = Base64.getDecoder().decode(keyStr); */ String key = "ciicciicciicciic"; String iv = "ciic2022ciic2022"; String key = "7bc47ce80ff74c1cbebad1ced111243d"; String iv = "69b84732eace4e6a"; String content = "1234567890"; String encrypted = encrypt(key, iv, content); System.out.println("加密后: " + encrypted);