package com.hotent.project.manager.impl;

import com.hotent.base.manager.impl.BaseManagerImpl;
import com.hotent.base.util.StringUtil;
import com.hotent.project.dao.CostProjectTaskMaterialDetailDao;
import com.hotent.project.manager.CostProjectTaskMaterialDetailManager;
import com.hotent.project.model.CostProjectTaskMaterialDetail;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 资料归纳明细表 服务实现类
 *
 * @company 山西清众科技股份有限公司
 * @author 超级管理员
 * @since 2025-01-27
 */
@Service
public class CostProjectTaskMaterialDetailManagerImpl extends BaseManagerImpl<CostProjectTaskMaterialDetailDao, CostProjectTaskMaterialDetail> implements CostProjectTaskMaterialDetailManager {

    @Override
    public CostProjectTaskMaterialDetail getDetail(String id) {
        if (StringUtil.isEmpty(id)) {
            return null;
        }

        CostProjectTaskMaterialDetail detail = this.getById(id);
        if (detail == null) {
            return null;
        }

        return detail;
    }

    @Override
    @Transactional
    public void deleteById(String id) {
        if (StringUtil.isEmpty(id)) {
            return;
        }

        // 物理删除
        this.removeById(id);
    }
}

