From 628176078a36d2b60a52a5491369b843317d8323 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 23 Oct 2025 16:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E4=BB=BB=E5=8A=A1=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InAppPurchaseProductServiceImpl.java | 4 +-- .../dynamic/add/DynamicContentAddCmdExe.java | 6 ---- .../app/command/family/FamilyUserInfoExe.java | 6 ---- .../command/gift/BlessingsGiftGiveCmdExe.java | 4 +-- .../app/command/gift/LuckyGiftGiveCmdExe.java | 9 +++++ .../material/PropsPurchasingCmdExe.java | 4 +-- .../app/command/room/RoomEnterCmdExe.java | 5 ++- .../command/room/RoomSubscriptionCmdExe.java | 11 ++++++ .../query/RoomVoiceProfileByUserIdQryExe.java | 3 +- .../user/UserHandleFriendApplyCmdExe.java | 6 ++-- ...erSupportRelationFollowOrCancelCmdExe.java | 22 ++++++++++++ .../query/UserCpPairUserProfileQryExe.java | 6 ---- .../gift/strategy/GiftCountStrategy.java | 14 ++++---- .../other/app/listener/task/TaskListener.java | 35 +++++++------------ .../infra/common/user/UserAccountCommon.java | 8 ----- .../user/user/RelationshipFriendService.java | 5 +++ .../impl/RelationshipFriendServiceImpl.java | 10 +++++- .../freight/SendFreightShipCmdExe.java | 4 +-- 18 files changed, 89 insertions(+), 73 deletions(-) diff --git a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/service/InAppPurchaseProductServiceImpl.java b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/service/InAppPurchaseProductServiceImpl.java index 5d9d67cc..1e27926a 100644 --- a/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/service/InAppPurchaseProductServiceImpl.java +++ b/rc-service/rc-service-order/order-application/src/main/java/com/red/circle/order/app/service/InAppPurchaseProductServiceImpl.java @@ -75,11 +75,11 @@ public class InAppPurchaseProductServiceImpl implements InAppPurchaseProductServ public PurchaseReceiptCO purchase(AbstractPurchaseCmd cmd) { log.info("purchase:{}", JacksonUtils.toJson(cmd)); //完成任务 钩子 9 充值 谷歌 - taskMqMessage.sendTask(TaskApprovalEvent.builder() + /*taskMqMessage.sendTask(TaskApprovalEvent.builder() .taskId(9) .userId(cmd.getReqUserId()) .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); + .build());*/ return appInAppPurchaseCmdExe.execute(cmd); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/add/DynamicContentAddCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/add/DynamicContentAddCmdExe.java index c93c280e..912e2345 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/add/DynamicContentAddCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/add/DynamicContentAddCmdExe.java @@ -105,13 +105,7 @@ public class DynamicContentAddCmdExe { dynamicCacheService.pushUserTodayDynamicCount(cmd.getReqUserId()); - //每日任务 发送动态 - taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(5) - .userId(cmd.getReqUserId()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); if (CollectionUtils.isEmpty(cmd.getPictures())) { return contentId; diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyUserInfoExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyUserInfoExe.java index c7d6e37c..18075fed 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyUserInfoExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyUserInfoExe.java @@ -48,12 +48,6 @@ public class FamilyUserInfoExe { if (Objects.isNull(baseInfo)) { return new FamilyUserInfoCO(); } - //成长任务 创建或加入家族 - taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(6) - .userId(cmd.getUserId()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); return getBaseInfoCO(cmd.getReqSysOrigin().getOrigin(), familyMemberInfo, baseInfo); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/BlessingsGiftGiveCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/BlessingsGiftGiveCmdExe.java index 9e28e37c..26ca9583 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/BlessingsGiftGiveCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/BlessingsGiftGiveCmdExe.java @@ -85,11 +85,11 @@ public class BlessingsGiftGiveCmdExe { - taskMqMessage.sendTask(TaskApprovalEvent.builder() + /*taskMqMessage.sendTask(TaskApprovalEvent.builder() .taskId(2) .userId(cmd.getReqUserId()) .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); + .build());*/ return receipt.getBalance().getDollarAmount(); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java index 5eed8be5..4184676d 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java @@ -3,7 +3,9 @@ package com.red.circle.other.app.command.gift; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.framework.core.response.ResponseErrorCode; +import com.red.circle.mq.business.model.event.task.TaskApprovalEvent; import com.red.circle.mq.rocket.business.producer.GiftMqMessage; +import com.red.circle.mq.rocket.business.producer.TaskMqMessage; import com.red.circle.other.app.common.gift.GameLuckyGiftCommon; import com.red.circle.other.app.convertor.material.GiftAppConvertor; import com.red.circle.other.app.dto.cmd.gift.GiveAwayGiftBatchCmd; @@ -15,6 +17,7 @@ import com.red.circle.other.inner.enums.material.GiftCurrencyType; import com.red.circle.other.inner.enums.material.GiftTabEnum; import com.red.circle.other.inner.model.dto.material.GiftConfigDTO; import com.red.circle.tool.core.collection.CollectionUtils; +import com.red.circle.tool.core.date.LocalDateTimeUtils; 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.dto.WalletReceiptResDTO; @@ -41,6 +44,7 @@ public class LuckyGiftGiveCmdExe { private final GiftCacheService giftCacheService; private final UserProfileGateway userProfileGateway; private final GameLuckyGiftCommon gameLuckyGiftCommon; + private final TaskMqMessage taskMqMessage; public BigDecimal execute(GiveAwayGiftBatchCmd cmd) { @@ -75,6 +79,11 @@ public class LuckyGiftGiveCmdExe { userProfileGateway.removeCache(cmd.requiredReqUserId()); + taskMqMessage.sendTask(TaskApprovalEvent.builder() + .taskId(8) + .userId(cmd.getReqUserId()) + .build()); + return receipt.getBalance().getDollarAmount(); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java index 5b88003e..a47ffa2b 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java @@ -107,9 +107,9 @@ public class PropsPurchasingCmdExe { sendGiveAwayNotice(cmd, commodity); - //完成任务 钩子 9 充值 + //完成任务3 在商店购买任意商品 taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(8) + .taskId(3) .userId(cmd.getReqUserId()) .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) .build()); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java index 00bfaf85..e2408bcd 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java @@ -87,11 +87,10 @@ public class RoomEnterCmdExe { public EntryRoomResponseCO execute(RoomEntryCmd cmd) { //checkEntryUserId(cmd); - //进入房间计数 + //进入房间任务 taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(10) + .taskId(7) .userId(cmd.getReqUserId()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) .build()); RoomProfileManager manager = roomProfileManagerService.getById(cmd.getRoomId()); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomSubscriptionCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomSubscriptionCmdExe.java index 2a2fe447..a0bb4ab3 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomSubscriptionCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomSubscriptionCmdExe.java @@ -2,10 +2,13 @@ package com.red.circle.other.app.command.room; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; +import com.red.circle.mq.business.model.event.task.TaskApprovalEvent; +import com.red.circle.mq.rocket.business.producer.TaskMqMessage; import com.red.circle.other.app.dto.cmd.room.RoomSubscriptionCmd; import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; import com.red.circle.other.infra.database.rds.service.live.RoomSubscriptionCountService; import com.red.circle.other.infra.database.rds.service.live.RoomSubscriptionService; +import com.red.circle.tool.core.date.LocalDateTimeUtils; import com.red.circle.tool.core.text.StringUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -24,6 +27,7 @@ public class RoomSubscriptionCmdExe { private final RoomSubscriptionService roomSubscriptionService; private final RoomProfileManagerService roomProfileManagerService; private final RoomSubscriptionCountService roomSubscriptionCountService; + private final TaskMqMessage taskMqMessage; public Boolean execute(RoomSubscriptionCmd cmd) { // 无法操作,错误归属 @@ -40,6 +44,13 @@ public class RoomSubscriptionCmdExe { } roomSubscriptionService.add(cmd.requiredReqUserId(), cmd.getRoomId()); roomSubscriptionCountService.saveRoomSubscriptionCount(cmd.getRoomId(), Boolean.TRUE); + + //关注一个房间任务 + taskMqMessage.sendTask(TaskApprovalEvent.builder() + .taskId(10) + .userId(cmd.requiredReqUserId()) + .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) + .build()); return Boolean.TRUE; } } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceProfileByUserIdQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceProfileByUserIdQryExe.java index a3356214..3d7ea404 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceProfileByUserIdQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceProfileByUserIdQryExe.java @@ -35,9 +35,8 @@ public class RoomVoiceProfileByUserIdQryExe { if (Objects.nonNull(roomProfileManagerDTO)&&Objects.nonNull(roomProfileManagerDTO.getCountryCode())) { //放一个创建自己房间钩子 taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(11) + .taskId(5) .userId(cmd.getReqUserId()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) .build()); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserHandleFriendApplyCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserHandleFriendApplyCmdExe.java index 0f05c859..2679b649 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserHandleFriendApplyCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserHandleFriendApplyCmdExe.java @@ -85,12 +85,10 @@ public class UserHandleFriendApplyCmdExe { friendsApplyListService.changeStatus(cmd.requiredReqUserId(), cmd.getApplyUserId(), getFriendApplyStatus(cmd.getAgree())); - //添加好友 每日任务 - + //添加好友 taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(3) + .taskId(6) .userId(cmd.getApplyUserId()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) .build()); //sendPush(cmd); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserSupportRelationFollowOrCancelCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserSupportRelationFollowOrCancelCmdExe.java index 3bfa408a..47afea88 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserSupportRelationFollowOrCancelCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserSupportRelationFollowOrCancelCmdExe.java @@ -8,6 +8,7 @@ import com.red.circle.external.inner.model.cmd.message.notice.official.NoticeExt import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; +import com.red.circle.mq.business.model.event.task.TaskApprovalEvent; import com.red.circle.mq.rocket.business.producer.TaskMqMessage; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.util.OfficialNoticeUtils; @@ -25,6 +26,7 @@ import com.red.circle.other.infra.database.rds.service.user.user.ShieldBlackServ import com.red.circle.other.infra.database.rds.service.user.user.UserSubscriptionService; import com.red.circle.other.inner.asserts.user.UserRelationErrorCode; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; +import com.red.circle.tool.core.date.LocalDateTimeUtils; import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.text.StringUtils; import com.red.circle.other.inner.asserts.user.UserErrorCode; @@ -55,6 +57,7 @@ public class UserSupportRelationFollowOrCancelCmdExe { private final OfficialNoticeClient officialNoticeClient; private final RoomProfileManagerService roomProfileManagerService; private final RelationshipFriendService relationshipFriendService; + private final TaskMqMessage taskMqMessage; public Boolean execute(AppUserIdCmd cmd) { // 不可操作自己 @@ -96,6 +99,13 @@ public class UserSupportRelationFollowOrCancelCmdExe { Long subUserId = cmd.getUserId(); boolean mutual = userSubscriptionService.checkSubscription(subUserId, userId); + // 关注一个用户任务 + taskMqMessage.sendTask(TaskApprovalEvent.builder() + .taskId(9) + .userId(cmd.requiredReqUserId()) + .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) + .build()); + // 如果是相互关注 则自动加为好友 if (mutual) { try { @@ -128,6 +138,18 @@ public class UserSupportRelationFollowOrCancelCmdExe { roomUserBlacklistService.removeBlack(roomProfile.getId(), cmd.requiredReqUserId()); } } + + // 双方都完成好友任务 + taskMqMessage.sendTask(TaskApprovalEvent.builder() + .taskId(6) + .userId(cmd.requiredReqUserId()) + .build()); + + taskMqMessage.sendTask(TaskApprovalEvent.builder() + .taskId(6) + .userId(subUserId) + .build()); + } else { UserProfileDTO userProfile = userProfileAppConvertor.toUserProfileDTO(userProfileGateway.getByUserId(cmd.requiredReqUserId())); officialNoticeClient.send(NoticeExtTemplateTypeCmd.builder() diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserCpPairUserProfileQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserCpPairUserProfileQryExe.java index 81698916..7aa3d309 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserCpPairUserProfileQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserCpPairUserProfileQryExe.java @@ -43,12 +43,6 @@ public class UserCpPairUserProfileQryExe { return new CpPairUserProfileCO() .setMeUserProfile(userProfileAppConvertor.toUserProfileDTO((meUser))); } - //task 活动 cp活动 - taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(7) - .userId(cmd.requiredReqUserId()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); return new CpPairUserProfileCO() .setMeUserProfile(userProfileAppConvertor.toUserProfileDTO((meUser))) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java index 480797e3..12d3c025 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/gift/strategy/GiftCountStrategy.java @@ -211,11 +211,11 @@ public class GiftCountStrategy implements GiftStrategy { // 送礼物不再计入财富等级 // consumptionLevelService.incrConsumptionGolds(runningWater.getUserId(), wealthActualAmount); //累计财富等级mq - taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(13) - .userId(runningWater.getUserId()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); +// taskMqMessage.sendTask(TaskApprovalEvent.builder() +// .taskId(13) +// .userId(runningWater.getUserId()) +// .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) +// .build()); // 财富等级 // consumptionLevelService.incrConsumptionGolds(runningWater.getUserId(), wealthActualAmount); @@ -235,11 +235,11 @@ public class GiftCountStrategy implements GiftStrategy { // 记录魅力等级 consumptionLevelService.incrConsumptionDiamond(accept.getAcceptUserId(), charmGiftValue); - taskMqMessage.sendTask(TaskApprovalEvent.builder() + /*taskMqMessage.sendTask(TaskApprovalEvent.builder() .taskId(14) .userId(accept.getAcceptUserId()) .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); + .build());*/ userMqMessageService.sendBadgeEvent(accept.getAcceptUserId(), BadgeKeyEnum.CHARM.name()); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java index 37d4f257..e40c6b51 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/listener/task/TaskListener.java @@ -117,7 +117,7 @@ public class TaskListener implements MessageListener { handleTask9(eventBody); break; case 10: - // 处理任务-9 的逻辑 关注一个房间 + // 处理任务-10 的逻辑 关注一个房间 handleTask10(eventBody); break; default: @@ -128,14 +128,6 @@ public class TaskListener implements MessageListener { ); } - private void handleTask10(TaskApprovalEvent eventBody) { - - } - - private void handleTask8(TaskApprovalEvent eventBody) { - - } - private void handleTask1(TaskApprovalEvent eventBody) { // // 增加心跳次数 放一天 String redisKey = "mic:heartbeat:" + eventBody.getUserId(); @@ -225,10 +217,9 @@ public class TaskListener implements MessageListener { private void handleTask6(TaskApprovalEvent eventBody) { log.warn("处理任务-6 添加10个好友: {}", eventBody); // 更新任务状态的逻辑 - if (relationshipFriendService.todayFlowSize(eventBody.getUserId()) >= 3) { + if (relationshipFriendService.selectMyFriendsCount(eventBody.getUserId()) >= 10) { updateTaskStatus(eventBody); } - //判断用户是否添加了3个好友 } @@ -257,13 +248,17 @@ public class TaskListener implements MessageListener { updateTaskStatus(eventBody); } + private void handleTask8(TaskApprovalEvent eventBody) { + + } + private void handleTask9(TaskApprovalEvent eventBody) { - log.warn("处理任务-9: {}", eventBody); - // 首次充值 -// updateTaskStatus(eventBody); -// checkMemberActive(eventBody.getUserId(), MemberActiveEnum.TASK_3); - // 如果是币商给用户充值 - dealRechargeCommission(eventBody); + + + } + + private void handleTask10(TaskApprovalEvent eventBody) { + } private void dealRechargeCommission(TaskApprovalEvent eventBody) { @@ -285,7 +280,7 @@ public class TaskListener implements MessageListener { redisService.increment(redisKey, 1); } else { //大于3次完成 - if ("3".equals(inc)) { + if ("3".equals(inc) || Integer.parseInt(inc) >= 3) { // 更新任务状态的逻辑 直接更新 updateTaskStatus(eventBody); } else { @@ -296,10 +291,6 @@ public class TaskListener implements MessageListener { private void handleTask5(TaskApprovalEvent eventBody) { log.warn("处理任务-5 创建我的房间: {}", eventBody); -// AppExtCommand appExtCommand = new AppExtCommand(); -// appExtCommand.setReqUserId(eventBody.getUserId()); -// if (!Objects.isNull(roomProfileService.getRoomProfile(appExtCommand))) { -// } updateTaskStatus(eventBody); } diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/UserAccountCommon.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/UserAccountCommon.java index 9fa4f70a..2dd75ba7 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/UserAccountCommon.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/UserAccountCommon.java @@ -211,14 +211,6 @@ public class UserAccountCommon { userInviteUser.setUserId(userId); userInviteUser.setSysOrigin(cmd.requireReqSysOrigin()); userInviteUserService.save(userInviteUser); - //这里发一个mq - taskMqMessage.sendTask(TaskApprovalEvent.builder() - .taskId(99) - .imei(cmd.getReqImei()) - .userId(userId) - .ip(cmd.getReqIp()) - .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd")) - .build()); } private void mobileRegister(CreateAccountCmd cmd, BaseInfo baseInfo) { diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/RelationshipFriendService.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/RelationshipFriendService.java index 71bfa5e5..9c173ce3 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/RelationshipFriendService.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/user/user/RelationshipFriendService.java @@ -36,6 +36,11 @@ public interface RelationshipFriendService extends BaseService