package com.dgtly.companyext.service.impl;

import java.util.List;
import com.dgtly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dgtly.companyext.mapper.CompanyExamineMapper;
import com.dgtly.companyext.domain.CompanyExamine;
import com.dgtly.companyext.service.ICompanyExamineService;
import com.dgtly.common.core.text.Convert;

/**
 * 商户审核Service业务层处理
 * 
 * @author dgtly
 * @date 2020-02-13
 */
@Service
public class CompanyExamineServiceImpl implements ICompanyExamineService 
{
    @Autowired
    private CompanyExamineMapper companyExamineMapper;

    /**
     * 查询商户审核
     * 
     * @param id 商户审核ID
     * @return 商户审核
     */
    @Override
    public CompanyExamine selectCompanyExamineById(Long id)
    {
        return companyExamineMapper.selectCompanyExamineById(id);
    }



    /**
     * 新增商户审核
     * 
     * @param companyExamine 商户审核
     * @return 结果
     */
    @Override
    public int insertCompanyExamine(CompanyExamine companyExamine)
    {
        companyExamine.setCreateTime(DateUtils.getNowDate());
        return companyExamineMapper.insertCompanyExamine(companyExamine);
    }

    /**
     * 修改商户审核
     * 
     * @param companyExamine 商户审核
     * @return 结果
     */
    @Override
    public int updateCompanyExamine(CompanyExamine companyExamine)
    {
        companyExamine.setUpdateTime(DateUtils.getNowDate());
        return companyExamineMapper.updateCompanyExamine(companyExamine);
    }

    /**
     * 删除商户审核对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCompanyExamineByIds(String ids)
    {
        return companyExamineMapper.deleteCompanyExamineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商户审核信息
     * 
     * @param id 商户审核ID
     * @return 结果
     */
    @Override
    public int deleteCompanyExamineById(Long id)
    {
        return companyExamineMapper.deleteCompanyExamineById(id);
    }
}
