| | |
| | | led.setPreview(receiveParam.getPreviewUrl()); |
| | | led.setWidth(receiveParam.getWidth()); |
| | | led.setHeight(receiveParam.getHeight()); |
| | | if (receiveParam.getPages() == null) { |
| | | throw new BusinessException("节目内容丢失"); |
| | | } |
| | | led.setPages(JSON.toJSONString(receiveParam.getPages())); |
| | | return save(led); |
| | | } |
| | |
| | | led.setPreview(receiveParam.getPreviewUrl()); |
| | | led.setWidth(receiveParam.getWidth()); |
| | | led.setHeight(receiveParam.getHeight()); |
| | | if (receiveParam.getPages() == null) { |
| | | throw new BusinessException("节目内容丢失"); |
| | | } |
| | | led.setPages(JSON.toJSONString(receiveParam.getPages())); |
| | | return updateById(led); |
| | | } |
| | | |
| | | |
| | | public boolean deleteProgram(Long id) { |
| | | LEDProgram byId = getById(id); |
| | | if (byId == null) { |
| | | public boolean deleteProgram(List<Long> pids) { |
| | | List<LEDProgram> ledPrograms = listByIds(pids); |
| | | if (ledPrograms.isEmpty()) { |
| | | throw new BusinessException("未找到该节目"); |
| | | } |
| | | |
| | | return removeById(id); |
| | | return removeByIds(pids); |
| | | |
| | | } |
| | | |
| | |
| | | return param; |
| | | } |
| | | |
| | | public List<LEDProgram> listProgram(BaseConditionVO baseConditionVO,Integer order,Integer seq, String keyword) { |
| | | public List<LEDProgram> listProgram(BaseConditionVO baseConditionVO, Integer order, Integer seq, String keyword) { |
| | | LambdaQueryWrapper<LEDProgram> wrapper = listPrograms(); |
| | | |
| | | if (keyword != null && !keyword.isEmpty()) { |
| | |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = " ASC"; |
| | | orderBySeq = OrderByEnums.ASC.getCode(); |
| | | break; |
| | | case 2: |
| | | orderBySeq = " DESC"; |
| | | orderBySeq = OrderByEnums.DESC.getCode(); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | return list(wrapper); |
| | | } |
| | | |
| | | public List<LEDProgram> listProgramOnBinding(String keyword) { |
| | | LambdaQueryWrapper<LEDProgram> wrapper = listPrograms(); |
| | | |
| | | if (keyword != null && !keyword.isEmpty()) { |
| | | wrapper.like(LEDProgram::getName, keyword); |
| | | } |
| | | |
| | | return list(wrapper); |
| | | } |
| | | |
| | | |
| | | public LambdaQueryWrapper<LEDProgram> listPrograms() { |
| | | if (SecurityUtils.getClientId() == null) { |