feat(REQ-3300) - 优化主单据创建群聊时,就发送卡片,而不再监听事件

This commit is contained in:
wangli 2025-02-20 15:06:44 +08:00
parent 1452b1f3e0
commit 26e4e6c8bf
2 changed files with 9 additions and 1 deletions

View File

@ -85,7 +85,8 @@ public class ImGroupsCreatedEventHandler implements EventHandler, InitializingBe
GroupInfo group = groupChangedMessage.getGroup();
AssertUtil.notNull(group, "group info is null");
try {
sendCardAndMsgToImGroup(group);
// 转移到创建群聊立即发送卡片
// sendCardAndMsgToImGroup(group);
} catch (Exception e) {
log.error("send msg to im group error: {}", e.getMessage(), e);
throw e;

View File

@ -673,6 +673,13 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
GroupCreateResponse imGroup = msgCenterGateway.createImGroup(request);
AssertUtil.notNull(imGroup, "IM 群创建失败");
ChangeRecord visa = changeRecordService.getById(visaId);
sendCardAndMsgToImGroup(ChangeRecordButtonOperationReq.builder()
.operatorPersonId(req.getOperatorPersonId())
.operatorOuId(req.getOperatorOuId())
.operatorWorkspaceId(req.getRelationWorkspaceId())
.build(), visa);
updateImInfo(visaId, imGroup);
// 更新主表状态
changeStatus(ChangeStatusRequest.builder()