添加封装远程调用jsxq
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package org.jiayunet.controller;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.jiayunet.remote.jsxq.JsxqClient;
|
||||
import org.jiayunet.remote.jsxq.pojo.JsxqPage;
|
||||
import org.jiayunet.remote.jsxq.pojo.dto.ChatEvaluateDto;
|
||||
import org.jiayunet.remote.jsxq.pojo.dto.MentorFullInfoDto;
|
||||
import org.jiayunet.remote.jsxq.pojo.dto.MentorItemDto;
|
||||
import org.jiayunet.remote.jsxq.pojo.dto.TeacherTalkDto;
|
||||
import org.jiayunet.remote.jsxq.pojo.param.MentorPageParam;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 导师接口(对接简史星球开放平台,公开免鉴权)
|
||||
* <p>依赖:JsxqClient(远程调用简史星球平台)</p>
|
||||
*
|
||||
* @author zk
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/public/mentor")
|
||||
@Validated
|
||||
@AllArgsConstructor
|
||||
public class MentorController {
|
||||
|
||||
private final JsxqClient jsxqClient;
|
||||
|
||||
/**
|
||||
* 分页查询导师列表
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
public JsxqPage<MentorItemDto> pageSelectMentor(@RequestBody MentorPageParam param) {
|
||||
return jsxqClient.pageSelectMentor(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询导师完整信息
|
||||
*/
|
||||
@GetMapping("/info")
|
||||
public MentorFullInfoDto selectMentorFullInfo(@RequestParam Long mentorId) {
|
||||
return jsxqClient.selectMentorFullInfo(mentorId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询老师话题列表
|
||||
*/
|
||||
@GetMapping("/talk")
|
||||
public List<TeacherTalkDto> selectTalk(@RequestParam Long teacherId) {
|
||||
return jsxqClient.selectTalk(teacherId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询老师评价列表
|
||||
*/
|
||||
@GetMapping("/evaluate")
|
||||
public List<ChatEvaluateDto> selectChatEvaluate(@RequestParam Long teacherId) {
|
||||
return jsxqClient.selectChatEvaluate(teacherId);
|
||||
}
|
||||
}
|
||||
@@ -101,4 +101,11 @@ app:
|
||||
job-recommend:
|
||||
base-url: ${AI_BASE_URL:https://ark.cn-beijing.volces.com/api/v3}
|
||||
api-key: ${AI_API_KEY:fd065993-bee2-4f31-8bf2-56d5d3012c02}
|
||||
model: ${AI_MODEL:doubao-1-5-lite-32k-250115}
|
||||
model: ${AI_MODEL:doubao-1-5-lite-32k-250115}
|
||||
|
||||
# 简史星球开放平台配置
|
||||
jsxq:
|
||||
base-url: ${JSXQ_BASE_URL:https://jsxq.jianshixingqiu.com/api/admin}
|
||||
token: ${JSXQ_TOKEN:f69b5086-97b0-4e5e-b172-453e444d448c}
|
||||
tenant-id: ${JSXQ_TENANT_ID:1}
|
||||
client-toc: ${JSXQ_CLIENT_TOC:Y}
|
||||
|
||||
@@ -101,4 +101,11 @@ app:
|
||||
job-recommend:
|
||||
base-url: ${AI_BASE_URL:https://ark.cn-beijing.volces.com/api/v3}
|
||||
api-key: ${AI_API_KEY:fd065993-bee2-4f31-8bf2-56d5d3012c02}
|
||||
model: ${AI_MODEL:doubao-1-5-lite-32k-250115}
|
||||
model: ${AI_MODEL:doubao-1-5-lite-32k-250115}
|
||||
|
||||
# 简史星球开放平台配置
|
||||
jsxq:
|
||||
base-url: ${JSXQ_BASE_URL:https://jsxq.jianshixingqiu.com/api/admin}
|
||||
token: ${JSXQ_TOKEN:f69b5086-97b0-4e5e-b172-453e444d448c}
|
||||
tenant-id: ${JSXQ_TENANT_ID:1}
|
||||
client-toc: ${JSXQ_CLIENT_TOC:Y}
|
||||
|
||||
@@ -102,4 +102,11 @@ app:
|
||||
job-recommend:
|
||||
base-url: ${AI_BASE_URL:https://ark.cn-beijing.volces.com/api/v3}
|
||||
api-key: ${AI_API_KEY:fd065993-bee2-4f31-8bf2-56d5d3012c02}
|
||||
model: ${AI_MODEL:doubao-1-5-lite-32k-250115}
|
||||
model: ${AI_MODEL:doubao-1-5-lite-32k-250115}
|
||||
|
||||
# 简史星球开放平台配置
|
||||
jsxq:
|
||||
base-url: ${JSXQ_BASE_URL:https://jsxq.jianshixingqiu.com/api/admin}
|
||||
token: ${JSXQ_TOKEN:f69b5086-97b0-4e5e-b172-453e444d448c}
|
||||
tenant-id: ${JSXQ_TENANT_ID:1}
|
||||
client-toc: ${JSXQ_CLIENT_TOC:Y}
|
||||
|
||||
Reference in New Issue
Block a user