package com.hzya.frame.sys.apireflection.dao.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.sys.apireflection.entity.ApiReflectionDetailEntity;
import com.hzya.frame.sys.apireflection.entity.ApiReflectionEntity;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.sys.apireflection.dao.IApiReflectionDao;

import java.util.List;

/**
 * @description: 接口映射配置  dao
 * @tableName: sys_api_reflection
 * @entityName: ApiReflectionEntity
 * @author: gjh
 * @history: 1.0
 */
@Repository("sys_api_reflectiondao")
public class ApiReflectionDaoImpl extends MybatisGenericDao<ApiReflectionEntity, String> implements IApiReflectionDao {

    /**
     * 查询所有
     * @param apiReflectionEntity
     * @return
     */
   /* @Override
    public List<ApiReflectionEntity> queryList(ApiReflectionEntity apiReflectionEntity) {
        return (List<ApiReflectionEntity>) super.selectList("ApiReflectionEntity_list_base",apiReflectionEntity);
    }*/

    /**
     * 根据id查询单个对象
     * @param id
     * @return
     */
    @Override
    public ApiReflectionEntity queryOneById(String id) {
       return super.get(id);
    }

    /**
     * 保存
     * @param apiReflectionEntity
     * @return
     */
    @Override
    public ApiReflectionEntity saveApiReflection(ApiReflectionEntity apiReflectionEntity) {
        ApiReflectionEntity apiReflectionEntityInsert = super.save(apiReflectionEntity);
        return apiReflectionEntityInsert;
    }

    /**
     * 修改
     * @param apiReflectionEntity
     * @return
     */
    @Override
    public Integer updateApiReflection(ApiReflectionEntity apiReflectionEntity) {
        return super.update("ApiReflectionEntity_update",apiReflectionEntity);
    }

    /**
     * 删除
     * @param id
     * @return
     */
    @Override
    public Integer deleteApiReflection(String id) {
        ApiReflectionEntity apiReflectionEntity=new ApiReflectionEntity();
        apiReflectionEntity.setId(id);
        return super.update("ApiReflectionEntity_logicDelete",apiReflectionEntity);
    }


}
