|
|
@@ -34,6 +34,7 @@ import com.cyksj.service.mail.MailService;
|
|
|
import com.cyksj.service.mange.coupon.CouponCommonService;
|
|
|
import com.cyksj.service.midjourney.MidjourneyAccountService;
|
|
|
import com.cyksj.service.relation.GroupRelationFrontService;
|
|
|
+import com.cyksj.service.relation.GroupsRelationNetflixService;
|
|
|
import com.cyksj.service.user.UserBindRelationService;
|
|
|
import com.cyksj.service.user.UserLoginRecordService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
@@ -124,6 +125,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
|
|
|
private final GoodsDonQaRelateMapper goodsDonQaRelateMapper;
|
|
|
|
|
|
+ private final GroupsRelationNetflixService groupsRelationNetflixService;
|
|
|
+
|
|
|
@Override
|
|
|
public SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account) {
|
|
|
User u = userMapper.selectById(userId);
|
|
|
@@ -496,7 +499,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public String getAiVerifyCode(Long userId, Long relationId, Integer type) throws Exception {
|
|
|
+ public String getAiVerifyCode(Long userId, Long relationId, Integer type, Boolean sync) 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());
|
|
|
@@ -540,7 +543,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
if (execute.getStatus() != HttpStatus.HTTP_OK) {
|
|
|
throw BusinessRuntimeException.getInstance("获取验证码异常,请联系客服...");
|
|
|
}
|
|
|
- String code = getDifferentGoodsCode(renewalView.getGoodsId(), execute.body(), type);
|
|
|
+ String code = getDifferentGoodsCode(renewalView.getGoodsId(), execute.body(), type, sync);
|
|
|
GroupsRelationLoginCodeRecord record = new GroupsRelationLoginCodeRecord();
|
|
|
record.setUserId(userId);
|
|
|
record.setRelationId(relationId);
|
|
|
@@ -738,7 +741,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
return expiryTickets;
|
|
|
}
|
|
|
|
|
|
- public String getDifferentGoodsCode(Long goodsId, String body, Integer type) {
|
|
|
+ public String getDifferentGoodsCode(Long goodsId, String body, Integer type, Boolean sync) {
|
|
|
String code = null;
|
|
|
//奈飞
|
|
|
if (goodsId == 1) {
|
|
|
@@ -755,7 +758,14 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
}
|
|
|
}
|
|
|
if (StrUtil.isNotBlank(code)) {
|
|
|
- return urlPref + code;
|
|
|
+ String url = urlPref + code;
|
|
|
+ //非点击装置同步更新按钮 直接返回链接
|
|
|
+ if (!sync) return url;
|
|
|
+ //失败返回验证链接
|
|
|
+ if (!groupsRelationNetflixService.confirmUpdate(url)) {
|
|
|
+ return url;
|
|
|
+ }
|
|
|
+ return StrUtil.EMPTY;
|
|
|
}
|
|
|
}
|
|
|
if (type != null && type == 1 && StrUtil.isEmpty(code)) {
|