Parcourir la source

Merge remote-tracking branch 'origin/chatgpt' into chatgpt

chenbiao il y a 2 ans
Parent
commit
3924ed16f2

+ 5 - 0
netflix-dao/src/main/java/com/cyksj/model/manage/request/ReqGoodsSkuInsert.java

@@ -126,6 +126,11 @@ public class ReqGoodsSkuInsert {
          */
         private Integer codeNum;
 
+        /**
+         * 是否是镜像服务
+         */
+        private Boolean isMirror;
+
     }
 
 }

+ 7 - 1
netflix-service/src/main/java/com/cyksj/service/chatgpt/impl/ChatGptAccountServiceImpl.java

@@ -11,12 +11,15 @@ import com.cyksj.common.util.StringUtil;
 import com.cyksj.mapper.*;
 import com.cyksj.model.entity.*;
 import com.cyksj.service.chatgpt.ChatGptAccountService;
+import com.cyksj.service.user.UserBindRelationService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * @author chan
  * @date 2024/3/19 11:01
@@ -43,6 +46,8 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService{
 
     private final UserMapper userMapper;
 
+    private final UserBindRelationService userBindRelationService;
+
 
     @Override
     public String addAccount(Account account) {
@@ -98,7 +103,8 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService{
 
     @Override
     public String getLoginUrl(Long userId, Long relationId) {
-        GroupsRelation groupsRelation = groupsRelationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class).eq(GroupsRelation::getUserId, userId).eq(GroupsRelation::getId, relationId));
+        List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, null);
+        GroupsRelation groupsRelation = groupsRelationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class).in(GroupsRelation::getUserId, userIdList).eq(GroupsRelation::getId, relationId));
         if (groupsRelation == null) {
             throw BusinessRuntimeException.getInstance("车票不存在");
         }