mcwl-ai/mcwl-communityCenter/src/main/java/com/mcwl/communityCenter/mapper/CommunityMapper.java

69 lines
2.9 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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 com.mcwl.communityCenter.domain.dto.EditCommunityRes;
import com.mcwl.communityCenter.domain.dto.JoinCommunityListPageRes;
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为社区idvalue为加入人数
*
* @return map
*/
@MapKey("id")
@InterceptorIgnore(tenantLine = "true")
Map<Long, Map<String, Object>> selectCommunityJoinNum();
/**
* 查询所有社区发布数量以map形式返回key为社区idvalue为发布数量
*
* @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("joinCommunityListPageRes")
JoinCommunityListPageRes joinCommunityListPageRes);
@InterceptorIgnore(tenantLine = "true")
void quitCommunity(@Param("tenantId") Long tenantId,
@Param("communityId") Long communityId,
@Param("userId") Long userId);
@InterceptorIgnore(tenantLine = "true")
void deleteCommunity(@Param("tenantId") Long tenantId, @Param("communityId") Long communityId);
}