| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.clients.UserLoginUtils; |
| | | import com.yuanchu.limslaboratory.pojo.Enterprise; |
| | | 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.MyUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import com.yuanchu.limslaboratory.utils.SpringUtil; |
| | | import com.yuanchu.limslaboratory.vo.NewPersonnelVo; |
| | | import com.yuanchu.limslaboratory.vo.PagePersonnelVo; |
| | | import com.yuanchu.limslaboratory.pojo.vo.NewPersonnelVo; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import com.yuanchu.limslaboratory.vo.UpdatePersonnelVo; |
| | | import com.yuanchu.limslaboratory.pojo.vo.UpdatePersonnelVo; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authc.IncorrectCredentialsException; |
| | |
| | | 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("登录-->获取用户信息") |
| | |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageNo", value = "起始页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "pageSize", value = "每一页数量", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "name", value = "人员名称", dataTypeClass = String.class) |
| | | @ApiImplicitParam(name = "name", value = "人员名称", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "status", value = "在职状态", dataTypeClass = Integer.class) |
| | | }) |
| | | public Result<Map<String, Object>> getNewPersonnelPage(Integer pageNo, Integer pageSize, String name) { |
| | | IPage<PagePersonnelVo> PageList = userService.getNewPersonnelPage(name, new Page<Objects>(pageNo, pageSize)); |
| | | public Result<Map<String, Object>> getNewPersonnelPage(Integer pageNo, Integer pageSize, String name, Integer 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()); |