package com.fs.crm.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.common.utils.DateUtils;
import com.fs.crm.domain.CrmCustomerPropertyTemplate;
import com.fs.crm.mapper.CrmCustomerPropertyTemplateMapper;
import com.fs.crm.service.ICrmCustomerPropertyTemplateService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CrmCustomerPropertyTemplateServiceImpl extends ServiceImpl<CrmCustomerPropertyTemplateMapper, CrmCustomerPropertyTemplate> implements ICrmCustomerPropertyTemplateService {

    @Override
    public CrmCustomerPropertyTemplate selectCrmCustomerPropertyTemplateById(Long id) {
        return baseMapper.selectCrmCustomerPropertyTemplateById(id);
    }

    @Override
    public List<CrmCustomerPropertyTemplate> selectCrmCustomerPropertyTemplateList(CrmCustomerPropertyTemplate crmCustomerPropertyTemplate) {
        return baseMapper.selectCrmCustomerPropertyTemplateList(crmCustomerPropertyTemplate);
    }

    @Override
    public int insertCrmCustomerPropertyTemplate(CrmCustomerPropertyTemplate crmCustomerPropertyTemplate) {
        crmCustomerPropertyTemplate.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertCrmCustomerPropertyTemplate(crmCustomerPropertyTemplate);
    }

    @Override
    public int updateCrmCustomerPropertyTemplate(CrmCustomerPropertyTemplate crmCustomerPropertyTemplate) {
        crmCustomerPropertyTemplate.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateCrmCustomerPropertyTemplate(crmCustomerPropertyTemplate);
    }

    @Override
    public int deleteCrmCustomerPropertyTemplateByIds(Long[] ids) {
        return baseMapper.deleteCrmCustomerPropertyTemplateByIds(ids);
    }

    @Override
    public int deleteCrmCustomerPropertyTemplateById(Long id) {
        return baseMapper.deleteCrmCustomerPropertyTemplateById(id);
    }
}
