Blame view

ServiceCompanyFilesServiceImpl.java 1.22 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
package com.subsidy.service.impl;

import com.subsidy.model.ServiceCompanyFilesDO;
import com.subsidy.mapper.ServiceCompanyFilesMapper;
import com.subsidy.service.ServiceCompanyFilesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 协议管理材料表 服务实现类
 * </p>
 *
 * @author Tuyp
 * @since 2024-01-11
 */
@Service
public class ServiceCompanyFilesServiceImpl extends ServiceImpl<ServiceCompanyFilesMapper, ServiceCompanyFilesDO> implements ServiceCompanyFilesService {


    public List<ServiceCompanyFilesDO> companyFiles(ServiceCompanyFilesDO serviceCompanyFilesDO) {
        return this.baseMapper.companyFiles(serviceCompanyFilesDO.getServiceCompanyId(), serviceCompanyFilesDO.getFileName());
    }

    public String deleteFile(ServiceCompanyFilesDO serviceCompanyFilesDO) {
        this.baseMapper.deleteById(serviceCompanyFilesDO.getId());
        return ConstantUtils.DELETE_SUCCESS;
    }

    public String uploadFile(ServiceCompanyFilesDO serviceCompanyFilesDO) {
        this.baseMapper.insert(serviceCompanyFilesDO);
        return ConstantUtils.ADD_SUCCESS;
    }


}