(improvement)(semantic) create model demo data through api instead of data-h2.sql

(improvement)(semantic) create benchmark demo data through api instead of data-h2.sql
This commit is contained in:
jolunoluo
2023-09-22 22:16:54 +08:00
parent 0982c013d1
commit ccfdec8b45
41 changed files with 616 additions and 153 deletions

View File

@@ -10,7 +10,7 @@ public interface AuthService {
List<AuthGroup> queryAuthGroups(String domainId, Integer groupId);
void updateAuthGroup(AuthGroup group);
void addOrUpdateAuthGroup(AuthGroup group);
void removeAuthGroup(AuthGroup group);

View File

@@ -53,7 +53,7 @@ public class AuthServiceImpl implements AuthService {
}
@Override
public void updateAuthGroup(AuthGroup group) {
public void addOrUpdateAuthGroup(AuthGroup group) {
Gson g = new Gson();
if (group.getGroupId() == null) {
int nextGroupId = 1;

View File

@@ -40,7 +40,7 @@ public class AuthController {
@PostMapping("/createGroup")
public void newAuthGroup(@RequestBody AuthGroup group) {
group.setGroupId(null);
authService.updateAuthGroup(group);
authService.addOrUpdateAuthGroup(group);
}
@PostMapping("/removeGroup")
@@ -58,7 +58,7 @@ public class AuthController {
if (group.getGroupId() == null || group.getGroupId() == 0) {
throw new RuntimeException("groupId is empty");
}
authService.updateAuthGroup(group);
authService.addOrUpdateAuthGroup(group);
}
/**