linzhijie
2021-03-11 93af1c6ffb9ae0e894689ad3a37b548e57d54cff
src/main/java/com/ots/project/exam/service/impl/EntDemographyInfoServiceImpl.java
@@ -1,4 +1,5 @@
package com.ots.project.exam.service.impl;
import com.ots.common.utils.DateUtils;
import com.ots.common.utils.text.Convert;
import com.ots.project.exam.domain.EntDemographyInfo;
@@ -6,44 +7,88 @@
import com.ots.project.exam.service.IEntDemographyInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * 人口学信息Service业务层处理
 *
 * @author ots
 * @date 2019-12-15
 */
@Service
public class EntDemographyInfoServiceImpl implements IEntDemographyInfoService {
    @Autowired
    private EntDemographyInfoMapper entDemographyInfoMapper;
    /**
     * 查询人口学信息
     *
     * @param infoId 人口学信息ID
     * @return 人口学信息
     */
    @Override
    public EntDemographyInfo selectEntDemographyInfoById(Long infoId) {
        return entDemographyInfoMapper.selectEntDemographyInfoById(infoId);
    }
    /**
     * 查询人口学信息列表
     *
     * @param entDemographyInfo 人口学信息
     * @return 人口学信息
     */
    @Override
    public List<EntDemographyInfo> selectEntDemographyInfoList(EntDemographyInfo entDemographyInfo) {
        return entDemographyInfoMapper.selectEntDemographyInfoList(entDemographyInfo);
    }
    @Override
    public List<EntDemographyInfo> selectEntDemographyAndParamList(EntDemographyInfo entDemographyInfo) {
        return entDemographyInfoMapper.selectEntDemographyAndParamList(entDemographyInfo);
    }
    /**
     * 新增人口学信息
     *
     * @param entDemographyInfo 人口学信息
     * @return 结果
     */
    @Override
    public int insertEntDemographyInfo(EntDemographyInfo entDemographyInfo) {
        entDemographyInfo.setCreateTime(DateUtils.getNowDate());
        return entDemographyInfoMapper.insertEntDemographyInfo(entDemographyInfo);
    }
    /**
     * 修改人口学信息
     *
     * @param entDemographyInfo 人口学信息
     * @return 结果
     */
    @Override
    public int updateEntDemographyInfo(EntDemographyInfo entDemographyInfo) {
        entDemographyInfo.setUpdateTime(DateUtils.getNowDate());
        return entDemographyInfoMapper.updateEntDemographyInfo(entDemographyInfo);
    }
    /**
     * 删除人口学信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEntDemographyInfoByIds(String ids) {
        return entDemographyInfoMapper.deleteEntDemographyInfoByIds(Convert.toStrArray(ids));
    }
    /**
     * 删除人口学信息信息
     *
     * @param infoId 人口学信息ID
     * @return 结果
     */
    public int deleteEntDemographyInfoById(Long infoId) {
        return entDemographyInfoMapper.deleteEntDemographyInfoById(infoId);
    }