|
@@ -1,5 +1,6 @@
|
|
|
package com.diagbot.web;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.annotation.SysLogger;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.User;
|
|
@@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @Description: 用户对外接口层
|
|
|
* @author: gaodm
|
|
@@ -57,6 +60,20 @@ public class UserController {
|
|
|
return RespDTO.onSuc(user);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "根据用户id获取用户信息", notes = "根据用户id获取用户信息")
|
|
|
+ @PostMapping("/getById")
|
|
|
+ @PreAuthorize("hasRole('USER')")
|
|
|
+// @SysLogger("getUserInfoByID")
|
|
|
+ // @PreAuthorize("hasAnyAuthority('ROLE_USER')")
|
|
|
+ public RespDTO getUserInfoByID(Long id, Page page){
|
|
|
+ //参数判读省略
|
|
|
+ Page<Map> mapPage = new Page<>(page.getCurrent(),page.getSize());
|
|
|
+ User userVo = new User();
|
|
|
+ userVo.setId(id);
|
|
|
+ Page<User> user= userFacade.selectUserListPage(mapPage, userVo);
|
|
|
+ return RespDTO.onSuc(user);
|
|
|
+ }
|
|
|
+
|
|
|
// @Autowired
|
|
|
// private AmqpTemplate rabbitTemplate;
|
|
|
// @GetMapping("/test")
|