sql 调整
All checks were successful
local-test分支构建docker并发布运行 / Docker-Build (push) Successful in 1m28s
All checks were successful
local-test分支构建docker并发布运行 / Docker-Build (push) Successful in 1m28s
This commit is contained in:
parent
f4145b43de
commit
0d47e4af3c
@ -75,6 +75,7 @@ public class RoleAuthController {
|
|||||||
@PostMapping("/role/saveOrUpdate")
|
@PostMapping("/role/saveOrUpdate")
|
||||||
@Operation(summary = "角色编辑")
|
@Operation(summary = "角色编辑")
|
||||||
@ApiResponse(description = "角色编辑")
|
@ApiResponse(description = "角色编辑")
|
||||||
|
@SecurityRequirement(name = "jwt")
|
||||||
public void roleSaveOrUpdate(@RequestBody AuthRoleDTO dto) {
|
public void roleSaveOrUpdate(@RequestBody AuthRoleDTO dto) {
|
||||||
this.authService.saveOrUpdate(dto);
|
this.authService.saveOrUpdate(dto);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package club.joylink.xiannccda.dto.auth;
|
|||||||
|
|
||||||
import club.joylink.xiannccda.entity.AuthRole;
|
import club.joylink.xiannccda.entity.AuthRole;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -11,5 +12,6 @@ public class AuthRoleDTO {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private String name;
|
private String name;
|
||||||
private List<Long> resList;
|
private List<Long> resList;
|
||||||
|
@JsonIgnore
|
||||||
private String apiIds;
|
private String apiIds;
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,9 @@ public class AuthService {
|
|||||||
if (Objects.isNull(dto.getId())) {
|
if (Objects.isNull(dto.getId())) {
|
||||||
AuthRole r = new AuthRole();
|
AuthRole r = new AuthRole();
|
||||||
r.setName(dto.getName());
|
r.setName(dto.getName());
|
||||||
|
|
||||||
this.authRoleRepository.save(r);
|
this.authRoleRepository.save(r);
|
||||||
this.batchSave(dto.getResList(), dto.getId());
|
this.batchSave(dto.getResList(), r.getId());
|
||||||
} else {
|
} else {
|
||||||
AuthRole r = this.authRoleRepository.getById(dto.getId());
|
AuthRole r = this.authRoleRepository.getById(dto.getId());
|
||||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(r));
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(r));
|
||||||
|
Loading…
Reference in New Issue
Block a user