|
|
@@ -6,12 +6,15 @@ import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
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
|
|
|
@@ -36,6 +39,8 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService{
|
|
|
|
|
|
private final UserMapper userMapper;
|
|
|
|
|
|
+ private final UserBindRelationService userBindRelationService;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public void addAccount(Account account) {
|
|
|
@@ -71,7 +76,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("车票不存在");
|
|
|
}
|