package com.smartor.service.impl;
|
|
import com.ruoyi.common.utils.DateUtils;
|
import com.smartor.domain.IvrLibaTemplateTargetoption;
|
import com.smartor.mapper.IvrLibaTemplateTargetoptionMapper;
|
import com.smartor.service.IIvrLibaTemplateTargetoptionService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
import java.util.List;
|
|
/**
|
* 模板指标选项库Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2023-12-23
|
*/
|
@Service
|
public class IvrLibaTemplateTargetoptionServiceImpl implements IIvrLibaTemplateTargetoptionService {
|
@Autowired
|
private IvrLibaTemplateTargetoptionMapper ivrLibaTemplateTargetoptionMapper;
|
|
/**
|
* 查询模板指标选项库
|
*
|
* @param id 模板指标选项库主键
|
* @return 模板指标选项库
|
*/
|
@Override
|
public IvrLibaTemplateTargetoption selectIvrLibaTemplateTargetoptionById(Long id) {
|
return ivrLibaTemplateTargetoptionMapper.selectIvrLibaTemplateTargetoptionById(id);
|
}
|
|
/**
|
* 查询模板指标选项库列表
|
*
|
* @param ivrLibaTemplateTargetoption 模板指标选项库
|
* @return 模板指标选项库
|
*/
|
@Override
|
public List<IvrLibaTemplateTargetoption> selectIvrLibaTemplateTargetoptionList(IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption) {
|
return ivrLibaTemplateTargetoptionMapper.selectIvrLibaTemplateTargetoptionList(ivrLibaTemplateTargetoption);
|
}
|
|
/**
|
* 新增模板指标选项库
|
*
|
* @param ivrLibaTemplateTargetoption 模板指标选项库
|
* @return 结果
|
*/
|
@Override
|
public int insertIvrLibaTemplateTargetoption(IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption) {
|
ivrLibaTemplateTargetoption.setCreateTime(DateUtils.getNowDate());
|
return ivrLibaTemplateTargetoptionMapper.insertIvrLibaTemplateTargetoption(ivrLibaTemplateTargetoption);
|
}
|
|
/**
|
* 修改模板指标选项库
|
*
|
* @param ivrLibaTemplateTargetoption 模板指标选项库
|
* @return 结果
|
*/
|
@Override
|
public int updateIvrLibaTemplateTargetoption(IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption) {
|
ivrLibaTemplateTargetoption.setUpdateTime(DateUtils.getNowDate());
|
return ivrLibaTemplateTargetoptionMapper.updateIvrLibaTemplateTargetoption(ivrLibaTemplateTargetoption);
|
}
|
|
/**
|
* 批量删除模板指标选项库
|
*
|
* @param ids 需要删除的模板指标选项库主键
|
* @return 结果
|
*/
|
@Override
|
@Transactional(rollbackFor = Exception.class)
|
public int deleteIvrLibaTemplateTargetoptionByIds(Long[] ids) {
|
Integer i = null;
|
for (Long id : ids) {
|
i = ivrLibaTemplateTargetoptionMapper.deleteIvrLibaTemplateTargetoptionById(id);
|
}
|
return i;
|
}
|
|
/**
|
* 删除模板指标选项库信息
|
*
|
* @param id 模板指标选项库主键
|
* @return 结果
|
*/
|
@Override
|
@Transactional(rollbackFor = Exception.class)
|
public int deleteIvrLibaTemplateTargetoptionById(Long id) {
|
return ivrLibaTemplateTargetoptionMapper.deleteIvrLibaTemplateTargetoptionById(id);
|
}
|
}
|