| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.clients.UserLoginUtils; |
| | | import com.yuanchu.limslaboratory.pojo.User; |
| | | import com.yuanchu.limslaboratory.service.RoleManagerService; |
| | | import com.yuanchu.limslaboratory.service.UserService; |
| | | import com.yuanchu.limslaboratory.shiro.realm.ShiroRealm; |
| | | import com.yuanchu.limslaboratory.utils.JackSonUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import com.yuanchu.limslaboratory.utils.SpringUtil; |
| | | import com.yuanchu.limslaboratory.pojo.vo.NewPersonnelVo; |
| | | import com.yuanchu.limslaboratory.pojo.vo.PagePersonnelVo; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import com.yuanchu.limslaboratory.pojo.vo.UpdatePersonnelVo; |
| | | import io.swagger.annotations.*; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private RoleManagerService roleManagerService; |
| | | |
| | | @ApiOperation("用户登录") |
| | | @ApiImplicitParams(value = { |
| | |
| | | }else { |
| | | return Result.fail("登录失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("新增用户获取角色权限信息") |
| | | @GetMapping("/list") |
| | | public Result<?> getUserListRole(){ |
| | | List<Map<String,Object>> data = roleManagerService.getUserListRole(); |
| | | return Result.success(data); |
| | | } |
| | | |
| | | @ApiOperation("登录-->获取用户信息") |
| | |
| | | @ApiImplicitParam(name = "status", value = "在职状态", dataTypeClass = Integer.class) |
| | | }) |
| | | public Result<Map<String, Object>> getNewPersonnelPage(Integer pageNo, Integer pageSize, String name, Integer status) { |
| | | IPage<PagePersonnelVo> PageList = userService.getNewPersonnelPage(name, new Page<Objects>(pageNo, pageSize), status); |
| | | IPage<Map<String, Object>> PageList = userService.getNewPersonnelPage(name, new Page<Objects>(pageNo, pageSize), status); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("row", PageList.getRecords()); |
| | | map.put("total", PageList.getTotal()); |