Ver Fonte

人脸识别接口

郎学彬 há 3 anos atrás
pai
commit
6a42528a60

+ 2 - 1
sc-service/src/main/java/com/huyi/service/common/cfcaCommon/ICfcaFaceAuthService.java

@@ -23,7 +23,8 @@ public interface ICfcaFaceAuthService {
                            String backUrl,
                            String remark,
                            String url,
-                            String path) throws Exception;
+                            String path,
+                            String imgurl) throws Exception;
 
 
 }

+ 18 - 16
sc-service/src/main/java/com/huyi/service/common/cfcaCommon/impl/CfcaFaceAuthServiceImpl.java

@@ -21,7 +21,7 @@ public class CfcaFaceAuthServiceImpl implements ICfcaFaceAuthService {
 
 
     @Override
-    public String faceAuth(boolean isPro, String institutionid, String name, String returnImage, String identificationNumber, String frontUrl, String backUrl, String remark, String url,String path) throws Exception {
+    public String faceAuth(boolean isPro, String institutionid, String name, String returnImage, String identificationNumber, String frontUrl, String backUrl, String remark, String url,String path,String imgurl) throws Exception {
         Map<String,String> map = CfcaUtil.faceAuth(isPro,institutionid,name,returnImage,identificationNumber,frontUrl,backUrl,remark);
         url = url+"?message="+map.get("reqMessage")
                  +"&signature="+map.get("reqSignature")
@@ -29,7 +29,8 @@ public class CfcaFaceAuthServiceImpl implements ICfcaFaceAuthService {
                  +"&signSN="+map.get("requestSignSN")
                  +"&encryptSN"+map.get("requestEncryptSN");
         String fileName = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".jpg";
-        String fileUrl = createQrCode(url,path,fileName);
+        createQrCode(url,path,fileName);
+        String fileUrl = imgurl+fileName;
         return fileUrl;
     }
     public static String createQrCode(String url, String path, String fileName) {
@@ -48,18 +49,19 @@ public class CfcaFaceAuthServiceImpl implements ICfcaFaceAuthService {
         return null;
     }
 
-//    public static void main(String[] args) throws Exception {
-//
-//        Map<String,String> map = CfcaUtil.faceAuth(false,"100804","李三","","370724199512106110","http://localhost:8080/ReceiveNoticePage","http://localhost:8080/ReceiveNoticeBackground","");
-//        System.out.println(map);
-//        String url= "http://zcyl.keao.tech/#/";
-//        url = url+"?message="+map.get("reqMessage")
-//                +"&signature="+map.get("reqSignature")
-//                +"&dgtlenvlp="+map.get("requestDgtlEnvlp")
-//                +"&signSN="+map.get("requestSignSN")
-//                +"&encryptSN="+map.get("requestEncryptSN");
-//        System.out.println(url);
-//        String fileName = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".jpg";
-//        String fileUrl = createQrCode(url,"D://",fileName);
-//    }
+    public static void main(String[] args) throws Exception {
+
+        Map<String,String> map = CfcaUtil.faceAuth(false,"100804","李三","","370724199512106110","http://localhost:8080/ReceiveNoticePage","http://localhost:8080/ReceiveNoticeBackground","");
+        System.out.println(map);
+        String url= "http://zcyl.keao.tech/#/";
+        url = url+"?message="+map.get("reqMessage")
+                +"&signature="+map.get("reqSignature")
+                +"&dgtlenvlp="+map.get("requestDgtlEnvlp")
+                +"&signSN="+map.get("requestSignSN")
+                +"&encryptSN="+map.get("requestEncryptSN");
+        System.out.println(url);
+        String fileName = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".jpg";
+        String fileUrl = createQrCode(url,"D://",fileName);
+        System.out.println(fileUrl);
+    }
 }