-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
778 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/vo/UserInfoVo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.data.vo; | ||
|
||
import org.apache.paimon.web.server.data.model.SysMenu; | ||
import org.apache.paimon.web.server.data.model.SysRole; | ||
import org.apache.paimon.web.server.data.model.Tenant; | ||
import org.apache.paimon.web.server.data.model.User; | ||
|
||
import cn.dev33.satoken.stp.SaTokenInfo; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** user data transfer object. */ | ||
@Data | ||
public class UserInfoVo { | ||
/** current user info. */ | ||
private User user; | ||
/** current user's tenant list. */ | ||
private List<Tenant> tenantList; | ||
/** current user's role list. */ | ||
private List<SysRole> roleList; | ||
/** current user's token info. */ | ||
private SaTokenInfo saTokenInfo; | ||
/** current user's menu list. */ | ||
private List<SysMenu> sysMenuList; | ||
/** current user's tenant. */ | ||
private Tenant currentTenant; | ||
} |
27 changes: 27 additions & 0 deletions
27
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/RoleMenuService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.service; | ||
|
||
import org.apache.paimon.web.server.data.model.RoleMenu; | ||
|
||
import com.baomidou.mybatisplus.extension.service.IService; | ||
|
||
/** RoleMenu Service. */ | ||
public interface RoleMenuService extends IService<RoleMenu> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/TenantService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.service; | ||
|
||
import org.apache.paimon.web.server.data.model.Tenant; | ||
|
||
import com.baomidou.mybatisplus.extension.service.IService; | ||
|
||
/** Tenant Service. */ | ||
public interface TenantService extends IService<Tenant> {} |
33 changes: 33 additions & 0 deletions
33
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/UserRoleService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.service; | ||
|
||
import org.apache.paimon.web.server.data.model.User; | ||
import org.apache.paimon.web.server.data.model.UserRole; | ||
|
||
import com.baomidou.mybatisplus.extension.service.IService; | ||
|
||
import java.util.List; | ||
|
||
/** UserRole Service. */ | ||
public interface UserRoleService extends IService<UserRole> { | ||
|
||
List<UserRole> selectUserRoleListByUserId(User user); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
paimon-web-server/src/main/java/org/apache/paimon/web/server/service/UserTenantService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.service; | ||
|
||
import org.apache.paimon.web.server.data.model.UserTenant; | ||
|
||
import com.baomidou.mybatisplus.extension.service.IService; | ||
|
||
/** Tenant Service. */ | ||
public interface UserTenantService extends IService<UserTenant> {} |
32 changes: 32 additions & 0 deletions
32
...b-server/src/main/java/org/apache/paimon/web/server/service/impl/RoleMenuServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.service.impl; | ||
|
||
import org.apache.paimon.web.server.data.model.RoleMenu; | ||
import org.apache.paimon.web.server.mapper.RoleMenuMapper; | ||
import org.apache.paimon.web.server.service.RoleMenuService; | ||
|
||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** RoleMenuServiceImpl. */ | ||
@Service | ||
public class RoleMenuServiceImpl extends ServiceImpl<RoleMenuMapper, RoleMenu> | ||
implements RoleMenuService {} |
31 changes: 31 additions & 0 deletions
31
...web-server/src/main/java/org/apache/paimon/web/server/service/impl/TenantServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.service.impl; | ||
|
||
import org.apache.paimon.web.server.data.model.Tenant; | ||
import org.apache.paimon.web.server.mapper.TenantMapper; | ||
import org.apache.paimon.web.server.service.TenantService; | ||
|
||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** TenantServiceImpl. */ | ||
@Service | ||
public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> implements TenantService {} |
42 changes: 42 additions & 0 deletions
42
...b-server/src/main/java/org/apache/paimon/web/server/service/impl/UserRoleServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package org.apache.paimon.web.server.service.impl; | ||
|
||
import org.apache.paimon.web.server.data.model.User; | ||
import org.apache.paimon.web.server.data.model.UserRole; | ||
import org.apache.paimon.web.server.mapper.UserRoleMapper; | ||
import org.apache.paimon.web.server.service.UserRoleService; | ||
|
||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.List; | ||
|
||
/** UserRoleServiceImpl. */ | ||
@Service | ||
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> | ||
implements UserRoleService { | ||
|
||
@Override | ||
public List<UserRole> selectUserRoleListByUserId(User user) { | ||
return list(new LambdaQueryWrapper<UserRole>().eq(UserRole::getUserId, user.getId())); | ||
} | ||
} |
Oops, something went wrong.