package com.inspect.metadata.bdconfig.service.impl;

import com.inspect.metadata.bdconfig.domain.BasedataBdConfigMainSystem;
import com.inspect.metadata.bdconfig.mapper.BasedataBdConfigMainSystemMapper;
import com.inspect.metadata.bdconfig.service.IBasedataBdConfigMainSystemService;
import com.inspect.base.core.utils.DateUtils;

import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class BasedataBdConfigMainSystemServiceImpl implements IBasedataBdConfigMainSystemService {
    private final BasedataBdConfigMainSystemMapper basedataBdconfigMainsystemMapper;

    public BasedataBdConfigMainSystemServiceImpl(BasedataBdConfigMainSystemMapper basedataBdconfigMainsystemMapper) {
        this.basedataBdconfigMainsystemMapper = basedataBdconfigMainsystemMapper;
    }

    public BasedataBdConfigMainSystem selectBasedataBdConfigMainSystemByMainSystemId(Long mainSystemId) {
        return this.basedataBdconfigMainsystemMapper.selectBasedataBdConfigMainSystemByMainSystemId(mainSystemId);
    }

    public List<BasedataBdConfigMainSystem> selectBasedataBdConfigMainSystemList(BasedataBdConfigMainSystem basedataBdconfigMainsystem) {
        return this.basedataBdconfigMainsystemMapper.selectBasedataBdConfigMainSystemList(basedataBdconfigMainsystem);
    }

    public int insertBasedataBdConfigMainSystem(BasedataBdConfigMainSystem basedataBdconfigMainsystem) {
        basedataBdconfigMainsystem.setCreateTime(DateUtils.getNowDate());
        return this.basedataBdconfigMainsystemMapper.insertBasedataBdConfigMainSystem(basedataBdconfigMainsystem);
    }

    public int updateBasedataBdConfigMainSystem(BasedataBdConfigMainSystem basedataBdconfigMainsystem) {
        basedataBdconfigMainsystem.setUpdateTime(DateUtils.getNowDate());
        return this.basedataBdconfigMainsystemMapper.updateBasedataBdConfigMainSystem(basedataBdconfigMainsystem);
    }

    public int deleteBasedataBdConfigMainSystemByMainSystemIds(Long[] mainSystemIds) {
        return this.basedataBdconfigMainsystemMapper.deleteBasedataBdConfigMainSystemByMainSystemIds(mainSystemIds);
    }

    public int deleteBasedataBdConfigMainSystemByMainSystemId(Long mainSystemId) {
        return this.basedataBdconfigMainsystemMapper.deleteBasedataBdConfigMainSystemByMainSystemId(mainSystemId);
    }
}
