@RequestMapping("/user/InfoByCode")
@ResponseBody
@ApiOperation(value = "gateway 获取用户ID,用于放到header里面", httpMethod = "POST")
public UserInfoView InfoByCode(@RequestParam("code") String code) {
return UserInfoView.of(users.findFirstByInvitationCode(code));
}
@FeignClient(value = "THORUSER",url = "http://localhost:3331")
public interface UserClient {
@RequestMapping("/user/InfoByCode")
UserInfoView InfoByCode(@RequestParam("code") String code);
}
、