Commit 67529872 authored by 刘基明's avatar 刘基明

圈子消息通知-插入

parent 1d7f74fd
......@@ -31,7 +31,9 @@ public class NotificationService {
.notifiedUserId(notifierId)
.messageType(type.getCode())
.content(content)
.operatorId(targetId).build();
.operatorId(operatorId)
.targetId(targetId)
.build();
insert(entity);
}
......@@ -64,7 +66,7 @@ public class NotificationService {
}else {
NotificationLikeDO notificationLikeDO = new NotificationLikeDO();
notificationLikeDO.addItem(operatorId);
NotificationEntity.builder().operatorId(operatorId)
NotificationEntity build = NotificationEntity.builder().operatorId(operatorId)
.notificationId(uuidGenHelper.getUuidStr())
.messageType(NotificationTypeEnum.LIKE.getCode())
.notifiedUserId(notifierId)
......@@ -72,8 +74,9 @@ public class NotificationService {
.targetId(targetId)
.operatorId(operatorId)
.build();
insert(build);
}
insert(entity);
}
@Transactional
......@@ -94,14 +97,15 @@ public class NotificationService {
LambdaQueryWrapper<NotificationEntity> queryWrapper = new LambdaQueryWrapper<NotificationEntity>()
.eq(NotificationEntity::getNotifiedUserId, userId)
.lt(NotificationEntity::getCreateTime, lastOne.getCreateTime())
.lt(NotificationEntity::getUpdateTime, lastOne.getCreateTime())
.last("limit " + pageSize);
if (!NotificationTypeEnum.ALL.getCode().equals(type)){
queryWrapper.eq(NotificationEntity::getMessageType,type);
}
return notificationMapper.selectList(queryWrapper);
}
}
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