Browse Source

V2.7.7 修改刷脸onResponse中1001的返回结果

xulh 6 months ago
parent
commit
2e99abb79e

+ 10 - 0
app/src/main/java/com/hh/arome/bean/ampe/AmpeAppletResultBean.java

@@ -89,6 +89,7 @@ public class AmpeAppletResultBean {
         String alipayUid;
         Integer code = null;
         String extInfo;
+        Object extInfoObj;
         String ftoken;
         Boolean isvResult = null;
         String subCode;
@@ -198,6 +199,15 @@ public class AmpeAppletResultBean {
             this.code = code;
         }
 
+
+        public Object getExtInfoObj() {
+            return extInfoObj;
+        }
+
+        public void setExtInfoObj(Object extInfoObj) {
+            this.extInfoObj = extInfoObj;
+        }
+
         public String getExtInfo() {
             return extInfo;
         }

+ 16 - 2
app/src/main/java/com/hh/arome/ui/MainActivity.java

@@ -5070,6 +5070,7 @@ public class MainActivity extends BaseHHActivity implements DeviceConfigContract
                         // {code=1000, subCode='E00000', subMsg='成功(E00000)', mResult='Bundle[mParcelledData.dataSize=124]', extInfo={}}
                         // code=1001, subCode='E69009', subMsg='未初始化成功,请先初始化(E69009)  注意检测getHardWareConfig
                         // {code=1001, subCode='E60001', subMsg='flow eval error', mResult='null', extInfo={}}
+                        // {code=1001, subCode='E69013', subMsg='服务连接断开(E69013)', mResult='null', extInfo={}}
 
                         int code = bPaaSResponse.getCode();
 
@@ -5163,7 +5164,16 @@ public class MainActivity extends BaseHHActivity implements DeviceConfigContract
                         ampeAppletResultBean.setSuccess(false);
                         ampeAppletResultBean.setMessage(bPaaSResponse.toString());
 
-                        AmpeAppletResultBean.Data dataBean = gson.fromJson(bPaaSResponse.toString(), AmpeAppletResultBean.Data.class);
+                        Map<String, Object> extInfo = bPaaSResponse.getExtInfo();
+
+
+                        // AmpeAppletResultBean中的extInfo是String。但1001时返回是{}
+//                        AmpeAppletResultBean.Data dataBean = gson.fromJson(bPaaSResponse.toString(), AmpeAppletResultBean.Data.class);
+                        AmpeAppletResultBean.Data dataBean = new AmpeAppletResultBean.Data();
+                        dataBean.setCode(bPaaSResponse.getCode());
+                        dataBean.setSubCode(bPaaSResponse.getSubCode());
+                        dataBean.setSubMessage(bPaaSResponse.getSubMsg());
+                        dataBean.setExtInfoObj(bPaaSResponse.getExtInfo());
                         dataBean.setOriginFaceInfo(bPaaSResponse.toString());
                         ampeAppletResultBean.setData(dataBean);
 
@@ -5249,7 +5259,9 @@ public class MainActivity extends BaseHHActivity implements DeviceConfigContract
                                 .append("onEvent = ").append(WARP)
                                 .append("resultStr = ").append(resultStr).append(WARP)
                                 .append("bPaasVerifyID = ").append(bPaasVerifyID).append(WARP)
-                                .append("bundle = ").append(new Gson().toJson(bundle));
+                                .append("bundle = ").append(new Gson().toJson(bundle))
+                                .append("CardOrCode = ").append(CardOrCode)
+                        ;
 
                         // 开始保存本地日志
                         AppLogUtils.saveLog(LogType.Logcat, new StringBuilder()
@@ -7220,6 +7232,8 @@ public class MainActivity extends BaseHHActivity implements DeviceConfigContract
 //                        // 补光灯关闭
 //                        iDeviceUI.hideFillLight(mActivity);
 
+                        // {"mCode":1001,"mExtInfo":{},"mSubCode":"E69010","mSubMsg":"服务未连接(E69010)"}
+
                         int code = bPaaSResponse.getCode();
 
                         // 日志开始----------------begin