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.domain.TUser;
|
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 io.swagger.annotations.ApiOperation;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
@FeignClient(contextId = "studyClient", value = ServiceNameConstants.STUDY_SERVICE, fallbackFactory = StudyFallbackFactory.class)
|
public interface StudyClient {
|
|
|
@PostMapping("/base/user/getUserById/{id}")
|
R<TUser> getUserById(@PathVariable("id") Integer id);
|
@PostMapping("/base/user/vipBack/{id}")
|
R vipBack(@PathVariable("id") Integer id);
|
|
@PostMapping("/base/user/userList")
|
R<PageInfo<AppUserVO>> couponReceive(@RequestBody AppUserQuery query);
|
|
@PostMapping("/base/user/getUserInfo")
|
R<UserInfoVO> getUserInfo(@RequestBody UserInfoQuery dto);
|
|
@PostMapping("/base/user/freeze/{id}")
|
R freeze(@PathVariable("id") Integer id);
|
|
@PostMapping("/base/user/vipOrderList")
|
R<PageInfo<VipOrderVO>> vipOrderList(@RequestBody AppUserQuery query);
|
|
/**
|
* 选择故事列表查询
|
*
|
* @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);
|
|
@GetMapping("/base/user/userInfo")
|
@ApiOperation(value = "用户详情", tags = {"学习端-用户详情"})
|
R<UserPersonalCenterVO> userInfo();
|
|
/**
|
* 生成积分明细-用于远程调用
|
*
|
* @param integral 积分变动信息
|
* @param method 变动源
|
* @return 操作结果
|
*/
|
@GetMapping("/base/study/addIntegralDetail")
|
R<Boolean> addIntegralDetail(@RequestParam("integral") String integral, @RequestParam("method") String method);
|
|
/**
|
* 用户积分变动(增加或减少)-用于远程调用
|
*
|
* @param integral 积分变动信息
|
* @param method 变动源
|
* @return 操作结果
|
*/
|
@GetMapping("/base/study/exchangeIntegral")
|
@ApiOperation(value = "用户积分变动", tags = {"用户积分变动"})
|
R<Boolean> exchangeIntegral(@RequestParam("integral") Integer integral, @RequestParam("method") String method);
|
|
/**
|
* 生成积分明细-用于远程调用
|
*
|
* @param integral 积分变动信息
|
* @param method 变动源
|
* @return 操作结果
|
*/
|
@GetMapping("/base/study/addIntegralDetail1")
|
R<Boolean> addIntegralDetail1(@RequestParam("integral") String integral, @RequestParam("method") String method);
|
|
/**
|
* 用户积分变动(增加或减少)-用于远程调用
|
*
|
* @param integral 积分变动信息
|
* @param method 变动源
|
* @return 操作结果
|
*/
|
@GetMapping("/base/study/exchangeIntegral1")
|
@ApiOperation(value = "用户积分变动", tags = {"用户积分变动"})
|
R<Boolean> exchangeIntegral1(@RequestParam("integral") Integer integral, @RequestParam("method") String method);
|
|
}
|