Commit 9fb2f8ef by Future

拉黑逻辑

parent 829167de
......@@ -7,7 +7,9 @@ import io.geekidea.springbootplus.framework.core.pagination.Paging;
import lombok.extern.slf4j.Slf4j;
import java.util.Date;
import java.util.List;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -64,6 +66,9 @@ public class ImClientBlacklistServiceImpl extends BaseServiceImpl<ImClientBlackl
if (beBlacker == null) {
throw new BusinessException("查无用户信息");
}
if (this.isBeBlack(currentClient.getClientId(), imClientBlacklistUpdate.getClientIdBePrevent())) {
throw new BusinessException("该用户已被拉黑");
}
ImClientBlacklist imClientBlacklist = new ImClientBlacklist();
imClientBlacklist.setId(SnowflakeUtil.getId());
imClientBlacklist.setCreateTime(new Date());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment