45 lines
1.7 KiB
Java
45 lines
1.7 KiB
Java
package com.mcwl.communityCenter.mapper;
|
|
|
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.mcwl.communityCenter.domain.Invite;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
import java.util.Set;
|
|
|
|
@Mapper
|
|
public interface InviteMapper extends BaseMapper<Invite> {
|
|
@InterceptorIgnore(tenantLine = "true")
|
|
Set<Long> selectInviteIds(@NotNull(message = "租户id不能为空")
|
|
@Param("tenantId")
|
|
Long tenantId,
|
|
@NotNull(message = "社区id不能为空")
|
|
@Param("communityId")
|
|
Long communityId);
|
|
|
|
/**
|
|
* 查询是否已邀请
|
|
* @param tenantId 租户id
|
|
* @param communityId 社区id
|
|
* @param userId 用户id
|
|
* @return 邀请记录
|
|
*/
|
|
@InterceptorIgnore(tenantLine = "true")
|
|
Invite isInvite(@Param("tenantId") Long tenantId,@Param("communityId") Long communityId,@Param("userId") Long userId);
|
|
|
|
/**
|
|
* 根据租户id、社区id和被邀请人id查询邀请记录
|
|
* @param tenantId 租户id
|
|
* @param communityId 社区id
|
|
* @param inviteeUserId 被邀请人id
|
|
* @return 邀请记录
|
|
*/
|
|
@InterceptorIgnore(tenantLine = "true")
|
|
Invite selectByTenantIdAndCommunityIdAndInviteeUserId(@Param("tenantId") Long tenantId,
|
|
@Param("communityId") Long communityId,
|
|
@Param("inviteeUserId") Long inviteeUserId);
|
|
}
|