Bladeren bron

Merge remote-tracking branch 'origin/master'

zoujiajian 2 jaren geleden
bovenliggende
commit
4afc7b4fad

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/relation/GroupRelationFrontService.java

@@ -37,7 +37,7 @@ public interface GroupRelationFrontService {
 	/**
 	 * 获取车票账号登录 验证码
 	 */
-	String getAiVerifyCode(Long userId, Long relationId) throws Exception;
+	String getAiVerifyCode(Long userId, Long relationId, Integer type) throws Exception;
 
 
 	void checkGroupsAvailParkingNum(Long skuId, Long groupsId, Integer availableParkingNum, Integer maxNum);

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

@@ -441,7 +441,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 	}
 
 	@Override
-	public String getAiVerifyCode(Long userId, Long relationId) throws Exception {
+	public String getAiVerifyCode(Long userId, Long relationId, Integer type) throws Exception {
 		List<Long> relationUserIdList = userBindRelationService.getRelationUserIdList(userId, null);
 		RenewalView renewalView = beanSearcher.searchFirst(RenewalView.class, MapUtils.builder().field(RenewalView::getUserId, relationUserIdList).op(Operator.InList)
 				.field(RenewalView::getRelationId, relationId).build());
@@ -465,7 +465,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 			throw BusinessRuntimeException.getInstance("获取账号验证码异常,请联系客服...");
 		}
 		String url = "http://yinhelx.com/api/controller.php";
-		Map<String,Object> params = new HashMap<>();
+		Map<String, Object> params = new HashMap<>();
 
 		params.put("imap_key", "imap_56568niua@@");
 		params.put("fun", "imap_read");
@@ -482,7 +482,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		if (execute.getStatus() != HttpStatus.HTTP_OK) {
 			throw BusinessRuntimeException.getInstance("获取验证码异常,请联系客服...");
 		}
-		String code = getDifferentGoodsCode(renewalView.getGoodsId(), execute.body());
+		String code = getDifferentGoodsCode(renewalView.getGoodsId(), execute.body(), type);
 		GroupsRelationLoginCodeRecord record = new GroupsRelationLoginCodeRecord();
 		record.setUserId(userId);
 		record.setRelationId(relationId);
@@ -604,7 +604,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		return num;
 	}
 
-	public String getDifferentGoodsCode(Long goodsId, String body) {
+	public String getDifferentGoodsCode(Long goodsId, String body, Integer type) {
 		String code = null;
 		//奈飞
 		if (goodsId == 1) {
@@ -622,7 +622,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 				}
 				return urlPref + code;
 			}
-			if (StrUtil.isEmpty(code)) {
+			if (type!=null && type == 1) {
 				throw BusinessRuntimeException.getInstance("查询失败,请检查是否发送了登陆码..");
 			}
 		}

+ 2 - 2
netflix-web/src/main/java/com/cyksj/web/controller/group/GroupRelationController.java

@@ -591,9 +591,9 @@ public class GroupRelationController {
      * 读取车票账号登录验证码
      */
     @GetMapping("/get/verifyCode/{relationId}")
-    public Result<String> getAiVerifyCode(@PathVariable Long relationId) throws Exception {
+    public Result<String> getAiVerifyCode(@PathVariable Long relationId, Integer type) throws Exception {
         long userId = StpUserUtil.getLoginIdAsLong();
-        return GatewayResponse.SUCCESS.newBuilder().toResult(groupRelationFrontService.getAiVerifyCode(userId, relationId));
+        return GatewayResponse.SUCCESS.newBuilder().toResult(groupRelationFrontService.getAiVerifyCode(userId, relationId, type));
     }
 
     /**