mirror of https://gitee.com/topiam/eiam
pull/59/head
parent
fd3827e3f3
commit
afd373f8a0
|
@ -161,7 +161,7 @@ public class AppRepositoryCustomizedImpl implements AppRepositoryCustomized {
|
|||
Map<String, Object> paramMap = new HashMap<>(16);
|
||||
paramMap.put("subjectIds", paramList);
|
||||
StringBuilder builder = new StringBuilder(
|
||||
"SELECT count(DISTINCT app.id_) FROM app LEFT JOIN app_access_policy app_acce ON app.id_ = app_acce.app_id AND app_acce.is_deleted = '0' WHERE app.is_enabled = 1 AND app.is_deleted = '0' AND (app_acce.subject_id IN (:subjectIds) OR app.authorization_type = '"
|
||||
"SELECT COUNT(DISTINCT app.id_) FROM app LEFT JOIN app_access_policy app_acce ON app.id_ = app_acce.app_id AND app_acce.is_deleted = '0' WHERE app.is_enabled = 1 AND app.is_deleted = '0' AND (app_acce.subject_id IN (:subjectIds) OR app.authorization_type = '"
|
||||
+ ALL_ACCESS.getCode() + "')");
|
||||
return namedParameterJdbcTemplate.queryForObject(builder.toString(), paramMap, Long.class);
|
||||
//@formatter:off
|
||||
|
|
|
@ -58,13 +58,11 @@ public class AppController {
|
|||
*/
|
||||
@Operation(summary = "获取应用数量")
|
||||
@GetMapping(value = "/count")
|
||||
public ApiRestResult<String> getAppCount(String groupId) {
|
||||
public ApiRestResult<String> getAppCount() {
|
||||
Long count;
|
||||
if (StringUtils.isEmpty(groupId)) {
|
||||
|
||||
count = appService.getAppCount();
|
||||
} else {
|
||||
count = appService.getAppCount(groupId);
|
||||
}
|
||||
|
||||
return ApiRestResult.ok(count.toString());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue