|
|
@@ -28,19 +28,20 @@ import me.zhengjie.application.admin.service.dto.JwtUserDto;
|
|
|
import me.zhengjie.application.admin.service.dto.RoleSmallDto;
|
|
|
import me.zhengjie.application.admin.service.dto.UserDto;
|
|
|
import me.zhengjie.application.admin.service.dto.UserQueryCriteria;
|
|
|
-import me.zhengjie.application.bank.service.FileInfoService;
|
|
|
import me.zhengjie.base.AppBaseResponse;
|
|
|
import me.zhengjie.base.util.ApplicationContextUtil;
|
|
|
import me.zhengjie.base.util.FileUploadUtil;
|
|
|
import me.zhengjie.config.RsaProperties;
|
|
|
-import me.zhengjie.dao.mybatis.entity.*;
|
|
|
+import me.zhengjie.dao.mybatis.entity.Dept;
|
|
|
+import me.zhengjie.dao.mybatis.entity.FileInfoEntity;
|
|
|
+import me.zhengjie.dao.mybatis.entity.NotaryOfficeEntity;
|
|
|
+import me.zhengjie.dao.mybatis.entity.User;
|
|
|
import me.zhengjie.dao.mybatis.mapper.BankMapper;
|
|
|
import me.zhengjie.dao.mybatis.mapper.FileInfoMapper;
|
|
|
import me.zhengjie.dao.mybatis.mapper.NotaryOfficeMapper;
|
|
|
import me.zhengjie.exception.BadRequestException;
|
|
|
import me.zhengjie.utils.RsaUtils;
|
|
|
import me.zhengjie.utils.enums.CodeEnum;
|
|
|
-
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
@@ -149,6 +150,17 @@ public class UserController {
|
|
|
return new ResponseEntity<>(userList,HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
+ @Log("重置密码")
|
|
|
+ @ApiOperation("重置密码")
|
|
|
+ @PostMapping("/reset-password")
|
|
|
+ @PreAuthorize("@el.check('user:reset')")
|
|
|
+ public AppBaseResponse resetPassword(@RequestBody User user) {
|
|
|
+ checkLevel(user);
|
|
|
+ // 默认密码 123456
|
|
|
+ userService.updatePass(user.getUsername(), passwordEncoder.encode("123456"));
|
|
|
+ return AppBaseResponse.success();
|
|
|
+ }
|
|
|
+
|
|
|
@Log("新增用户")
|
|
|
@ApiOperation("新增用户")
|
|
|
@PostMapping
|
|
|
@@ -215,7 +227,7 @@ public class UserController {
|
|
|
|
|
|
@ApiOperation("修改头像")
|
|
|
@PostMapping(value = "/updateAvatar")
|
|
|
- public ResponseEntity<Object> updateUserAvatar(@RequestParam MultipartFile avatar){
|
|
|
+ public ResponseEntity<Object> updateUserAvatar(@RequestParam MultipartFile avatar) {
|
|
|
return new ResponseEntity<>(userService.updateAvatar(avatar), HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
@@ -277,7 +289,6 @@ public class UserController {
|
|
|
* @param user
|
|
|
* @return
|
|
|
*/
|
|
|
-
|
|
|
@PostMapping(value = "/uploadSeal")
|
|
|
public AppBaseResponse uploadSeal(@RequestBody User user){
|
|
|
return userService.uploadSeal(user);
|