Browse Source

删除coze识别图片信息,添加阿里云识别图片信息

zhouzeyu 4 months ago
parent
commit
0b4780195b

+ 23 - 11
tr-dependencies/pom.xml

@@ -94,6 +94,12 @@
         <spring-boot.version>2.7.8</spring-boot.version>
 
         <tianai.version>1.5.1</tianai.version>
+
+        <core.version>3.5.1</core.version>
+
+        <javase.version>3.5.1</javase.version>
+
+        <alibaba.version>2.21.0</alibaba.version>
     </properties>
 
 
@@ -571,17 +577,6 @@
                 <version>${spring-boot.version}</version>
             </dependency>
 
-            <dependency>
-                <groupId>com.coze</groupId>
-                <artifactId>coze-api</artifactId>
-                <version>${coze.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>com.squareup.okhttp3</groupId>
-                        <artifactId>okhttp</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
 
             <dependency>
                 <groupId>cloud.tianai.captcha</groupId>
@@ -589,6 +584,23 @@
                 <version>${tianai.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>com.google.zxing</groupId>
+                <artifactId>core</artifactId>
+                <version>${core.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.google.zxing</groupId>
+                <artifactId>javase</artifactId>
+                <version>${javase.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>dashscope-sdk-java</artifactId>
+                <version>${alibaba.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>

+ 6 - 6
tr-modules/tr-module-smartFollowUp/pom.xml

@@ -64,10 +64,6 @@
             <version>0.0.9</version>
         </dependency>
 
-        <dependency>
-            <groupId>com.coze</groupId>
-            <artifactId>coze-api</artifactId>
-        </dependency>
 
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -78,14 +74,18 @@
         <dependency>
             <groupId>com.google.zxing</groupId>
             <artifactId>core</artifactId>
-            <version>3.5.1</version>
         </dependency>
         <dependency>
             <groupId>com.google.zxing</groupId>
             <artifactId>javase</artifactId>
-            <version>3.5.1</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dashscope-sdk-java</artifactId>
+        </dependency>
+
+
         <dependency>
             <groupId>cn.tr</groupId>
             <artifactId>tr-spring-boot-starter-plugin-biz-tenant</artifactId>

+ 9 - 10
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/config/CozeConfig.java → tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/config/ALiYunConfig.java

@@ -1,6 +1,6 @@
 package cn.tr.module.smart.app.config;
 
-import cn.tr.module.smart.common.properties.CozeProperties;
+import cn.tr.module.smart.common.properties.ALiYunProperties;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.cache.annotation.EnableCaching;
 import org.springframework.context.annotation.Bean;
@@ -16,16 +16,17 @@ import java.util.List;
 
 /**
  * @Author zzy
- * @Data 2025/7/2
+ * @Data 2025/7/29
  * @Version 1.0
  * @Description XXX
  */
 @Configuration
 @EnableCaching
-@EnableConfigurationProperties(CozeProperties.class)
-public class CozeConfig {
+@EnableConfigurationProperties(ALiYunProperties.class)
+public class ALiYunConfig {
+
     @Bean
-    public RestTemplate cozeRestTemplate(CozeProperties properties) {
+    public RestTemplate aliyunRestTemplate(ALiYunProperties properties) {
         RestTemplate restTemplate = new RestTemplate(getClientHttpRequestFactory(properties));
         // 添加JSON消息转换器
         List<HttpMessageConverter<?>> converters = new ArrayList<>();
@@ -34,10 +35,8 @@ public class CozeConfig {
         return restTemplate;
     }
 
-    private ClientHttpRequestFactory getClientHttpRequestFactory(CozeProperties properties) {
-        SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
-        factory.setConnectTimeout(properties.getTimeout());
-        factory.setReadTimeout(properties.getTimeout());
-        return factory;
+    private ClientHttpRequestFactory getClientHttpRequestFactory(ALiYunProperties properties) {
+        return new SimpleClientHttpRequestFactory();
+
     }
 }

+ 0 - 68
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/config/CozeOAuthTokenConfig.java

@@ -1,68 +0,0 @@
-package cn.tr.module.smart.app.config;
-
-import cn.tr.module.smart.common.properties.CozeProperties;
-import cn.tr.module.sys.tenant.dto.OAuthTokenAddCacheDTO;
-import cn.tr.module.sys.tenant.util.CacheUtil;
-import com.coze.openapi.client.auth.OAuthToken;
-import com.coze.openapi.service.auth.JWTOAuthClient;
-import org.springframework.context.annotation.Configuration;
-import javax.annotation.Resource;
-
-/**
- * @Author zzy
- * @Data 2025/7/15
- * @Version 1.0
- * @Description XXX
- */
-@Configuration
-public class CozeOAuthTokenConfig {
-
-    @Resource
-    private CozeProperties cozeProperties;
-    @Resource
-    private CacheUtil cacheUtil;
-
-    public OAuthTokenAddCacheDTO getAccessToken() {
-        // 从缓存中获取token
-        OAuthTokenAddCacheDTO token = cacheUtil.getToken();
-        if (token != null) {
-            return token;
-        }
-        //构建JWT认证客户端
-        JWTOAuthClient oauth = buildJwtOAuthClient();
-        // 全新获取令牌
-        try {
-            OAuthToken newToken = oauth.getAccessToken();
-            OAuthTokenAddCacheDTO newCacheToken = OAuthTokenAddCacheDTO.builder()
-                    .accessToken(newToken.getAccessToken())
-                    .refreshToken(newToken.getRefreshToken())
-                    .tokenType(newToken.getTokenType())
-                    .expiresIn(newToken.getExpiresIn())
-//                    .generateTime(new Date())
-                    .build();
-
-            return cacheUtil.setToken(newCacheToken);
-        } catch (Exception e) {
-            throw new RuntimeException("无法获取Coze访问令牌", e);
-        }
-    }
-
-    private JWTOAuthClient buildJwtOAuthClient() {
-        try {
-            return new JWTOAuthClient.JWTOAuthBuilder()
-                    .clientID(cozeProperties.getClientId())
-                    .privateKey(cozeProperties.getPrivateKey())
-                    .publicKey(cozeProperties.getPublicKey())
-                    .baseURL(cozeProperties.getBaseUrl())
-                    .jwtBuilder(new ExampleJWTBuilder())
-                    .build();
-        } catch (Exception e) {
-            throw new RuntimeException("构建JWT认证客户端失败",e);
-        }
-    }
-
-
-}
-
-
-

+ 0 - 43
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/config/ExampleJWTBuilder.java

@@ -1,43 +0,0 @@
-package cn.tr.module.smart.app.config;
-
-import com.coze.openapi.service.auth.JWTBuilder;
-import com.coze.openapi.service.auth.JWTPayload;
-import io.jsonwebtoken.JwtBuilder;
-import io.jsonwebtoken.Jwts;
-import io.jsonwebtoken.SignatureAlgorithm;
-import lombok.NoArgsConstructor;
-import java.security.PrivateKey;
-import java.util.Map;
-
-
-/**
- * @Author zzy
- * @Data 2025/7/15
- * @Version 1.0
- * @Description XXX
- */
-@NoArgsConstructor
-public class ExampleJWTBuilder implements JWTBuilder {
-    @Override
-    public String generateJWT(PrivateKey privateKey, Map<String, Object> header, JWTPayload payload) {
-        try {
-            JwtBuilder jwtBuilder =
-                    Jwts.builder()
-                            .setHeader(header)
-                            .setIssuer(payload.getIss())
-                            .setAudience(payload.getAud())
-                            .setIssuedAt(payload.getIat())
-                            .setExpiration(payload.getExp())
-                            .setId(payload.getJti())
-
-                            .signWith(privateKey, SignatureAlgorithm.RS256);
-            if (payload.getSessionName() != null) {
-                jwtBuilder.claim("session_name", payload.getSessionName());
-            }
-            return jwtBuilder.compact();
-
-        } catch (Exception e) {
-            throw new RuntimeException("生成JWT失败", e);
-        }
-    }
-}

+ 8 - 9
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/CozeController.java → tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/app/controller/ALiYunController.java

@@ -1,11 +1,11 @@
 package cn.tr.module.smart.app.controller;
 
 import cn.tr.core.pojo.CommonResult;
-import cn.tr.module.smart.common.service.CozeService;
+import cn.tr.module.smart.common.service.ALiYunService;
+import com.alibaba.dashscope.app.ApplicationResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
@@ -15,26 +15,25 @@ import java.util.Map;
 
 /**
  * @Author zzy
- * @Data 2025/7/2
+ * @Data 2025/7/29
  * @Version 1.0
  * @Description XXX
  */
 @RestController
-@RequestMapping("/oauth/coze")
+@RequestMapping("/oauth/aliyun")
 @Api(tags = "识别患者图片信息")
-public class CozeController {
+public class ALiYunController {
 
     @Autowired
-    private CozeService cozeService;
+    private ALiYunService aliYunService;
 
-    @PostMapping("/recognize")
+    @RequestMapping("/recognize")
     @ApiOperation(value = "识别患者图片信息",notes = "权限: 无")
     public CommonResult<Map<String, Object>> recognizeImage(@RequestParam MultipartFile file,
                                                             @RequestParam(required = false) String configId,
                                                             @RequestParam(required = false) String cateId) throws Exception {
-        return cozeService.recognizeImage(file, configId, cateId);
+        return aliYunService.recognizeImage(file, configId, cateId);
 
     }
 
-
 }

+ 19 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/properties/ALiYunProperties.java

@@ -0,0 +1,19 @@
+package cn.tr.module.smart.common.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * @Author zzy
+ * @Data 2025/7/29
+ * @Version 1.0
+ * @Description XXX
+ */
+@Data
+@ConfigurationProperties(prefix = "aliyun")
+public class ALiYunProperties {
+
+    private String appId;
+    private String apiKey;
+
+}

+ 0 - 50
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/properties/CozeProperties.java

@@ -1,50 +0,0 @@
-package cn.tr.module.smart.common.properties;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
-
-/**
- * @Author zzy
- * @Data 2025/7/2
- * @Version 1.0
- * @Description XXX
- */
-@Data
-@ConfigurationProperties(prefix = "coze.api")
-public class CozeProperties {
-    private String clientId;
-    private String publicKey;
-    private String redirectUri;
-    private String baseUrl;
-    private String workflowId;
-    private int timeout;
-    private String maxFileSize;
-    private String[] allowedFileTypes;
-    private String imageParamName;
-
-    public String getPrivateKey() {
-        try (InputStream inputStream = getClass().getClassLoader()
-                .getResourceAsStream("private_key.pem")) {
-
-            if (inputStream == null) {
-                throw new RuntimeException("私钥文件未找到");
-            }
-            // 手动读取流数据
-            ByteArrayOutputStream result = new ByteArrayOutputStream();
-            byte[] buffer = new byte[1024];
-            int length;
-            while ((length = inputStream.read(buffer)) != -1) {
-                result.write(buffer, 0, length);
-            }
-            return result.toString(StandardCharsets.UTF_8.name());
-
-        } catch (IOException e) {
-            throw new RuntimeException("读取私钥文件失败", e);
-        }
-    }
-}

+ 3 - 3
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/CozeService.java → tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/ALiYunService.java

@@ -1,6 +1,7 @@
 package cn.tr.module.smart.common.service;
 
 import cn.tr.core.pojo.CommonResult;
+import com.alibaba.dashscope.app.ApplicationResult;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.Map;
@@ -11,8 +12,7 @@ import java.util.Map;
  * @Version 1.0
  * @Description XXX
  */
-public interface CozeService {
-    CommonResult<Map<String, Object>> recognizeImage(MultipartFile file,String configId,String cateId) throws Exception;
-
+public interface ALiYunService {
 
+    CommonResult<Map<String, Object>> recognizeImage(MultipartFile file, String configId, String cateId) throws Exception;
 }

+ 110 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/ALiYunServiceImpl.java

@@ -0,0 +1,110 @@
+package cn.tr.module.smart.common.service.impl;
+
+import cn.tr.core.pojo.CommonResult;
+import cn.tr.module.smart.common.properties.ALiYunProperties;
+import cn.tr.module.smart.common.service.ALiYunService;
+import cn.tr.module.sys.storage.dto.SysStorageRecordDTO;
+import cn.tr.module.sys.storage.service.IStorageFileService;
+import com.alibaba.dashscope.app.Application;
+import com.alibaba.dashscope.app.ApplicationParam;
+import com.alibaba.dashscope.app.ApplicationResult;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.stereotype.Service;
+import org.springframework.util.FileCopyUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.PostConstruct;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zzy
+ * @Data 2025/7/29
+ * @Version 1.0
+ * @Description XXX
+ */
+@Service
+public class ALiYunServiceImpl implements ALiYunService {
+
+    @Autowired
+    private IStorageFileService fileService;
+
+    @Autowired
+    private ALiYunProperties aliyunProperties;
+
+    private String promptTemplate;
+
+    @PostConstruct
+    public void init() {
+        try {
+            Resource resource = new ClassPathResource("llm/prompt.txt");
+            InputStream inputStream = resource.getInputStream();
+            byte[] bytes = FileCopyUtils.copyToByteArray(inputStream);
+            promptTemplate = new String(bytes, StandardCharsets.UTF_8);
+            inputStream.close();
+        } catch (IOException e) {
+            throw new RuntimeException("提示词加载失败", e);
+        }
+    }
+
+    @Override
+    public CommonResult<Map<String, Object>> recognizeImage(MultipartFile file, String configId, String cateId) throws Exception {
+        //使用缓存模版
+        String prompt = promptTemplate;
+
+        String imageUrl;
+        SysStorageRecordDTO uploadResult = fileService.upload(
+                configId,
+                cateId,
+                file.getOriginalFilename(),
+                file.getBytes(),
+                null);
+
+        imageUrl = uploadResult.getAbsolutePath();
+
+        ApplicationParam param = ApplicationParam.builder()
+                .appId(aliyunProperties.getAppId())
+                .apiKey(aliyunProperties.getApiKey())
+                .prompt(prompt)
+                .images(Collections.singletonList(imageUrl))
+                .build();
+
+        Application app = new Application();
+        ApplicationResult result = app.call(param);
+        String jsonResponse = result.getOutput().getText();
+
+        String cleanedJson = cleanMarkdownJson(jsonResponse);
+
+        ObjectMapper objectMapper = new ObjectMapper();
+
+        Map<String, Object> resultMap = new HashMap<>();
+        if (cleanedJson.trim().startsWith("[")) {
+            List<Map<String, Object>> patientList = objectMapper.readValue(
+                    cleanedJson,
+                    new TypeReference<List<Map<String, Object>>>() {}
+            );
+            resultMap.put("count", patientList.size());
+            resultMap.put("patients", patientList);
+        }
+
+        return CommonResult.success(resultMap);
+    }
+
+    private String cleanMarkdownJson(String jsonResponse) {
+        return jsonResponse
+                .replaceFirst("^\\s*```json\\s*", "")
+                .replaceFirst("```\\s*$", "")
+                .trim();
+    }
+}

+ 0 - 137
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/CozeServiceimpl.java

@@ -1,137 +0,0 @@
-package cn.tr.module.smart.common.service.impl;
-
-import cn.tr.core.pojo.CommonResult;
-import cn.tr.module.smart.app.config.CozeOAuthTokenConfig;
-import cn.tr.module.smart.common.properties.CozeProperties;
-import cn.tr.module.smart.common.service.CozeService;
-import cn.tr.module.sys.storage.dto.SysStorageRecordDTO;
-import cn.tr.module.sys.storage.service.IStorageFileService;
-import cn.tr.module.sys.tenant.dto.OAuthTokenAddCacheDTO;
-import com.coze.openapi.client.workflows.run.RunWorkflowReq;
-import com.coze.openapi.client.workflows.run.RunWorkflowResp;
-import com.coze.openapi.service.auth.TokenAuth;
-import com.coze.openapi.service.service.CozeAPI;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.util.unit.DataSize;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * @Author zzy
- * @Data 2025/7/2
- * @Version 1.0
- * @Description XXX
- */
-@Service
-public class CozeServiceimpl implements CozeService {
-
-    @Autowired
-    private CozeProperties cozeProperties;
-    @Autowired
-    private IStorageFileService fileService;
-
-    @Autowired
-    private CozeOAuthTokenConfig cozeOAuthTokenConfig;
-
-    public CommonResult<Map<String, Object>> recognizeImage(MultipartFile file, String configId, String cateId) throws Exception {
-
-        // 验证文件
-        validateImageFile(file);
-
-        String imageUrl;
-        SysStorageRecordDTO uploadResult = fileService.upload(
-                configId,
-                cateId,
-                file.getOriginalFilename(),
-                file.getBytes(),
-                null);
-
-        imageUrl = uploadResult.getAbsolutePath();
-        //获取token
-        OAuthTokenAddCacheDTO oauthToken = cozeOAuthTokenConfig.getAccessToken();
-        String accessToken = oauthToken.getAccessToken();
-        TokenAuth tokenAuth = new TokenAuth(accessToken);
-
-        CozeAPI coze = new CozeAPI.Builder()
-                .baseURL(cozeProperties.getBaseUrl())
-                .auth(tokenAuth)
-                .readTimeout(60000) // 将超时时间设置为60000毫秒(60秒)
-                .build();
-        Map<String, Object> parameters = new HashMap<>();
-        parameters.put(cozeProperties.getImageParamName(), imageUrl);
-
-        // 执行工作流
-        RunWorkflowResp workflowResp = coze.workflows().runs().create(
-                RunWorkflowReq.builder()
-                        .workflowID(cozeProperties.getWorkflowId())
-                        .parameters(parameters)
-                        .build()
-        );
-        String data = workflowResp.getData();
-        ObjectMapper objectMapper = new ObjectMapper();
-        Map<String, Object> responseMap = objectMapper.readValue(data, new TypeReference<Map<String, Object>>() {
-        });
-
-        String outputJson = (String) responseMap.get("output");
-
-        List<Map<String, Object>> patientList = objectMapper.readValue(
-                outputJson,
-                new TypeReference<List<Map<String, Object>>>() {
-                }
-        );
-
-        Map<String, Object> result = new HashMap<>();
-        result.put("count", patientList.size());
-        result.put("patients", patientList);
-        return CommonResult.success(result);
-
-    }
-
-
-
-
-    private void validateImageFile(MultipartFile file) throws IOException {
-        // 检查文件大小
-        long maxSize = DataSize.parse(cozeProperties.getMaxFileSize()).toBytes();
-        if (file.getSize() > maxSize) {
-            throw new IOException("文件大小超过限制: " + cozeProperties.getMaxFileSize());
-        }
-
-        // 检查文件类型
-        String fileName = file.getOriginalFilename();
-        if (fileName == null) {
-            throw new IOException("无效的文件名");
-        }
-
-        String extension = getFileExtension(fileName);
-        if (!isValidFileType(extension)) {
-            throw new IOException("不支持的文件类型. 支持的类型: " +
-                    String.join(", ", cozeProperties.getAllowedFileTypes()));
-        }
-    }
-
-    private String getFileExtension(String fileName) {
-        int dotIndex = fileName.lastIndexOf(".");
-        if (dotIndex > 0 && dotIndex < fileName.length() - 1) {
-            return fileName.substring(dotIndex + 1).toLowerCase();
-        }
-        return "";
-    }
-
-    private boolean isValidFileType(String extension) {
-        for (String allowedType : cozeProperties.getAllowedFileTypes()) {
-            if (allowedType.equalsIgnoreCase(extension)) {
-                return true;
-            }
-        }
-        return false;
-    }
-}

+ 39 - 0
tr-modules/tr-module-smartFollowUp/src/main/resources/llm/prompt.txt

@@ -0,0 +1,39 @@
+# 角色
+你是一位经验丰富的医院主任医师,擅长从医疗文档中提取关键信息,并将其转换为结构化的JSON格式。
+
+## 技能
+### 技能 1: 提取图片内容
+- 从提供的图片中提取手术相关信息。
+- 将提取的信息按照指定的JSON格式进行整理和输出。
+
+### 技能 2: 处理不完整或无法识别的信息
+- 如果图片中的信息不完整或无法识别,在相应字段中填写"未知"或"未提供"。
+
+## 限制
+- 只返回提取后的JSON格式数据,不添加任何额外的文字或解释。
+- 确保JSON格式严格按照用户提供的模板进行组织。
+- 如果图片中的信息不完整或无法识别,请在相应字段中填写"未知"或"未提供"。
+
+```json
+[
+    {
+        "surgeryName": "手术名称",
+        "applicationNo": "手术申请单号",
+        "patientCode": "住院号",
+        "startTime": "手术时间",
+        "asa": "asa",
+        "patientName": "患者姓名",
+        "patientGender": "患者性别",
+        "ward": "病区",
+        "bedNo": "床号",
+        "weight": "体重",
+        "height": "身高",
+        "anaDoctor": "麻醉医生",
+        "surgeryDoctor": "手术医生",
+        "analType": "镇痛方式",
+        "anaType": "麻醉方式"
+    }
+]
+```
+
+请根据提供的图片内容,填充上述JSON模板并返回。如果某些信息无法从图片中获取,请在相应的字段中填写"未知"或"未提供"。

+ 0 - 28
tr-modules/tr-module-smartFollowUp/src/main/resources/private_key.pem

@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCo7r7ufPndk7WY
-TFb5b6c5rXJDyEIy5J4rm0BKcxPdZi/wezfYyopEPxSevQHHKqD4Z/ELalcQ7YVc
-kg92txt5iPH479JKz5Q9VhqqzPGYGKuuwCii+oZ43BsmbmApCIcU4GePfBMcwJ78
-LL1Rcx2akloGh23OAfRPngoPy4o/tcICDJysYx/7A1/eLohHqjRXVSN5DP9lWQxR
-VzVsGec+HSXASmf5pYLrbAvcvEHfkmFzJDUQnvqMnvjHFVLDX4nSKo3iu2St8mWt
-Pxy7+70E/AWYT8tTO2eRj3KZTxEZE0TrLkxDO9K55bz+QN50bDUt7ASRjASVmCht
-Eezl4l/NAgMBAAECggEACXBTgzRA6sA0yoZjaqryIz8dbgubpUfQTZvuTuqYnst1
-nMBpuadxa8hBgPALECOB3HdESNC/fh7jT22KxyWKd7Mu3+uYap0oCXhM46OxUP/5
-4bjzXE3WoxybOL28ijZjg8dZCfOTBs19ZJYkWs9thUQtmwVInZTO337zTXggKJiK
-EPFz5zxHVEUgX7s5Hwf8bnFg7Anzl2xLHsufnR3d9q+gdppCOzciZfjfXL6ciYMu
-hWxRSz61Ew6kLNSF7igOA5Za1NFgihBO9ITJBxkRjqful6wUTBGp6b9PH/CoBWim
-30tmFf+t0LwQety7Of2nMk/BLOhgCpsDtp19BPJdMQKBgQDp5aYnNgyDoQ3Ef5BH
-5eheFvD7NGZ1OWoZvSw1tzwWmr+Tqa5p4jflLi9Bt/3sqxJTG7uNZXj1yfzFBgfw
-1LxfmtY1EjQ7K6IFziaurOIATVROtPj31jJeA4Sc1mZx9aGRZjizDo4MyvM8P7rL
-+D+m3G4fjlkLNE1FjREVx6MoMQKBgQC45YAlDOX+3xMm8PRbvA7zz8+1cY9xNFA6
-HCWoLW5RPMfp6qd4Pzer0aryi2BDnRK6mNuOuR0DOKE9+xC4WSYz8QHbRo9IK2gX
-PrxRVVZ608Ku273g4jfTvxHsKw7L17MwZz7N+p2r5bE+Gxb+UUGseGazxAM+zc81
-DCN45h2mXQKBgEB1XnXd6lL4NoAZm5yE2qXbcqv4A+h4WyoevSlMhw2/td4u2/co
-Nbk+Ih3dY+guOQ2YTfaoqU4rTTLK97NCHWvHkxLrImPQIYWyC20GDf6BUSOjsh0y
-9Yx9MbW7TF5JkC4u2p9V+oXCBIhtE8CUeI42n06o/xccYdMyDixPaUJxAoGAUExr
-gKu/XxcmTC0tEoHzxHMl89jjwPhFN1duC0HfvSw2biJYpOJfnSErqrZZEkQvFBa6
-k5tVPEblz/MvacBd1QUAF2jnZSJkzGOUiYYUTreUvzfzmKzmLfG3KOfyPxjoW0cb
-gX0r6LGSbjR5oe1MJkkL4VppRmc/a/xfk2vsyIkCgYEAmSpdfJ451c6ftSQRR6Cl
-sYMwZL+SCdcqirAkd0dhmK6T228VfAVohE+2/dDFMgcVv1cg4ktQdv6TOj9d2f+R
-vbN3D6dNAcACmOWiCWtO/51nIbQbFyqPNAiHx75r6w/u7l1jqIrsjWR67uQJl8Ks
-fKrHCoUOtZR5YSCpPXMNCXo=
------END PRIVATE KEY-----

+ 4 - 12
tr-test/src/main/resources/application-dev.yml

@@ -48,15 +48,7 @@ wx:
         token: smart #微信小程序消息服务器配置的token
         aesKey: 1elyDzYtcnefWgXzhjpMWb9tm1c3ArChNLVWlIp2Oe3 #微信小程序消息服务器配置的EncodingAESKey
 
-# 添加Coze配置
-coze:
-  api:
-    clientId: 1133219873523
-    publicKey: 56rfqoy4WCOsSlhi_BNafW5QmD7g7ISPit4SRG0jvTk
-    redirectUri: http://localhost:8083/oauth/coze/recognize
-    baseUrl: https://api.coze.cn/v1/workflow/run/
-    workflowId: 7526811461625905198
-    timeout: 5000
-    max-file-size: 5MB
-    allowed-file-types: jpg,jpeg,png,webp
-    image-param-name: input
+# 添加aliyun配置
+aliyun:
+  appId: "b95862368a65422eab15d9838a03b79f"
+  apiKey: "sk-b08f4aaed4d641e5ba049c34a0eaf377"