wzy hace 9 meses
padre
commit
27ffc91937

+ 2 - 11
mjava-kabeiyi/src/main/java/com/malk/kabeiyi/service/impl/KabeiyiServiceImpl.java

@@ -385,17 +385,8 @@ public class KabeiyiServiceImpl implements KabeiyiService {
     public McR ocr(String downloadUrl,String name,String type) {
         MDC.put("MDC_KEY_PID","1009");
 
-        try {
-            String content = RecognizeAllText.recognizeText("C:\\Users\\EDY\\Desktop\\4.png", type, accessKeyId, accessKeySecret);
-            return McR.success(content);
-        }catch (Exception e) {
-            e.printStackTrace();
-            log.info("识别失败:{}" + e.getMessage());
-        }
-
-
         //下载宜搭附件
-        /*try {
+        try {
             String[] yida = McProject.getYida("1009");
             downloadFile(downloadUrl,filePath + name,yida[0],yida[1]);
             log.info("文件下载成功!");
@@ -410,7 +401,7 @@ public class KabeiyiServiceImpl implements KabeiyiService {
         }catch (Exception e) {
             e.printStackTrace();
             log.info("识别失败:{}" + e.getMessage());
-        }*/
+        }
         return McR.errorUnknown("识别失败!");
     }
 

+ 5 - 1
mjava-kabeiyi/src/main/resources/application-prod.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8113
+  port: 8115
   servlet:
     context-path: /kabeiyi
 
@@ -58,4 +58,8 @@ teambition:
 aliwork:
   appType: APP_HZ5V1PF2YGBIUCIYOSI5
   systemToken: DIC66I91HJ3MWKL3FAQ5UD46GIR129PR66KXLA
+  accessKeyId: LTAI5tCrLZLGgjfpBEvPK4er # 阿里云accessKeyId
+  accessKeySecret: lIoRZDrwFsJIV1sdGica8SyjViZFGV # 阿里云accessKeySecret
 
+ocr:
+  filePath: /home/server/kabeiyi/file/

+ 1 - 1
mjava-kabeiyi/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: dev
+    active: prod
   servlet:
     multipart:
       max-file-size: 100MB