| | |
| | | @RequestMapping("user") |
| | | @Api(tags = "用户管理-用户") |
| | | @Slf4j |
| | | public class UserController { |
| | | public class UserController extends BaseController{ |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | |
| | | return new Response().set(1,userService.getAllWithPage(pageNum,pageSize)); |
| | | } |
| | | |
| | | @PutMapping |
| | | @PostMapping("update") |
| | | @ApiOperation(value = "编辑") |
| | | public Response update(@RequestBody UserInf user){ |
| | | return userService.update(user); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @PostMapping("delete") |
| | | @ApiOperation(value = "删除") |
| | | public Response delete(@RequestParam int id){ |
| | | userService.delete(id); |
| | |
| | | public Response checkUserPasswordOfREA(@RequestParam String pwd){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | String passwordEncrypt = null; |
| | | try { |
| | | /*try { |
| | | passwordEncrypt = URLDecoder.decode(pwd, "utf-8"); |
| | | }catch (UnsupportedEncodingException e){ |
| | | e.printStackTrace(); |
| | | } |
| | | }*/ |
| | | passwordEncrypt = pwd; |
| | | String password = RSAUtil.decryptFront(passwordEncrypt, RSAUtil.fontSeparator)[0]; |
| | | String passwordDB = RSAUtil.decrypt(userInf.getUpassword(),RSAUtil.getPrivateKey()); |
| | | if(passwordDB.equals(password)){ |
| | |
| | | * 1.首次登录,请先修改初始化口令 |
| | | * 2.超过3个月没有修改口令,请修改口令后重新登录 |
| | | */ |
| | | @PutMapping("updatePassword2") |
| | | @PostMapping("updatePassword2") |
| | | @ApiOperation(value = "修改密码-3个月未登录") |
| | | public Response updatePassword2(@RequestParam String passwordOld,String passwordNew){ |
| | | //校验老密码 |
| | |
| | | * 账号解锁 |
| | | */ |
| | | @ApiOperation(value = "账号解锁",notes = "unLockType=1为失败锁定解锁,2为上个月未登录锁定解锁") |
| | | @PutMapping("unLock") |
| | | @PostMapping("unLock") |
| | | public Response unLock(@RequestParam int uId,@RequestParam int unLockType){ |
| | | userService.unLock(uId,unLockType); |
| | | return new Response().setII(1,"解锁成功"); |
| | |
| | | * @param stationId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据站点查询相关人员") |
| | | @ApiOperation(tags = "告警派单", value = "根据站点查询相关人员", notes = "User_infAction!getUserInfoByStationId") |
| | | @GetMapping("getUserInfoByStationId") |
| | | public Response getUserInfoByStationId(@RequestParam String stationId){ |
| | | List<UserInf> list = userService.getUserInfoByStationId(stationId); |
| | | return new Response().set(1,list); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "伪单点登录",notes = "返回的data为布尔值,是否登录成功;data2:用户所在的权限组id;data3为用户对象,内含属性uid,uname,urole") |
| | | @GetMapping("loginByUId") |
| | | public Response searchSnIdByUId(@RequestParam int uId){ |
| | | return userService.loginByUId(uId); |
| | | } |
| | | |
| | | } |