修复重复发消息
This commit is contained in:
parent
32543b958c
commit
aab443ce34
@ -185,9 +185,6 @@ public class SendCpApplyCmdExe {
|
||||
CpRelationshipType relationType, String title) {
|
||||
imMessageClient.sendCustomMessage(CpRelationC2cNoticeUtils.buildInvitePending(sendUserId,
|
||||
acceptUserId, applyId, userProfile, acceptUserProfile, isReconcile, relationType, title));
|
||||
imMessageClient.sendCustomMessage(CpRelationC2cNoticeUtils.buildInvitePendingToSendUser(
|
||||
sendUserId, acceptUserId, applyId, userProfile, acceptUserProfile, isReconcile, relationType,
|
||||
title));
|
||||
}
|
||||
|
||||
private BigDecimal normalizeApplyConsumeGold(BigDecimal applyConsumeGold) {
|
||||
|
||||
@ -29,13 +29,6 @@ public final class CpRelationC2cNoticeUtils {
|
||||
isReconcile, relationType, title);
|
||||
}
|
||||
|
||||
public static CustomC2cMsgBodyCmd buildInvitePendingToSendUser(Long sendUserId, Long acceptUserId,
|
||||
Long applyId, UserProfileDTO senderProfile, UserProfileDTO acceptProfile,
|
||||
boolean isReconcile, CpRelationshipType relationType, String title) {
|
||||
return buildInvitePendingMessage(acceptUserId, sendUserId, applyId, senderProfile,
|
||||
acceptProfile, isReconcile, relationType, title);
|
||||
}
|
||||
|
||||
private static CustomC2cMsgBodyCmd buildInvitePendingMessage(Long fromUserId, Long toUserId,
|
||||
Long applyId, UserProfileDTO senderProfile, UserProfileDTO acceptProfile,
|
||||
boolean isReconcile, CpRelationshipType relationType, String title) {
|
||||
|
||||
@ -91,8 +91,10 @@ class SendCpApplyCmdExeTest {
|
||||
assertEquals("SISTERS", applies.get(2).getRelationType());
|
||||
|
||||
List<CustomC2cMsgBodyCmd> messages = fixture.sentCustomMessages(3);
|
||||
assertEquals("1001", messages.get(0).getFromAccount());
|
||||
assertEquals("2001", messages.get(0).getToAccount());
|
||||
messages.forEach(message -> {
|
||||
assertEquals("1001", message.getFromAccount());
|
||||
assertEquals("2001", message.getToAccount());
|
||||
});
|
||||
assertCpBuildMessage(messages.get(0), "CP", 3001L);
|
||||
assertCpBuildMessage(messages.get(1), "BROTHER", 3002L);
|
||||
assertCpBuildMessage(messages.get(2), "SISTERS", 3003L);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user