package com.ztmap.project.zhny.strategycondition.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ztmap.project.zhny.strategycondition.mapper.TStrategyConditionMapper;
import com.ztmap.project.zhny.strategycondition.domain.TStrategyCondition;
import com.ztmap.project.zhny.strategycondition.service.ITStrategyConditionService;
import com.ztmap.common.utils.text.Convert;

/**
 * 策略条件Service业务层处理
 * 
 * @author ztmap
 * @date 2023-10-11
 */
@Service
public class TStrategyConditionServiceImpl implements ITStrategyConditionService 
{
    @Autowired
    private TStrategyConditionMapper tStrategyConditionMapper;

    /**
     * 查询策略条件
     * 
     * @param id 策略条件ID
     * @return 策略条件
     */
    @Override
    public TStrategyCondition selectTStrategyConditionById(Long id)
    {
        return tStrategyConditionMapper.selectTStrategyConditionById(id);
    }

    /**
     * 查询策略条件列表
     * 
     * @param tStrategyCondition 策略条件
     * @return 策略条件
     */
    @Override
    public List<TStrategyCondition> selectTStrategyConditionList(TStrategyCondition tStrategyCondition)
    {
        return tStrategyConditionMapper.selectTStrategyConditionList(tStrategyCondition);
    }

    /**
     * 新增策略条件
     * 
     * @param tStrategyCondition 策略条件
     * @return 结果
     */
    @Override
    public int insertTStrategyCondition(TStrategyCondition tStrategyCondition)
    {
        return tStrategyConditionMapper.insertTStrategyCondition(tStrategyCondition);
    }

    /**
     * 修改策略条件
     * 
     * @param tStrategyCondition 策略条件
     * @return 结果
     */
    @Override
    public int updateTStrategyCondition(TStrategyCondition tStrategyCondition)
    {
        return tStrategyConditionMapper.updateTStrategyCondition(tStrategyCondition);
    }

    /**
     * 删除策略条件对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTStrategyConditionByIds(String ids)
    {
        return tStrategyConditionMapper.deleteTStrategyConditionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除策略条件信息
     * 
     * @param id 策略条件ID
     * @return 结果
     */
    @Override
    public int deleteTStrategyConditionById(Long id)
    {
        return tStrategyConditionMapper.deleteTStrategyConditionById(id);
    }
}
