package com.hzya.frame.sysnew.generalData.dao.impl;

import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.sysnew.generalData.dao.IGeneralDataDao;
import com.hzya.frame.sysnew.generalData.entity.GeneralDataEntity;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository(value = "generalDataDaoImpl")
public class GeneralDataDaoImpl  extends MybatisGenericDao<GeneralDataEntity, String> implements IGeneralDataDao {
   //新增档案对照
    @Override
    public GeneralDataEntity saveGeneralDataByType(GeneralDataEntity generalDataEntity) {
        generalDataEntity = super.save(getSqlIdPrifx() + "saveGeneralDataByType", generalDataEntity);
        return generalDataEntity;
    }

    //查询档案对照
    @Override
    public List<GeneralDataEntity> queryGeneralData(GeneralDataEntity generalDataEntity) {
        List<GeneralDataEntity> query = super.query(getSqlIdPrifx() + "queryGeneralData", generalDataEntity);
        return query;
    }

    //编辑档案对照
    @Override
    public Integer updateGeneralDataByType(GeneralDataEntity generalDataEntity) {
        int update = super.update(getSqlIdPrifx() + "updateGeneralDataByType", generalDataEntity);
        return update;
    }

    //删除档案对照
    @Override
    public Integer deleteGeneralDataByType(GeneralDataEntity generalDataEntity) {
        int update = super.update(getSqlIdPrifx() + "deleteGeneralDataByType", generalDataEntity);
        return update;
    }
}
