Преглед изворни кода

用户实名认证后可查看双重验证码

zoujiajian пре 2 година
родитељ
комит
c2c71ea3f2

+ 9 - 0
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -100,6 +100,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 
 	private final CuiQiuMailService cuiQiuMailService;
 
+	private final UserCertRecordMapper userCertRecordMapper;
+
 	//脆球邮箱后缀
 	private final static String CUI_QIU_EMAIL_SUFFIX = "@kindvd.com";
 
@@ -588,6 +590,13 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		int num = 0;
 		//有安全码查看次数 置为0
 		if (isHasVerifyCode) {
+			//存在身份实名认证有两次机会
+			List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
+			Integer selectCount = userCertRecordMapper.selectCount(Wrappers.lambdaQuery(UserCertRecord.class)
+					.in(UserCertRecord::getUserId, userIdList));
+			if (selectCount > 0) {
+				num = 2;
+			}
 			return num;
 		}
 		//查看双重验证码次数