package com.inspect.patrol.service.impl;

import com.inspect.base.core.utils.DateUtils;
import com.inspect.patrol.domain.PatrolLinkageStrategyReverse;
import com.inspect.patrol.mapper.PatrolLinkageStrategyReverseMapper;
import com.inspect.patrol.service.IPatrolLinkageStrategyReverseService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PatrolLinkageStrategyReverseServiceImpl implements IPatrolLinkageStrategyReverseService {
    private final PatrolLinkageStrategyReverseMapper patrolLinkageStrategyReverseMapper;

    public PatrolLinkageStrategyReverseServiceImpl(PatrolLinkageStrategyReverseMapper patrolLinkageStrategyReverseMapper) {
        this.patrolLinkageStrategyReverseMapper = patrolLinkageStrategyReverseMapper;
    }

    public PatrolLinkageStrategyReverse selectPatrolLinkageStrategyReverseByLinkageStrategyRefId(Long linkageStrategyRefId) {
        return this.patrolLinkageStrategyReverseMapper.selectPatrolLinkageStrategyReverseByLinkageStrategyRefId(linkageStrategyRefId);
    }

    public List<PatrolLinkageStrategyReverse> selectPatrolLinkageStrategyReverseList(PatrolLinkageStrategyReverse patrolLinkageStrategyReverse) {
        return this.patrolLinkageStrategyReverseMapper.selectPatrolLinkageStrategyReverseList(patrolLinkageStrategyReverse);
    }

    public int insertPatrolLinkageStrategyReverse(PatrolLinkageStrategyReverse patrolLinkageStrategyReverse) {
        patrolLinkageStrategyReverse.setCreateTime(DateUtils.getNowDate());
        return this.patrolLinkageStrategyReverseMapper.insertPatrolLinkageStrategyReverse(patrolLinkageStrategyReverse);
    }

    public int updatePatrolLinkageStrategyReverse(PatrolLinkageStrategyReverse patrolLinkageStrategyReverse) {
        return this.patrolLinkageStrategyReverseMapper.updatePatrolLinkageStrategyReverse(patrolLinkageStrategyReverse);
    }

    public int deletePatrolLinkageStrategyReverseByLinkageStrategyReverseIds(Long[] linkageStrategyRefIds) {
        return this.patrolLinkageStrategyReverseMapper.deletePatrolLinkageStrategyReverseByLinkageStrategyReverseIds(linkageStrategyRefIds);
    }

    public int deletePatrolLinkageStrategyReverseByLinkageStrategyReverseId(Long linkageStrategyRefId) {
        return this.patrolLinkageStrategyReverseMapper.deletePatrolLinkageStrategyReverseByLinkageStrategyReverseId(linkageStrategyRefId);
    }
}
