/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.lightinit.hsdatagateway.modules.gateway.dao;

import com.lightinit.hsdatagateway.common.persistence.CrudDao;
import com.lightinit.hsdatagateway.common.persistence.annotation.MyBatisDao;
import com.lightinit.hsdatagateway.modules.gateway.entity.Auth;

import java.util.List;

/**
 * 鉴权管理DAO接口
 * @Author: yangrui
 * @version 2019-03-05
 */
@MyBatisDao
public interface AuthDao extends CrudDao<Auth> {

    /**
     * 根据userId、appId和routeId查询
     * @param auth
     * @return
     */
    Auth getByUserIdAndAppId(Auth auth);

    /**
     * api调用查询
     * @param auth
     */
    List<Auth> findListByApi(Auth auth);

    /**
     * 根据用户、路由、应用Id修改
     * @param auth
     * @return
     */
    int updateByApi(Auth auth);
}