Skip to content

Commit

Permalink
fix: 新增消息保证事务的原子性
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoofff committed Nov 15, 2023
1 parent f4523d2 commit 1ca6f6c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public PageDataResp<MessageResp> page(MessageQuery query, PageQuery pageQuery) {
}

@Override
@Transactional(rollbackFor = Exception.class)
public void add(MessageReq req, List<Long> userIdList) {
CheckUtils.throwIf(() -> CollUtil.isEmpty(userIdList), "消息接收人不能为空");
MessageDO message = BeanUtil.copyProperties(req, MessageDO.class);
Expand Down

0 comments on commit 1ca6f6c

Please sign in to comment.