| | |
| | | import me.zhengjie.utils.*; |
| | | import me.zhengjie.modules.system.service.UserService; |
| | | import me.zhengjie.utils.enums.CodeEnum; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | return new ResponseEntity<>(PageUtil.toPage(null,0),HttpStatus.OK); |
| | | } |
| | | |
| | | @Log("新增用户") |
| | | // @Log("新增用户") |
| | | @ApiOperation("新增用户") |
| | | @PostMapping |
| | | @PreAuthorize("@el.check('user:add')") |
| | |
| | | throw new BadRequestException("新密码不能与旧密码相同"); |
| | | } |
| | | userService.updatePass(user.getUsername(),passwordEncoder.encode(newPass)); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | |
| | | @ApiOperation("重置密码") |
| | | @PostMapping(value = "/resetPass") |
| | | public ResponseEntity<Object> resetUserPass(@RequestBody User passVo) throws Exception { |
| | | UserDto user = userService.findByName(passVo.getUsername()); |
| | | userService.updatePass(user.getUsername(),passwordEncoder.encode("123456")); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | |
| | |
| | | |
| | | @GetMapping("/getPerformanceDetail") |
| | | public ResponseEntity<Object> getPerformanceDetail(Long nextMonth) throws ParseException { |
| | | return new ResponseEntity<>(userService.getPerformanceDetail(nextMonth),HttpStatus.OK); |
| | | return new ResponseEntity<>(HttpStatus.OK); // userService.getPerformanceDetail(nextMonth), |
| | | |
| | | } |
| | | |