package com.mcwl.communityCenter.mapper; import com.baomidou.mybatisplus.annotation.InterceptorIgnore; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mcwl.communityCenter.domain.Community; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import javax.validation.constraints.NotNull; import java.util.List; import java.util.Map; @Mapper public interface CommunityMapper extends BaseMapper { @InterceptorIgnore(tenantLine = "true") Community getByTenantIdAndCommunityId(@NotNull(message = "租户id不能为空") @Param("tenantId") Long tenantId, @NotNull(message = "社区id不能为空") @Param("communityId") Long communityId); /** * 查询所有社区加入人数, 以map形式返回,key为社区id,value为加入人数 * * @return map */ @MapKey("id") @InterceptorIgnore(tenantLine = "true") Map> selectCommunityJoinNum(); /** * 查询所有社区发布数量,以map形式返回,key为社区id,value为发布数量 * * @return map */ @MapKey("id") @InterceptorIgnore(tenantLine = "true") Map> selectCommunityPublishNum(); @InterceptorIgnore(tenantLine = "true") List selectPageByCommunityTag(@Param("page") Page page, @Param("communityTag") Long communityTag, @Param("searchContent") String searchContent); @InterceptorIgnore(tenantLine = "true") List getMyJoinCommunity(@Param("page") Page page, @Param("userId") Long userId, @Param("searchContent") String searchContent); @InterceptorIgnore(tenantLine = "true") void quitCommunity(Long tenantId, Long communityId, Long userId); @InterceptorIgnore(tenantLine = "true") void deleteCommunity(Long tenantId, Long communityId); }