| | |
| | | package com.sandu.ximon.admin.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.util.StringUtil; |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.common.util.SpringContextHolder; |
| | | import com.sandu.ximon.admin.param.BroadcastTerminalV2Param; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.service.*; |
| | | import com.sandu.ximon.dao.bo.BroadcastTerminalV2EntityBo; |
| | |
| | | map.put("id", bean.getId()); |
| | | map.put("name", bean.getName()); |
| | | map.put("playerName", bean.getPlayerName()); |
| | | map.put("playerId", bean.getPlayerId()); |
| | | map.put("sn", bean.getSn()); |
| | | map.put("poleId", bean.getPoleId()); |
| | | map.put("poleName", bean.getPoleName()); |
| | | map.put("onlineStatus", bean.getOnlineStatus()); |
| | | map.put("resolution", bean.getWidth() + " * " + bean.getHeight()); |
| | | mapList.add(map); |
| | | } |
| | | return ResponseUtil.success(mapList); |
| | |
| | | */ |
| | | @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); |
| | |
| | | Map map; |
| | | for (PoleLightemitEntity bean : poleLightemitEntities) { |
| | | map = new LinkedHashMap(); |
| | | map.put("lightemitId", bean.getLightemitId()); |
| | | map.put("lightemitName", bean.getLightemitName()); |
| | | map.put("lightemitControlCode", bean.getLightemitControlCode()); |
| | | map.put("isOnLine", bean.isOnLine()); |