package com.huiju.estateagents.property.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huiju.estateagents.property.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 orgId
     * @param userId
     * @return
     */
    @Delete("delete from ta_sys_user_role where org_id=#{orgId} and user_id=#{userId}")
    int deleteByCommunityIdAndUserId(@Param("orgId") Integer orgId, @Param("userId") Integer userId);

}
