|
|
@@ -8,6 +8,7 @@ import com.taauav.front.entity.UserNotice; |
|
|
|
import com.taauav.front.service.IUserAdminService; |
|
|
|
import com.taauav.front.vo.UserAdminVo; |
|
|
|
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.PathVariable; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
@@ -30,6 +31,8 @@ public class HomeController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private Response response; |
|
|
|
@Value("${server.IMAGE_URL}") |
|
|
|
private String uploadUrl; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取APP首页数据 |
|
|
@@ -57,6 +60,9 @@ public class HomeController { |
|
|
|
@GetMapping("/userInfo/{userId}") |
|
|
|
public Response userInfo(@PathVariable("userId") Integer userId) { |
|
|
|
UserAdminVo info = adminService.getAdminInfo(userId); |
|
|
|
if (info != null) { |
|
|
|
info.setAvatar(uploadUrl + info.getAvatar()); |
|
|
|
} |
|
|
|
return response.success(info); |
|
|
|
} |
|
|
|
|