2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-30 4988857906abd49fd3f88afe99930803fde7dbce
ximon-admin/src/main/java/com/sandu/ximon/admin/controller/GetListOnBindingController.java
@@ -143,22 +143,27 @@
     */
    @GetMapping("/getLedFilesList")
    public ResponseVO<Object> getLedFilesList() {
        LambdaQueryWrapper<LedSFile> wrapper = Wrappers.lambdaQuery(LedSFile.class);
        LambdaQueryWrapper<LEDProgramFile> wrapper = Wrappers.lambdaQuery(LEDProgramFile.class);
        if (SecurityUtils.getClientId() != null) {
            wrapper.eq(LedSFile::getCilentId, SecurityUtils.getUserId()).or(w -> {
                w.eq(LedSFile::getUserId, SecurityUtils.getUserId());
            wrapper.eq(LEDProgramFile::getClientId, SecurityUtils.getUserId()).or(w -> {
                w.eq(LEDProgramFile::getUserId, SecurityUtils.getUserId());
            });
        }
        List<LedSFile> list = SpringContextHolder.getBean(LedSFileService.class).list(wrapper);
        List<LEDProgramFile> list = SpringContextHolder.getBean(LEDProgramFileService.class).list(wrapper);
        List<Map> mapList = new ArrayList<>();
        Map map;
        for (LedSFile bean : list) {
        for (LEDProgramFile bean : list) {
            map = new LinkedHashMap();
            map.put("fileId", bean.getFileId());
            map.put("fileId", bean.getId());
            map.put("fileType", bean.getFileType());
            map.put("fileUrl", bean.getFileUrl());
            map.put("fileSize", bean.getFileSize());
            map.put("fileSize", bean.getSize());
            if ("mp4".equals(bean.getFileType())) {
                map.put("screenShot", bean.getScreenShot());
            } else {
                map.put("screenShot", bean.getFileUrl());
            }
            mapList.add(map);
        }
        return ResponseUtil.success(mapList);