package com.mcwl.communityCenter.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mcwl.communityCenter.domain.Community;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.NotNull;

@Mapper
public interface CommunityMapper extends BaseMapper<Community> {
    @InterceptorIgnore(tenantLine = "true")
    Community getByTenantIdAndCommunityId(@NotNull(message = "租户id不能为空")
                                        @Param("tenantId")
                                        Long tenantId,
                                        @NotNull(message = "社区id不能为空")
                                        @Param("communityId")
                                        Long communityId);
}
