package com.fs.survey.service.impl;

import com.fs.survey.domain.SurveyFieldConfig;
import com.fs.survey.mapper.SurveyFieldConfigMapper;
import com.fs.survey.service.ISurveyFieldConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Slf4j
@Service
public class SurveyFieldConfigServiceImpl implements ISurveyFieldConfigService {
    @Autowired
    private SurveyFieldConfigMapper surveyFieldConfigMapper;

    @Override
    public SurveyFieldConfig selectSurveyFieldConfigById(Long id) {
        return surveyFieldConfigMapper.selectSurveyFieldConfigById(id);
    }

    @Override
    public List<SurveyFieldConfig> selectSurveyFieldConfigList(SurveyFieldConfig surveyFieldConfig) {
        return surveyFieldConfigMapper.selectSurveyFieldConfigList(surveyFieldConfig);
    }

    @Override
    public List<SurveyFieldConfig> selectFieldConfigByVersionId(Long versionId) {
        return surveyFieldConfigMapper.selectFieldConfigByVersionId(versionId);
    }

    @Override
    public int insertSurveyFieldConfig(SurveyFieldConfig surveyFieldConfig) {
        return surveyFieldConfigMapper.insertSurveyFieldConfig(surveyFieldConfig);
    }

    @Override
    public int updateSurveyFieldConfig(SurveyFieldConfig surveyFieldConfig) {
        return surveyFieldConfigMapper.updateSurveyFieldConfig(surveyFieldConfig);
    }

    @Override
    public int deleteSurveyFieldConfigById(Long id) {
        return surveyFieldConfigMapper.deleteSurveyFieldConfigById(id);
    }

    @Override
    public int deleteSurveyFieldConfigByIds(Long[] ids) {
        return surveyFieldConfigMapper.deleteSurveyFieldConfigByIds(ids);
    }

    @Override
    public int deleteSurveyFieldConfigByVersionId(Long versionId) {
        return surveyFieldConfigMapper.deleteSurveyFieldConfigByVersionId(versionId);
    }
}
