package com.community.huiju.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.community.huiju.model.TaSysUserRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * app端用户是那些角色 Mapper 接口
 * </p>
 *
 * @author weiximei
 * @since 2018-12-21
 */
@Mapper
public interface TaSysUserRoleMapper extends BaseMapper<TaSysUserRole> {

    /**
     * 根据 用户id 和 小区Id  删除数据
     * @param communityId
     * @param userId
     * @return
     */
    @Delete("delete from ta_sys_user_role where community_id=#{communityId} and user_id=#{userId}")
    int deleteByCommunityIdAndUserId(@Param("communityId") Integer communityId, @Param("userId") Integer userId);

}
