| | |
| | | package com.ruoyi.sales.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.other.mapper.TempFileMapper; |
| | | import com.ruoyi.other.pojo.TempFile; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | |
| | | return commonFileMapper.deleteBatchIds(Arrays.asList(ids)); |
| | | } |
| | | |
| | | public void deleteByBusinessId(Long businessId,Integer type) { |
| | | commonFileMapper.delete(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, businessId) |
| | | .eq(CommonFile::getType, type)); |
| | | } |
| | | |
| | | public void deleteByBusinessIds(List<Long> businessId,Integer type) { |
| | | commonFileMapper.delete(new LambdaQueryWrapper<CommonFile>().in(CommonFile::getCommonId, businessId) |
| | | .eq(CommonFile::getType, type)); |
| | | } |
| | | |
| | | @Override |
| | | public CommonFile uploadFile(MultipartFile file, Long id, Integer type) throws IOException { |
| | | // 1. 生成正式文件ID和路径 |