package com.sooka.system.medicine.industry.service.impl;


import com.sooka.common.core.text.Convert;
import com.sooka.common.utils.DateUtils;
import com.sooka.system.medicine.industry.domain.TGuijiMedicineIndustry;
import com.sooka.system.medicine.industry.mapper.TGuijiMedicineIndustryMapper;
import com.sooka.system.medicine.industry.service.ITGuijiMedicineIndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 规上工业经济数据Service业务层处理
 *
 * @author lei
 * @date 2022-08-22
 */
@Service
public class TGuijiMedicineIndustryServiceImpl implements ITGuijiMedicineIndustryService
{
    @Autowired
    private TGuijiMedicineIndustryMapper tGuijiMedicineIndustryMapper;

    /**
     * 查询规上工业经济数据
     *
     * @param id 规上工业经济数据ID
     * @return 规上工业经济数据
     */
    @Override
    public TGuijiMedicineIndustry selectTGuijiMedicineIndustryById(String id)
    {
        return tGuijiMedicineIndustryMapper.selectTGuijiMedicineIndustryById(id);
    }

    /**
     * 查询规上工业经济数据列表
     *
     * @param tGuijiMedicineIndustry 规上工业经济数据
     * @return 规上工业经济数据
     */
    @Override
    public List<TGuijiMedicineIndustry> selectTGuijiMedicineIndustryList(TGuijiMedicineIndustry tGuijiMedicineIndustry)
    {
        return tGuijiMedicineIndustryMapper.selectTGuijiMedicineIndustryList(tGuijiMedicineIndustry);
    }

    /**
     * 新增规上工业经济数据
     *
     * @param tGuijiMedicineIndustry 规上工业经济数据
     * @return 结果
     */
    @Override
    public int insertTGuijiMedicineIndustry(TGuijiMedicineIndustry tGuijiMedicineIndustry)
    {
        tGuijiMedicineIndustry.setCreateTime(DateUtils.getNowDate());
        return tGuijiMedicineIndustryMapper.insertTGuijiMedicineIndustry(tGuijiMedicineIndustry);
    }

    /**
     * 修改规上工业经济数据
     *
     * @param tGuijiMedicineIndustry 规上工业经济数据
     * @return 结果
     */
    @Override
    public int updateTGuijiMedicineIndustry(TGuijiMedicineIndustry tGuijiMedicineIndustry)
    {
        return tGuijiMedicineIndustryMapper.updateTGuijiMedicineIndustry(tGuijiMedicineIndustry);
    }

    /**
     * 删除规上工业经济数据对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiMedicineIndustryByIds(String ids)
    {
        return tGuijiMedicineIndustryMapper.deleteTGuijiMedicineIndustryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除规上工业经济数据信息
     *
     * @param id 规上工业经济数据ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiMedicineIndustryById(String id)
    {
        return tGuijiMedicineIndustryMapper.deleteTGuijiMedicineIndustryById(id);
    }
}
