1.能力广场列表查询增加图片

2.门户首页-能力汇聚-基础设施增加会客厅和视频会议数量查询
This commit is contained in:
dinggang 2022-10-26 17:22:50 +08:00
parent b4db7eb6fc
commit a34a6be0f6
3 changed files with 46 additions and 13 deletions

View File

@ -176,7 +176,7 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
List<Map> selectAppList(@Param("pageNum") int pageNum, @Param("type") Integer type, @Param("area") String area);
String selectPicByResId(@Param("id") String id);
String selectPicByResId(@Param("id") String id, @Param("resourceType") String resourceType);
List<Map> selectTypeCountByName(@Param("keyWorld") String keyWorld, @Param("nonChinese") Boolean nonChinese);

View File

@ -16,7 +16,9 @@ import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.DateUtils;
import io.renren.modules.enke.service.EnkeService;
import io.renren.modules.meeting.dao.TMeetingroomMapper;
import io.renren.modules.meeting.entity.TMeetingroom;
import io.renren.modules.monitor.dto.CameraChannelDto1;
import io.renren.modules.monitor.entity.CameraChannel;
import io.renren.modules.monitor.mapper.CameraChannelMapper;
@ -191,6 +193,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Resource
private TMeetingroomMapper tMeetingroomMapper;
@Autowired
private EnkeService enkeService;
@Override
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
@ -1500,7 +1505,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
Integer type = params.containsKey("type") ? Integer.parseInt(params.get("type").toString()) : null;
String area = params.containsKey("area") ? params.get("area").toString() : null;
List<Map> maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area);
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString())));
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString(), "应用资源")));
return new HashMap() {{
put("appList", maps);
put("total", resourceDao.selectAppListCount(type, area));
@ -1877,6 +1882,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override
public Object selectInfrastructureList() {
HashMap<String, Object> resultMap = new HashMap<>();
resultMap.put("云资源", 0);
//视频资源
CompletableFuture<Void> jcss = CompletableFuture.runAsync(() -> {
Map map = (Map) selectTotal();
List<Map<String, Object>> list = (List<Map<String, Object>>) map.get("total");
list.forEach(index -> {
@ -1884,7 +1892,23 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
resultMap.put("视频资源", Integer.parseInt(index.get("count").toString()));
}
});
resultMap.put("云资源", 0);
}, executor);
//新增会客厅和视频会议统计
//会客厅
CompletableFuture<Void> hkt = CompletableFuture.runAsync(() -> {
QueryWrapper<TMeetingroom> wrapper = new QueryWrapper<>();
resultMap.put("会客厅", tMeetingroomMapper.selectCount(wrapper));
}, executor);
//视频会议
CompletableFuture<Void> sphy = CompletableFuture.runAsync(() -> {
resultMap.put("视频会议", enkeService.page(new HashMap<>()).getTotal());
}, executor);
CompletableFuture<Void> all = CompletableFuture.allOf(jcss, hkt, sphy);
all.join();
return resultMap;
}
@ -2404,7 +2428,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override
public Object getStarList() {
return resourceDao.getStarList();
}
@ -2424,8 +2447,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
Integer pageNum = jsonObject.getInteger("pageNum");
Integer pageSize = jsonObject.getInteger("pageSize");
Integer i = (pageNum - 1) * pageSize;
List<Map> maps = resourceDao.getSquareList(type, deptType, area, i, pageSize);
maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString(), type)));
return new HashMap() {{
put("list", resourceDao.getSquareList(type, deptType, area, i, pageSize));
put("list", maps);
put("total", resourceDao.getSquareListCount(type, deptType, area));
}};
}

View File

@ -1620,8 +1620,16 @@
FROM
tb_data_attr tda
LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id
WHERE
tda.attr_type = '应用图片'
WHERE 1 = 1
<if test="resourceType == '应用资源'" >
AND tda.attr_type = '应用图片'
</if>
<if test="resourceType == '图层服务'" >
AND tda.attr_type = '图层缩略图'
</if>
<if test="resourceType == '智能算法'" >
AND tda.attr_type = '应用场景'
</if>
AND tdr.id = #{id}
AND tda.del_flag = 0
</select>