package com.ruoyi.study.api.feignClient;
|
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.web.page.PageInfo;
|
import com.ruoyi.study.api.dto.*;
|
import com.ruoyi.study.api.factory.StudyFallbackFactory;
|
import com.ruoyi.study.api.model.TStory;
|
import com.ruoyi.study.api.model.TSubject;
|
import com.ruoyi.study.api.vo.StudyDTO;
|
import com.ruoyi.study.api.vo.*;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import java.util.List;
|
|
@FeignClient(contextId = "studyClient", value = ServiceNameConstants.STUDY_SERVICE, fallbackFactory = StudyFallbackFactory.class)
|
public interface StudyClient {
|
|
|
/**
|
* 选择故事列表查询
|
* @param query
|
* @return
|
*/
|
@PostMapping("/base/study/storyList")
|
R<PageInfo<TStory>> storyList(@RequestBody ChoiceStory query);
|
/**
|
* 选择题目列表查询
|
* @param query
|
* @return
|
*/
|
@PostMapping("/base/study/subjectList")
|
R<PageInfo<TSubject>> subjectList(@RequestBody ChoiceSubject query);
|
/**
|
* 新增/修改学习类型配置
|
* @return
|
*/
|
@PostMapping("/base/study/addStudySet")
|
R<Object> addStudySet(@RequestBody AddStudySetDTO dto);
|
/**
|
* 通过类型、周目、day查询学习配置
|
* @return
|
*/
|
@PostMapping("/base/study/getStudySet")
|
R<StudyVO> getStudySet(@RequestBody StudyDTO dto);
|
/**
|
* 学习类型列表查询
|
* @return
|
*/
|
@PostMapping("/base/study/getStudyList")
|
R<List<StudyListVO>> getStudyList();
|
/**
|
* 添加周目
|
* @return
|
*/
|
@PostMapping("/base/study/addWeek")
|
R<Object> addWeek(@RequestBody AddWeekDTO dto);
|
|
/**
|
* 题目管理列表查询
|
* @param query
|
* @return
|
*/
|
@PostMapping("/base/tSubject/subjectList")
|
R<PageInfo<SubjectVO>> subjectList(@RequestBody SubjectQuery query);
|
/**
|
* 题目管理添加
|
* @return
|
*/
|
@PostMapping("/base/tSubject/add")
|
R add(@RequestBody SubjectDTO dto) ;
|
/**
|
* 题目管理编辑
|
* @return
|
*/
|
@PostMapping("/base/tSubject/update")
|
R update(@RequestBody SubjectDTO dto);
|
|
/**
|
* 查看详情
|
* @param id
|
* @return
|
*/
|
@PostMapping("/base/tSubject/getInfo")
|
R<SubjectDTO> getInfo(@RequestParam("id") Integer id);
|
/**
|
* 修改题目状态
|
* @param id
|
* @return
|
*/
|
@PostMapping("/base/tSubject/updateState/{id}/{state}")
|
R updateState(@PathVariable("id") Integer id, @PathVariable("state") Integer state);
|
|
/**
|
* 故事管理列表查询
|
* @param query
|
* @return
|
*/
|
@PostMapping("/base/tStory/storyList")
|
R<PageInfo<SubjectVO>> storyList(@RequestBody SubjectQuery query);
|
|
/**
|
* 故事管理添加
|
* @param dto
|
* @return
|
*/
|
@PostMapping("/base/tStory/add")
|
R add(@RequestBody StoryDTO dto);
|
/**
|
* 故事管理编辑
|
* @param dto
|
* @return
|
*/
|
@PostMapping("/base/tStory/update")
|
R update(@RequestBody StoryDTO dto);
|
/**
|
* 故事管理查看详情
|
* @return
|
*/
|
@PostMapping("/base/tStory/getInfo")
|
R<StoryDTO> getInfo1(@RequestParam("id") Integer id);
|
|
/**
|
* 故事管理修改状态
|
* @param id
|
* @param state
|
* @return
|
*/
|
@PostMapping("/base/tStory/updateState/{id}/{state}")
|
R updateState1(@PathVariable("id") Integer id,@PathVariable("state")Integer state);
|
}
|