소스 검색

fix 奈飞验证码

zoujiajian 2 년 전
부모
커밋
b47b214f22

+ 3 - 0
netflix-dao/src/main/java/com/cyksj/model/manage/views/CorpMsgAuditUserView.java

@@ -30,6 +30,9 @@ public class CorpMsgAuditUserView {
     @DbField("cu.external_userid")
     @DbField("cu.external_userid")
     private String externalUserid;
     private String externalUserid;
 
 
+    @DbField("c.user_id")
+    private Long userId;
+
     /**
     /**
      * 外部联系人头像,代开发自建应用需要管理员授权才可以获取,第三方不可获取,上游企业不可获取下游企业客户该字段
      * 外部联系人头像,代开发自建应用需要管理员授权才可以获取,第三方不可获取,上游企业不可获取下游企业客户该字段
      */
      */

+ 11 - 7
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -608,16 +608,20 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		String code = null;
 		String code = null;
 		//奈飞
 		//奈飞
 		if (goodsId == 1) {
 		if (goodsId == 1) {
-			String urlPref = "https://www.netflix.com/account/update-primary-location";
-			code = StrUtil.subBetween(body, "[" + urlPref, "]");
-			if (StrUtil.isEmpty(code)) {
-				urlPref = "https://www.netflix.com/account/travel/verify";
+			if (body.contains("輸入此代碼登入")) {
+				code = StrUtil.subBetween(body, "輸入此代碼登入", "請在裝置上輸入上");
+			} else {
+				String urlPref = "https://www.netflix.com/account/update-primary-location";
 				code = StrUtil.subBetween(body, "[" + urlPref, "]");
 				code = StrUtil.subBetween(body, "[" + urlPref, "]");
 				if (StrUtil.isEmpty(code)) {
 				if (StrUtil.isEmpty(code)) {
-					throw BusinessRuntimeException.getInstance("获取认证链接失败,请重新获取");
+					urlPref = "https://www.netflix.com/account/travel/verify";
+					code = StrUtil.subBetween(body, "[" + urlPref, "]");
+					if (StrUtil.isEmpty(code)) {
+						throw BusinessRuntimeException.getInstance("获取认证链接失败,请重新获取");
+					}
 				}
 				}
+				return urlPref + code;
 			}
 			}
-			return urlPref + code;
 		}
 		}
 		//迪士尼
 		//迪士尼
 		if (goodsId == 3) {
 		if (goodsId == 3) {
@@ -641,7 +645,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 
 
 	public String getVerifyCode(String code) {
 	public String getVerifyCode(String code) {
 		if (StrUtil.isNotEmpty(code)) {
 		if (StrUtil.isNotEmpty(code)) {
-			Pattern pattern = Pattern.compile("\\d{6}");
+			Pattern pattern = Pattern.compile("\\d{4,}");
 			Matcher matcher = pattern.matcher(code);
 			Matcher matcher = pattern.matcher(code);
 			while (matcher.find()) {
 			while (matcher.find()) {
 				return matcher.group();
 				return matcher.group();