实现逻辑:
获取分包负责人等特殊角色
This commit is contained in:
parent
565ea4d70b
commit
14194fe6a4
@ -75,4 +75,11 @@ public interface TyrSaasRoleUserApi {
|
||||
@PostMapping("/api/saas-role-user/remove-role-user-relation")
|
||||
ApiResult removeRoleUserRelation(@RequestBody @Valid List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取分包负责人等特殊角色
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/saas-role-user/get-special-role")
|
||||
ApiResult<List<Long>> getSpecialRole();
|
||||
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@ public class RoleUserController implements TyrSaasRoleUserApi {
|
||||
private final SaasRoleUserService saasRoleUserService;
|
||||
private final SaasRoleUserRelationService saasRoleUserRelationService;
|
||||
private final SaasRoleUserRelationDao saasRoleUserRelationDao;
|
||||
|
||||
@Override
|
||||
public ApiResult<Void> saveOrUpdate(@Valid RoleUserReq req) {
|
||||
saasRoleUserService.saveOrUpdate(req);
|
||||
@ -93,4 +94,12 @@ public class RoleUserController implements TyrSaasRoleUserApi {
|
||||
.update();
|
||||
return ApiResult.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分包负责人等特殊角色
|
||||
* @return
|
||||
*/
|
||||
public ApiResult<List<Long>> getSpecialRole() {
|
||||
return ApiResult.ok(saasRoleUserService.getSpecialRole());
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,9 @@ import java.util.Set;
|
||||
*/
|
||||
public interface SaasRoleUserService {
|
||||
|
||||
void saveOrUpdate( RoleUserReq req);
|
||||
List<Long> getSpecialRole();
|
||||
|
||||
void saveOrUpdate(RoleUserReq req);
|
||||
|
||||
/**
|
||||
* 是超管
|
||||
|
||||
@ -54,6 +54,7 @@ public class RoleUserService implements SaasRoleUserService {
|
||||
* 获取分包负责人等特殊角色
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Long> getSpecialRole() {
|
||||
if (participateUnitDefaultRoleId != null && participateUnitDefaultRoleId.size() > 0) {
|
||||
return participateUnitDefaultRoleId.values().stream().collect(Collectors.toList());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user