| | |
| | | package com.xinquan.meditation.api.feign; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.xinquan.common.core.constant.SecurityConstants; |
| | | import com.xinquan.common.core.constant.ServiceNameConstants; |
| | | import com.xinquan.common.core.domain.R; |
| | | import com.xinquan.common.core.utils.page.PageDTO; |
| | | import com.xinquan.meditation.api.domain.Meditation; |
| | | import com.xinquan.meditation.api.domain.vo.NoticeDetailVO; |
| | | import com.xinquan.meditation.api.factory.RemoteMeditationFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author mitao |
| | |
| | | */ |
| | | @FeignClient(contextId = "remoteMeditationService", value = ServiceNameConstants.MEDITATION_SERVICE, fallbackFactory = RemoteMeditationFallbackFactory.class) |
| | | public interface RemoteMeditationService { |
| | | /** |
| | | * 远程调用 查询待回复内容数量 |
| | | * @return |
| | | */ |
| | | @PostMapping("/client/meditation/meditation-question/getQuestionCount") |
| | | public R<String> getQuestionCount(); |
| | | @GetMapping("/client/meditation/meditation/getMeditationCount") |
| | | public R<String> getMeditationCount(); |
| | | /** |
| | | * 远程调用 通过疗愈名字查询疗愈ids |
| | | * @return |
| | | */ |
| | | @PostMapping("/getMeditationIdsByName/{name}") |
| | | public R<List<Long>> getMeditationIdsByName(@PathVariable("name") String name); |
| | | |
| | | /** |
| | | * 根据id获取冥想音频 |
| | |
| | | @GetMapping("/inner/meditation/meditation/getMeditationById") |
| | | R<Meditation> getMeditationById(@RequestParam("targetId") Long targetId, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | | * 远程调用 查询回复通知消息内容 |
| | | * @return |
| | | */ |
| | | @PostMapping("/client/user/notice-record/noticeDetail") |
| | | public R<NoticeDetailVO> noticeDetail(NoticeDetailVO req); |
| | | @GetMapping("/client/meditation/meditation/getMeditationById/{id}") |
| | | public R<Meditation> getMeditationById(@PathVariable("id") Long id); |
| | | @GetMapping("/client/meditation/meditation/getMeditationById/{pageCurr}/{pageSize}/{id}") |
| | | public R<Page<Meditation>> getMeditationById(@PathVariable("pageCurr") Integer pageCurr, |
| | | @PathVariable("pageSize") Integer pageSize, |
| | | @PathVariable("id")Long id |
| | | ); |
| | | @GetMapping("/client/meditation/meditation/getMeditationByIds/{pageCurr}/{pageSize}/{ids}") |
| | | public R<Page<Meditation>> getMeditationByIds(@PathVariable("pageCurr") Integer pageCurr, |
| | | @PathVariable("pageSize") Integer pageSize, |
| | | @PathVariable("ids")String ids |
| | | ); |
| | | } |