package com.xinquan.user.api.feign; 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.system.api.domain.*; import com.xinquan.system.api.domain.vo.AppUserVO; import com.xinquan.system.api.model.AppCaptchaBody; import com.xinquan.system.api.model.AppLoginUser; import com.xinquan.system.api.model.AppVerifyCellPhoneBody; import com.xinquan.system.api.model.AppWXLoginBody; import com.xinquan.user.api.domain.dto.AppUserDTO; import com.xinquan.user.api.factory.RemoteAppUserFallbackFactory; import java.util.Collection; import java.util.List; import io.swagger.annotations.ApiOperation; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; /** * @author mitao * @date 2024/8/21 */ @FeignClient(contextId = "remoteAppUserService", value = ServiceNameConstants.APP_USER_SERVICE, fallbackFactory = RemoteAppUserFallbackFactory.class) public interface RemoteAppUserService { /** * 后台远程调用 新增回复消息 * @return */ @PostMapping("/client/user/notice-record/addNoticeReplay") public R addNoticeReplay(@RequestBody NoticeRecord noticeRecord); /** * 远程调用根据用户id 查询用户 */ @PostMapping("/client/app-user/getAppUserById/{id}") public R getAppUserById(@PathVariable("id")String id); /** * 远程调用根据用户名称 查询用户 */ @PostMapping("/client/app-user/getAppUserByName/{name}") public R> getAppUserByName(@PathVariable("name")String name); @PostMapping("/getAppUserByNameOrPhone/{name}") public R> getAppUserByNameOrPhone(@PathVariable("name")String name); @PostMapping("/client/tag/queryTag/{name}") public R> queryTag(@PathVariable("name") String name); @PostMapping("/client/app-user/getCurrentUser") public R getCurrentUser(); @GetMapping("/client/app-user-course/getPayCourse/{pageCurr}/{pageSize}") R> getPayCourse(@PathVariable("pageCurr")Integer pageCurr, @PathVariable("pageSize")Integer pageSize); @PostMapping("/user/app-user-viewing-history/getCourseStudyHistory") R getCourseStudyHistory(@RequestParam("chapterId") Long chapterId); @GetMapping("/client/app-user-course/getUserByCourseId/{courseId}") R> getUserByCourseId(@PathVariable("courseId") Long courseId); /** * 获取未注销的用户信息 * * @param dto * @param source * @return */ @PostMapping("/inner/app-user/getUserByCondition") R getUserByCondition(@RequestBody AppUserDTO dto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * APP用户注册 * * @param appUserDTO * @param source * @return */ @PostMapping("/inner/app-user/registerAppUser") R registerAppUser(@RequestBody AppUserDTO appUserDTO, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * APP微信登录 * * @param body * @param source * @return */ @PostMapping("/inner/app-user/wxLogin") R wxLogin(@RequestBody AppWXLoginBody body, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * APP苹果登录 * * @param appleId * @param source * @return */ @PostMapping("/inner/app-user/appleLogin") R appleLogin(@RequestParam("appleId") String appleId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * 验证码登录 * * @param body * @param source * @return */ @PostMapping("/inner/app-user/captchaLogin") R appCaptchaLogin(@RequestBody AppCaptchaBody body, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * 微信苹果登录验证手机号码操作 * * @param body * @param source * @return */ @PostMapping("/inner/app-user/verifyCellPhone") R verifyCellPhone(@RequestBody AppVerifyCellPhoneBody body, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * 更新用户信息 * * @param dto * @param source * @return */ @PostMapping("/inner/app-user/updateAppUser") R updateAppUser(@RequestBody AppUserDTO dto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); /** * 获取用户列表 * * @param appUserIdSet 用户id列表 * @param source 请求来源 * @return */ @PostMapping("/inner/app-user/getAppUserList") R> getAppUserList(@RequestBody Collection appUserIdSet, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); }