| | |
| | | import com.ycl.common.utils.CopyUtils; |
| | | import com.ycl.common.utils.DateUtils; |
| | | import com.ycl.common.utils.SecurityUtils; |
| | | import com.ycl.domain.entity.File; |
| | | import com.ycl.domain.entity.ProjectInfo; |
| | | import com.ycl.domain.entity.*; |
| | | import com.ycl.domain.form.DocumentInfoForm; |
| | | import com.ycl.domain.form.ProjectInfoForm; |
| | | import com.ycl.domain.query.ProjectInfoQuery; |
| | | import com.ycl.domain.vo.*; |
| | | import com.ycl.framework.utils.PageUtil; |
| | | import com.ycl.mapper.FileMapper; |
| | | import com.ycl.mapper.ProjectInfoMapper; |
| | | import com.ycl.mapper.*; |
| | | import com.ycl.service.FileService; |
| | | import com.ycl.service.ProjectInfoService; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, ProjectInfo> implements ProjectInfoService { |
| | | |
| | | private final ProjectInfoMapper projectInfoMapper; |
| | | private final ProjectInvestmentFundingMapper investmentFundingMapper; |
| | | private final ProjectInvestmentInfoMapper investmentInfoMapper; |
| | | private final ProjectInvestmentPolicyComplianceMapper policyMapper; |
| | | private final ProjectUnitRegistrationInfoMapper unitRegistrationInfoMapper; |
| | | private final FileService fileService; |
| | | private final FileMapper fileMapper; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | //TODO:待完善 |
| | | public Result remove(List<String> ids) { |
| | | baseMapper.deleteBatchIds(ids); |
| | | return Result.ok("删除成功"); |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | //TODO:待完善 |
| | | public Result removeById(String id) { |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result removeById(Long id) { |
| | | investmentFundingMapper.delete(new QueryWrapper<ProjectInvestmentFunding>().eq("project_id",id)); |
| | | investmentInfoMapper.delete(new QueryWrapper<ProjectInvestmentInfo>().eq("project_id",id)); |
| | | policyMapper.delete(new QueryWrapper<ProjectInvestmentPolicyCompliance>().eq("project_id",id)); |
| | | unitRegistrationInfoMapper.delete(new QueryWrapper<ProjectUnitRegistrationInfo>().eq("project_id",id)); |
| | | |
| | | List<String> types = new ArrayList<>(); |
| | | types.add(FileTypeEnum.PROJECT_INFO.getType()); |
| | | types.add(FileTypeEnum.INVEST_POLICY.getType()); |
| | | types.add(FileTypeEnum.DOCUMENT_INFO.getType()); |
| | | fileMapper.delete(new QueryWrapper<File>().eq("bus_id",id).in("type",types)); |
| | | baseMapper.deleteById(id); |
| | | return Result.ok("删除成功"); |
| | | } |