parent
c4dcb0c4cc
commit
9e59df5338
|
@ -2030,24 +2030,24 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
});
|
||||
}, executor);
|
||||
|
||||
CompletableFuture<Void> infrastructureCount = CompletableFuture.runAsync(() -> { //基础设施
|
||||
HashMap<Object, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("cameraName", keyWorld);
|
||||
Integer countNew = cameraChannelMapper.selectByParentIdCountNew(queryMap, null, "");
|
||||
resultList.add(new HashMap<String, Object>() {
|
||||
{
|
||||
put("count", countNew + "");
|
||||
put("type", "基础设施");
|
||||
}
|
||||
});
|
||||
//2022-11-1 去除摄像头查询
|
||||
//CompletableFuture<Void> infrastructureCount = CompletableFuture.runAsync(() -> { //基础设施
|
||||
// HashMap<Object, Object> queryMap = new HashMap<>();
|
||||
// queryMap.put("cameraName", keyWorld);
|
||||
// Integer countNew = cameraChannelMapper.selectByParentIdCountNew(queryMap, null, "");
|
||||
// resultList.add(new HashMap<String, Object>() {
|
||||
// {
|
||||
// put("count", countNew + "");
|
||||
// put("type", "基础设施");
|
||||
// }
|
||||
// });
|
||||
//
|
||||
//}, executor);
|
||||
|
||||
}, executor);
|
||||
//统计增加会议室搜索结果
|
||||
CompletableFuture<Void> meetingRoomCount = CompletableFuture.runAsync(() -> { //会议室
|
||||
meetCountNew[0] = tMeetingroomMapper.selectByName(keyWorld).size();
|
||||
}, executor);
|
||||
CompletableFuture<Void> meetingRoomCount = CompletableFuture.runAsync(() -> meetCountNew[0] = tMeetingroomMapper.selectByName(keyWorld).size(), executor);
|
||||
|
||||
CompletableFuture<Void> all = CompletableFuture.allOf(DBresourceCount, dataResourceCount, infrastructureCount, meetingRoomCount);
|
||||
CompletableFuture<Void> all = CompletableFuture.allOf(DBresourceCount, dataResourceCount, meetingRoomCount);
|
||||
all.join();
|
||||
|
||||
}
|
||||
|
@ -2055,6 +2055,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//未查到的类型返回数量0
|
||||
List<String> temp = new ArrayList<>();
|
||||
resultList.forEach(map -> {
|
||||
|
|
|
@ -54,10 +54,20 @@
|
|||
|
||||
<select id="selectResourceBrowseByTypeAndUser" parameterType="java.util.Map"
|
||||
resultType="io.renren.modules.resourceBrowse.dto.ResourceBrowseDTO">
|
||||
SELECT a.* FROM tb_resource_browse a INNER JOIN tb_data_resource b ON a.resource_id = b.id
|
||||
SELECT a.*, c.attr_value FROM tb_resource_browse a INNER JOIN tb_data_resource b ON a.resource_id = b.id
|
||||
LEFT JOIN tb_data_attr c ON b.id = c.data_resource_id
|
||||
WHERE a.state = 0
|
||||
AND c.del_flag = 0
|
||||
AND c.attr_type = '组件类型'
|
||||
<if test="params.type != null and params.type != ''">
|
||||
AND b.type = #{params.type}
|
||||
<choose>
|
||||
<when test="params.type == '应用资源' or params.type == '知识库'">
|
||||
AND b.type = #{params.type}
|
||||
</when>
|
||||
<otherwise>
|
||||
AND c.attr_value = #{params.type}
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="params.name != null and params.name != ''">
|
||||
AND (b.name LIKE(CONCAT('%',CONCAT(trim(#{params.name}),'%'))) OR b.type
|
||||
|
|
Loading…
Reference in New Issue