package com.xinelu.manage.service.signroutetriggercondition.impl;

import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition;
import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper;
import com.xinelu.manage.service.signroutetriggercondition.ISignRouteTriggerConditionService;
import java.time.LocalDateTime;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * 签约患者管理任务（路径）触发条件关系Service业务层处理
 *
 * @author haown
 * @date 2024-03-18
 */
@Service
public class SignRouteTriggerConditionServiceImpl implements ISignRouteTriggerConditionService {
    @Resource
    private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper;

    /**
     * 查询签约患者管理任务（路径）触发条件关系
     *
     * @param id 签约患者管理任务（路径）触发条件关系主键
     * @return 签约患者管理任务（路径）触发条件关系
     */
    @Override
    public SignRouteTriggerCondition selectSignRouteTriggerConditionById(Long id) {
        return signRouteTriggerConditionMapper.selectSignRouteTriggerConditionById(id);
    }

    /**
     * 查询签约患者管理任务（路径）触发条件关系列表
     *
     * @param signRouteTriggerCondition 签约患者管理任务（路径）触发条件关系
     * @return 签约患者管理任务（路径）触发条件关系
     */
    @Override
    public List<SignRouteTriggerCondition> selectSignRouteTriggerConditionList(SignRouteTriggerCondition signRouteTriggerCondition) {
        return signRouteTriggerConditionMapper.selectSignRouteTriggerConditionList(signRouteTriggerCondition);
    }

    /**
     * 新增签约患者管理任务（路径）触发条件关系
     *
     * @param signRouteTriggerCondition 签约患者管理任务（路径）触发条件关系
     * @return 结果
     */
    @Override
    public int insertSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition) {
                signRouteTriggerCondition.setCreateTime(LocalDateTime.now());
            return signRouteTriggerConditionMapper.insertSignRouteTriggerCondition(signRouteTriggerCondition);
    }

    /**
     * 修改签约患者管理任务（路径）触发条件关系
     *
     * @param signRouteTriggerCondition 签约患者管理任务（路径）触发条件关系
     * @return 结果
     */
    @Override
    public int updateSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition) {
                signRouteTriggerCondition.setUpdateTime(LocalDateTime.now());
        return signRouteTriggerConditionMapper.updateSignRouteTriggerCondition(signRouteTriggerCondition);
    }

    /**
     * 批量删除签约患者管理任务（路径）触发条件关系
     *
     * @param ids 需要删除的签约患者管理任务（路径）触发条件关系主键
     * @return 结果
     */
    @Override
    public int deleteSignRouteTriggerConditionByIds(Long[] ids) {
        return signRouteTriggerConditionMapper.deleteSignRouteTriggerConditionByIds(ids);
    }

    /**
     * 删除签约患者管理任务（路径）触发条件关系信息
     *
     * @param id 签约患者管理任务（路径）触发条件关系主键
     * @return 结果
     */
    @Override
    public int deleteSignRouteTriggerConditionById(Long id) {
        return signRouteTriggerConditionMapper.deleteSignRouteTriggerConditionById(id);
    }
}
