|
|
@@ -27,7 +27,7 @@ public class IdentityAuthController extends BaseController {
|
|
|
private IdentityAuthService identityAuthService;
|
|
|
private IdentityAuthRepo identityAuthRepo;
|
|
|
|
|
|
- // @PreAuthorize("hasAnyRole('ADMIN','OPERATOR')")
|
|
|
+ @PreAuthorize("hasAnyRole('ADMIN','OPERATOR')")
|
|
|
@PostMapping("/all")
|
|
|
public Page<IdentityAuth> all(@RequestBody PageQuery pageQuery) {
|
|
|
return identityAuthService.all(pageQuery);
|
|
|
@@ -71,6 +71,7 @@ public class IdentityAuthController extends BaseController {
|
|
|
identityAuthService.audit(id, AuthStatus.FAIL, reason);
|
|
|
}
|
|
|
|
|
|
+ @PreAuthorize("hasAnyRole('ADMIN', 'OPERATOR')")
|
|
|
@ApiOperation("查找重复身份证")
|
|
|
@PostMapping("/repeat")
|
|
|
public List<User> repeat(@RequestParam String idNo, @RequestParam Long userId) {
|
|
|
@@ -82,6 +83,7 @@ public class IdentityAuthController extends BaseController {
|
|
|
identityAuthService.removeDuplicated();
|
|
|
}
|
|
|
|
|
|
+ @PreAuthorize("hasAnyRole('ADMIN', 'OPERATOR')")
|
|
|
@PostMapping("/autoAuth")
|
|
|
public Object authAuth(@RequestParam Long id) {
|
|
|
IdentityAuth identityAuth = identityAuthRepo.findById(id).orElseThrow(new BusinessException("无记录"));
|
|
|
@@ -89,5 +91,10 @@ public class IdentityAuthController extends BaseController {
|
|
|
identityAuthService.audit(identityAuth.getId(), (AuthStatus) map.get("status"), (String) map.get("reason"));
|
|
|
return map;
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/my")
|
|
|
+ public String my(){
|
|
|
+ return identityAuthRepo.findFirstByUserId(SecurityUtils.getAuthenticatedUser().getId()).getStatus().toString();
|
|
|
+ }
|
|
|
}
|
|
|
|