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

import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.sys.appApi.dao.IAppApiMapper;
import com.hzya.frame.sys.appApi.entity.AppApi;
import com.hzya.frame.sys.appApi.entity.AppApiDto;
import com.hzya.frame.sys.appApi.entity.AppApiListVo;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @description: 应用api  dao
 * @tableName: sys_app_api
 * @entityName: AppApi
 * @author: gjh
 * @history:1.0
 */
@Service
public class AppApiMapperImpl extends MybatisGenericDao<AppApi, String> implements IAppApiMapper {

    @Override
    public AppApi entity_get(String id) {

        AppApi o = (AppApi) super.selectOne(getSqlIdPrifx() + "entity_get", id);
        return o;

    }

    @Override
    public AppApi entity_get_join_dictionary(String id) {
        AppApi o = (AppApi) super.selectOne(getSqlIdPrifx() + "entity_get_join_dictionary", id);
        return o;
    }

    //查询 采用==查询   entity_list_base
    @Override
    public List<AppApi> entity_list_base(AppApi entity) {

        List<AppApi> o = super.query(getSqlIdPrifx() + "entity_list_base", entity);
        return o;

    }

    //  查询符合条件的数量
    @Override
    public Integer entity_count(AppApi entity) {

        Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "entity_count", entity);
        return o;

    }

    //  查询符合条件的数量
    @Override
    public Integer entity_count_not_id(AppApi entity) {

        Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "entity_count_not_id", entity);
        return o;

    }

    //分页查询列表 采用like格式 entity_list_like
    @Override
    public List<AppApi> entity_list_like(AppApi entity) {

        List<AppApi> o = super.query(getSqlIdPrifx() + "entity_list_like", entity);
        return o;

    }

    //查询列表 字段采用or格式   entity_list_or
    @Override
    public List<AppApi> entity_list_or(AppApi entity) {

        List<AppApi> o = super.query(getSqlIdPrifx() + "entity_list_or", entity);
        return o;

    }

    //新增  entity_insert
    @Override
    public AppApi entity_insert(AppApi entity) {

        entity = super.save(getSqlIdPrifx() + "entity_insert", entity);
        return entity;

    }

    //修改  entity_update
    @Override
    public Integer entity_update(AppApi entity) {
        Integer o = super.update(getSqlIdPrifx() + "entity_update", entity);
        return o;

    }

    //逻辑删除    entity_delete
    @Override
    public Integer entity_logicDelete(AppApi entity) {

        Integer o = super.update(getSqlIdPrifx() + "entity_logicDelete", entity);
        return o;

    }

    //逻辑删除多条件
    @Override
    public Integer entity_logicDelete_Multi_Condition(AppApi entity) {

        Integer o = super.update(getSqlIdPrifx() + "entity_logicDelete_Multi_Condition", entity);
        return o;

    }

    //物理删除
    @Override
    public Integer entity_delete(AppApi entity) {

        Integer o = super.update(getSqlIdPrifx() + "entity_delete", entity);
        return o;

    }

    //分页查询列表 采用like格式 entity_list_like
    @Override
    public List<AppApiListVo> queryList(AppApiDto entity) {
        List<AppApiListVo> o = (List<AppApiListVo>) super.selectList(getSqlIdPrifx() + "queryList", entity);
        return o;
    }

}
