|
|
@@ -8,7 +8,6 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.extra.servlet.ServletUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Assert;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
@@ -506,24 +505,4 @@ public class GroupRelationController {
|
|
|
Page<UserRecommendGoodsFrontView> page = groupRelationFrontService.getRecommendGoodsViews(isPayNf, filter_goods_id, start, limit);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(page);
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 查看GPT token
|
|
|
- */
|
|
|
- @GetMapping("/get/gptAccessToken")
|
|
|
- public Result<String> getGptAccessToken(Long relationId) throws Exception {
|
|
|
- long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
- List<Long> userIds = userService.getRelationUserIdList(userId, null);
|
|
|
- //存在该车票
|
|
|
- RenewalView renewalView = beanSearcher.searchFirst(RenewalView.class, MapUtils.builder()
|
|
|
- .field(RenewalView::getRelationId, relationId)
|
|
|
- .field(RenewalView::getUserId, userIds).op(Operator.InList).build());
|
|
|
- Assert.notNull(renewalView, "您的车票不存在");
|
|
|
- if (renewalView.getCategory() != 1) {
|
|
|
- throw BusinessRuntimeException.getInstance("该平台类型车票无法获取GPT直连token");
|
|
|
- }
|
|
|
- String account = renewalView.getAccount();
|
|
|
- String accessToken = chatGptAuthService.getAccessToken(account);
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(accessToken);
|
|
|
- }
|
|
|
}
|