Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Room.isRoomFriend #141

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.abin.mallchat.common.chat.domain.entity.MessageMark;
import com.abin.mallchat.common.chat.mapper.MessageMarkMapper;
import com.abin.mallchat.common.common.domain.enums.YesOrNoEnum;
import com.abin.mallchat.common.common.domain.enums.NormalOrNoEnum;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

Expand All @@ -29,14 +29,14 @@ public MessageMark get(Long uid, Long msgId, Integer markType) {
public Integer getMarkCount(Long msgId, Integer markType) {
return lambdaQuery().eq(MessageMark::getMsgId, msgId)
.eq(MessageMark::getType, markType)
.eq(MessageMark::getStatus, YesOrNoEnum.NO.getStatus())
.eq(MessageMark::getStatus, NormalOrNoEnum.NORMAL.getStatus())
.count();
}

public List<MessageMark> getValidMarkByMsgIdBatch(List<Long> msgIds) {
return lambdaQuery()
.in(MessageMark::getMsgId, msgIds)
.eq(MessageMark::getStatus, YesOrNoEnum.NO.getStatus())
.eq(MessageMark::getStatus, NormalOrNoEnum.NORMAL.getStatus())
.list();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ public boolean isRoomFriend() {

@JsonIgnore
public boolean isRoomGroup() {
return RoomTypeEnum.of(this.hotFlag) == RoomTypeEnum.GROUP;
return RoomTypeEnum.of(this.type) == RoomTypeEnum.GROUP;
}
}