| | |
| | | public boolean addFile(IpVolumeFileParam fileParam) { |
| | | IpVolumeFile file = new IpVolumeFile(); |
| | | file.setUserId(SecurityUtils.getClientId()); |
| | | file.setUserName(SecurityUtils.getUsername()); |
| | | file.setClientId(clientService.getClientId()); |
| | | if(SecurityUtils.getClientId()!=null){ |
| | | file.setUserName(SecurityUtils.getUsername()); |
| | | } |
| | | |
| | | if(clientService.getClientId()!=null){ |
| | | file.setClientId(clientService.getClientId()); |
| | | } |
| | | file.setFileName(fileParam.getFileName()); |
| | | file.setFileSize(fileParam.getFileSize()); |
| | | file.setFileBase64(fileParam.getFileBase64()); |
| | | file.setFileSize(fileParam.getFileSizeIp()); |
| | | file.setOriginSize(fileParam.getOriginSize()); |
| | | return save(file); |
| | | } |
| | | |
| | |
| | | return removeById(fileId); |
| | | } |
| | | |
| | | public LambdaQueryWrapper<IpVolumeFile> listFile(ReceiveParam receiveParam) { |
| | | public LambdaQueryWrapper<IpVolumeFile> listFile(String keyword) { |
| | | LambdaQueryWrapper<IpVolumeFile> wrapper = Wrappers.lambdaQuery(IpVolumeFile.class).eq(IpVolumeFile::getClientId, clientService.getClientId()); |
| | | if (receiveParam.getKeyWord() == null) { |
| | | if (keyword.isEmpty()) { |
| | | return wrapper; |
| | | } else { |
| | | return wrapper.like(IpVolumeFile::getFileName,receiveParam.getKeyWord()); |
| | | return wrapper.like(IpVolumeFile::getFileName,keyword); |
| | | } |
| | | } |
| | | |