package com.reyun.saas.mob.user.dao;


import com.reyun.saas.common.core.Mapper;
import com.reyun.saas.mob.user.domain.AppAuth;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

public interface AppAuthMapper extends Mapper<AppAuth> {

    /**
     * 根据userid删除数据
     * @param userId userid
     * @return 受影响行数
     */
    @Delete("DELETE FROM app_auth WHERE user_id = #{userId}")
    public int deleteByUserId(@Param("userId") Long userId);

    /**
     * 根据appid删除对应的权限
     * @param appId appid
     * @return
     */
    @Delete("DELETE FROM app_auth WHERE app_id = #{appId}")
    int deleteByAppid(@Param("appId")Long appId);
}
