|
|
|
|
|
|
|
|
import com.taauav.front.service.IUserAdminService; |
|
|
import com.taauav.front.service.IUserAdminService; |
|
|
import com.taauav.front.vo.UserAdminVo; |
|
|
import com.taauav.front.vo.UserAdminVo; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private Response response; |
|
|
private Response response; |
|
|
|
|
|
@Value("${server.IMAGE_URL}") |
|
|
|
|
|
private String uploadUrl; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取APP首页数据 |
|
|
* 获取APP首页数据 |
|
|
|
|
|
|
|
|
@GetMapping("/userInfo/{userId}") |
|
|
@GetMapping("/userInfo/{userId}") |
|
|
public Response userInfo(@PathVariable("userId") Integer userId) { |
|
|
public Response userInfo(@PathVariable("userId") Integer userId) { |
|
|
UserAdminVo info = adminService.getAdminInfo(userId); |
|
|
UserAdminVo info = adminService.getAdminInfo(userId); |
|
|
|
|
|
if (info != null) { |
|
|
|
|
|
info.setAvatar(uploadUrl + info.getAvatar()); |
|
|
|
|
|
} |
|
|
return response.success(info); |
|
|
return response.success(info); |
|
|
} |
|
|
} |
|
|
|
|
|
|