RemoteUserModService.java
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package cn.brotop.api.user;
import cn.brotop.api.user.DTO.UserDTO;
import cn.brotop.api.user.factory.RemoteUserModFallbackFactory;
import cn.brotop.common.core.constant.ServiceNameConstants;
import cn.brotop.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 用户模块API服务
* @author 啊雷
* @version 1.0
* @date 2021/1/20 9:47
*/
@FeignClient(contextId = "remoteUserModService", value = ServiceNameConstants.USER_SERVICE, fallbackFactory = RemoteUserModFallbackFactory.class)
public interface RemoteUserModService {
/**
* 根据用户id 查询用户信息
* @param userId 用户id
* @return R<UserDTO>
*/
@GetMapping(value = "/remote_user/getUser")
R<UserDTO> getUser(@RequestParam("userId") Long userId);
/**
* 根据手机 查询用户信息
* @param mobile 手机号
* @return R<UserDTO>
*/
@GetMapping(value = "/remote_user/findByMobile")
R<UserDTO> findByMobile(@RequestParam("mobile") String mobile);
/**
* 新增
* @param userDTO userDTO
* @return R<?>
*/
@PostMapping(value = "/remote_hospital/save")
R<?> save(@RequestBody UserDTO userDTO);
/**
* 根据openId查询用户信息
* @param openid openid
* @return R<UserDTO>
*/
@GetMapping(value = "/remote_user/findByOpenId")
R<UserDTO> findByOpenId(@RequestParam("openid") String openid);
/**
* 根据unionid查询用户信息
* @param unionid unionid
* @return R<UserDTO>
*/
@GetMapping(value = "/remote_user/findByUnionid")
R<UserDTO> findByUnionid(@RequestParam("unionid") String unionid);
/**
* 根据id 查询用户di
* @param userId userID
* @return R<UserDTO>>
*/
@GetMapping(value = "/remote_user/findById")
R<UserDTO> findById(@RequestParam("userId") Long userId);
/**
* 更新用户信息
* @param data data
*/
@PostMapping(value = "/remote_hospital/updateById")
R<?> updateById(@RequestBody UserDTO data);
/**
* 删除用户信息
* @param
*/
@GetMapping(value = "/remote_user/deleteUser")
R<Integer> deleteUser(@RequestParam("id") Long id);
}