| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.modules.directive.entity.Directive; |
| | | import org.springblade.modules.directive.entity.DirectiveFile; |
| | | import org.springblade.modules.directive.mapper.DirectiveMapper; |
| | | import org.springblade.modules.directive.service.DirectiveService; |
| | | import org.springblade.modules.directive.vo.DirectiveVo; |
| | |
| | | User user = userService.getById(receiveDirectiveId); |
| | | builder.append(user.getRealName()).append(","); |
| | | } |
| | | //查询图片 |
| | | List<DirectiveFile> directiveFiles = baseMapper.getDirectiveFileList(record.getId()); |
| | | if (directiveFiles.size()>0){ |
| | | StringBuilder builderFile = new StringBuilder(); |
| | | for (DirectiveFile directiveFile : directiveFiles) { |
| | | builderFile.append(directiveFile.getUrl()).append(","); |
| | | } |
| | | String urls = builderFile.toString(); |
| | | record.setUrl(urls.substring(0, urls.length() - 1)); |
| | | } |
| | | record.setReceiveName(builder.toString().substring(0, builder.toString().length() - 1)); |
| | | } |
| | | return directiveVoIPage; |
| | |
| | | public DirectiveVo selectDirectiveInfo(Directive directive) { |
| | | return baseMapper.selectDirectiveInfo(directive); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 插入图片 |
| | | * @param directiveFile |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean saveDirectiveFile(DirectiveFile directiveFile) { |
| | | int i = baseMapper.saveDirectiveFile(directiveFile); |
| | | if (i>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 删除图片 |
| | | * @param id 指令id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int deleleByDirectiveId(Long id) { |
| | | return baseMapper.deleteByDirectiveId(id); |
| | | } |
| | | } |