mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 20:25:12 +00:00
[improvement][project] supersonic 0.7.0 version backend update (#24)
* [improvement][project] supersonic 0.7.0 version backend update * [improvement][project] supersonic 0.7.0 version backend update * [improvement][project] supersonic 0.7.0 version readme update --------- Co-authored-by: jolunoluo <jolunoluo@tencent.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.tencent.supersonic.auth.api.authentication.adaptor;
|
||||
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.Organization;
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import com.tencent.supersonic.auth.api.authentication.request.UserReq;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public interface UserAdaptor {
|
||||
|
||||
List<String> getUserNames();
|
||||
|
||||
List<User> getUserList();
|
||||
|
||||
List<Organization> getOrganizationTree();
|
||||
|
||||
void register(UserReq userReq);
|
||||
|
||||
String login(UserReq userReq);
|
||||
|
||||
List<User> getUserByOrg(String key);
|
||||
|
||||
Set<String> getUserAllOrgId(String userName);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.tencent.supersonic.auth.api.authentication.pojo;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Organization {
|
||||
|
||||
private String id;
|
||||
|
||||
private String parentId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String fullName;
|
||||
|
||||
private List<Organization> subOrganizations = Lists.newArrayList();
|
||||
|
||||
private boolean isRoot;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.tencent.supersonic.auth.api.authentication.service;
|
||||
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.Organization;
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import com.tencent.supersonic.auth.api.authentication.request.UserReq;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
@@ -14,4 +16,10 @@ public interface UserService {
|
||||
void register(UserReq userCmd);
|
||||
|
||||
String login(UserReq userCmd);
|
||||
|
||||
Set<String> getUserAllOrgId(String userName);
|
||||
|
||||
List<User> getUserByOrg(String key);
|
||||
|
||||
List<Organization> getOrganizationTree();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user