diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/ProcessCpApplyCmd.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/ProcessCpApplyCmd.java index 4e5b1ee8..6f5d41b2 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/ProcessCpApplyCmd.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/ProcessCpApplyCmd.java @@ -9,6 +9,8 @@ import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.mq.business.model.event.user.CpApplyEvent; import com.red.circle.mq.rocket.business.producer.UserMqMessageService; import com.red.circle.other.app.dto.cmd.user.relation.cp.ProcessApplyCmd; +import com.red.circle.other.domain.gateway.user.UserProfileGateway; +import com.red.circle.other.infra.database.cache.service.user.UserRunProfileCacheService; import com.red.circle.other.infra.database.rds.entity.user.user.CpApply; import com.red.circle.other.infra.database.rds.entity.user.user.CpRelationship; import com.red.circle.other.infra.database.rds.entity.user.user.CpValue; @@ -22,6 +24,7 @@ import com.red.circle.wallet.inner.endpoint.wallet.WalletGoldClient; import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd; import com.red.circle.wallet.inner.model.enums.GoldOrigin; import java.math.BigDecimal; +import java.util.Arrays; import java.util.Objects; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -43,6 +46,7 @@ public class ProcessCpApplyCmd { private final WalletGoldClient walletGoldClient; private final UserMqMessageService userMqMessageService; private final CpRelationshipService cpRelationshipService; + private final UserProfileGateway userProfileGateway; public void execute(ProcessApplyCmd cmd) { process(cmd); @@ -89,18 +93,7 @@ public class ProcessCpApplyCmd { cmd.requireReqSysOrigin()); } -// giftBackpackClient.incrGiftAndLimit(new GiftBackpackLimitCmd() -// .setUserId(cpApply.getSendApplyUserId()) -// .setGiftId(cpGift.getId()) -// .setQuantity(1) -// .setGiftTab(cpGift.getGiftTab()) -// .setLimitContent(cpApply.getAcceptApplyUserId().toString()) -// ); - -// imMessageClient -// .sendMessageText(cpApply.getAcceptApplyUserId().toString(), -// cpApply.getSendApplyUserId().toString(), -// cmd.getApplyText()); + userProfileGateway.removeCacheAll(Arrays.asList(cpApply.getSendApplyUserId(), cpApply.getAcceptApplyUserId())); } private void refuseStatusWait(ProcessApplyCmd cmd, CpApply cpApply) {