查询实例总数

develop
guyuliang 2024-08-24 19:31:34 +08:00
parent a816dffe8c
commit 26f1174134
2 changed files with 1 additions and 3 deletions

View File

@ -35,10 +35,8 @@ public class CmpInternalService implements InitializingBean {
public GeneralResult<JSONObject> list(Map<String,Object> params) { public GeneralResult<JSONObject> list(Map<String,Object> params) {
String url = "/v1/vms"; String url = "/v1/vms";
log.info("params:{}", JSON.toJSONString(params));
RemoteService remoteService = serviceFactory.build(SERVICE, url, HttpMethod.GET, headers, params); RemoteService remoteService = serviceFactory.build(SERVICE, url, HttpMethod.GET, headers, params);
GeneralResult<?> result = remoteService.invoke(); GeneralResult<?> result = remoteService.invoke();
log.info("result:{}",JSON.toJSONString(result));
if (result.isFailed()) { if (result.isFailed()) {
return new GeneralResult<>(false, result.getMessage()); return new GeneralResult<>(false, result.getMessage());
} }

View File

@ -493,7 +493,7 @@ public class ModuleServiceImpl implements ModuleService {
Param param = new Param(); Param param = new Param();
param.setParam(MapTools.simpleMap("moduleId", model.getId())); param.setParam(MapTools.simpleMap("moduleId", model.getId()));
boolean adminRole = instanceService.checkAdminRole(userId); boolean adminRole = instanceService.checkAdminRole(userId);
int count = instanceRepository.count((List<Param>) param, table, valueTable, userId, adminRole); int count = instanceRepository.count(paramList, table, valueTable, userId, adminRole);
total+=count; total+=count;
} }
resultMap.put(rootGroup.getCode(), total); resultMap.put(rootGroup.getCode(), total);