package com.hzya.frame.grpU8.nxproof.oeryszb.dao.impl;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.grpU8.nxproof.oeryszb.dao.IOerYszbDao;
import com.hzya.frame.grpU8.nxproof.oeryszb.entity.OerYszbEntity;
import org.springframework.stereotype.Repository;

/**
 * @Author:hecan
 * @Description:
 * @params:
 * @return:
 * @Date: 2023/6/19 14:59
 */
@Repository(value = "oerYszbDao")
public class OerYszbDaoImpl extends MybatisGenericDao<OerYszbEntity,String> implements IOerYszbDao {
    @DS("#entity.dataSourceCode")
    @Override
    public Integer deleteData(OerYszbEntity entity) {
        Integer o = super.delete(getSqlIdPrifx() + "OerYszbEntity_delete", entity);
        return o;
    }

    @DS("#entity.dataSourceCode")
    @Override
    public Integer saveData(OerYszbEntity entity) {
        Integer o = super.insert(getSqlIdPrifx() + "OerYszbEntity_insert", entity);
        return o;
    }

    @Override
    @DS("#entity.dataSourceCode")
    public OerYszbEntity saveOerYszbEntity(OerYszbEntity oerYszbEntity) {
        return super.save(oerYszbEntity);
    }

    @Override
    @DS("#entity.dataSourceCode")
    public Integer updateOerYszbEntity(OerYszbEntity oerYszbEntity) {
        return super.update("OerYszbEntity_update_yszb",oerYszbEntity);
    }

    @Override
    @DS("#entity.dataSourceCode")
    public Integer deleteOerYszbEntity(OerYszbEntity oerYszbEntity) {
        return super.delete("OerYszbEntity_delete_yszb",oerYszbEntity);
    }
}
