65 lines
2.6 KiB
Java
65 lines
2.6 KiB
Java
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<Community> {
|
||
@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<Long, Map<String, Object>> selectCommunityJoinNum();
|
||
|
||
/**
|
||
* 查询所有社区发布数量,以map形式返回,key为社区id,value为发布数量
|
||
*
|
||
* @return map
|
||
*/
|
||
@MapKey("id")
|
||
@InterceptorIgnore(tenantLine = "true")
|
||
Map<Long, Map<String, Object>> selectCommunityPublishNum();
|
||
|
||
@InterceptorIgnore(tenantLine = "true")
|
||
List<Community> selectPageByCommunityTag(@Param("page")
|
||
Page<Community> page,
|
||
@Param("communityTag")
|
||
Long communityTag,
|
||
@Param("searchContent")
|
||
String searchContent);
|
||
|
||
@InterceptorIgnore(tenantLine = "true")
|
||
List<Community> getMyJoinCommunity(@Param("page")
|
||
Page<Community> 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);
|
||
}
|