每日任务功能优化
This commit is contained in:
parent
d448123b7c
commit
628176078a
@ -75,11 +75,11 @@ public class InAppPurchaseProductServiceImpl implements InAppPurchaseProductServ
|
|||||||
public PurchaseReceiptCO purchase(AbstractPurchaseCmd cmd) {
|
public PurchaseReceiptCO purchase(AbstractPurchaseCmd cmd) {
|
||||||
log.info("purchase:{}", JacksonUtils.toJson(cmd));
|
log.info("purchase:{}", JacksonUtils.toJson(cmd));
|
||||||
//完成任务 钩子 9 充值 谷歌
|
//完成任务 钩子 9 充值 谷歌
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
/*taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(9)
|
.taskId(9)
|
||||||
.userId(cmd.getReqUserId())
|
.userId(cmd.getReqUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
||||||
.build());
|
.build());*/
|
||||||
return appInAppPurchaseCmdExe.execute(cmd);
|
return appInAppPurchaseCmdExe.execute(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -105,13 +105,7 @@ public class DynamicContentAddCmdExe {
|
|||||||
|
|
||||||
dynamicCacheService.pushUserTodayDynamicCount(cmd.getReqUserId());
|
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())) {
|
if (CollectionUtils.isEmpty(cmd.getPictures())) {
|
||||||
return contentId;
|
return contentId;
|
||||||
|
|||||||
@ -48,12 +48,6 @@ public class FamilyUserInfoExe {
|
|||||||
if (Objects.isNull(baseInfo)) {
|
if (Objects.isNull(baseInfo)) {
|
||||||
return new FamilyUserInfoCO();
|
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);
|
return getBaseInfoCO(cmd.getReqSysOrigin().getOrigin(), familyMemberInfo, baseInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -85,11 +85,11 @@ public class BlessingsGiftGiveCmdExe {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
/*taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(2)
|
.taskId(2)
|
||||||
.userId(cmd.getReqUserId())
|
.userId(cmd.getReqUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
||||||
.build());
|
.build());*/
|
||||||
|
|
||||||
return receipt.getBalance().getDollarAmount();
|
return receipt.getBalance().getDollarAmount();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.asserts.ResponseAssert;
|
||||||
import com.red.circle.framework.core.response.CommonErrorCode;
|
import com.red.circle.framework.core.response.CommonErrorCode;
|
||||||
import com.red.circle.framework.core.response.ResponseErrorCode;
|
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.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.common.gift.GameLuckyGiftCommon;
|
||||||
import com.red.circle.other.app.convertor.material.GiftAppConvertor;
|
import com.red.circle.other.app.convertor.material.GiftAppConvertor;
|
||||||
import com.red.circle.other.app.dto.cmd.gift.GiveAwayGiftBatchCmd;
|
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.enums.material.GiftTabEnum;
|
||||||
import com.red.circle.other.inner.model.dto.material.GiftConfigDTO;
|
import com.red.circle.other.inner.model.dto.material.GiftConfigDTO;
|
||||||
import com.red.circle.tool.core.collection.CollectionUtils;
|
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.endpoint.wallet.WalletGoldClient;
|
||||||
import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd;
|
import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd;
|
||||||
import com.red.circle.wallet.inner.model.dto.WalletReceiptResDTO;
|
import com.red.circle.wallet.inner.model.dto.WalletReceiptResDTO;
|
||||||
@ -41,6 +44,7 @@ public class LuckyGiftGiveCmdExe {
|
|||||||
private final GiftCacheService giftCacheService;
|
private final GiftCacheService giftCacheService;
|
||||||
private final UserProfileGateway userProfileGateway;
|
private final UserProfileGateway userProfileGateway;
|
||||||
private final GameLuckyGiftCommon gameLuckyGiftCommon;
|
private final GameLuckyGiftCommon gameLuckyGiftCommon;
|
||||||
|
private final TaskMqMessage taskMqMessage;
|
||||||
|
|
||||||
public BigDecimal execute(GiveAwayGiftBatchCmd cmd) {
|
public BigDecimal execute(GiveAwayGiftBatchCmd cmd) {
|
||||||
|
|
||||||
@ -75,6 +79,11 @@ public class LuckyGiftGiveCmdExe {
|
|||||||
|
|
||||||
userProfileGateway.removeCache(cmd.requiredReqUserId());
|
userProfileGateway.removeCache(cmd.requiredReqUserId());
|
||||||
|
|
||||||
|
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
|
.taskId(8)
|
||||||
|
.userId(cmd.getReqUserId())
|
||||||
|
.build());
|
||||||
|
|
||||||
return receipt.getBalance().getDollarAmount();
|
return receipt.getBalance().getDollarAmount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -107,9 +107,9 @@ public class PropsPurchasingCmdExe {
|
|||||||
|
|
||||||
sendGiveAwayNotice(cmd, commodity);
|
sendGiveAwayNotice(cmd, commodity);
|
||||||
|
|
||||||
//完成任务 钩子 9 充值
|
//完成任务3 在商店购买任意商品
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(8)
|
.taskId(3)
|
||||||
.userId(cmd.getReqUserId())
|
.userId(cmd.getReqUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
||||||
.build());
|
.build());
|
||||||
|
|||||||
@ -87,11 +87,10 @@ public class RoomEnterCmdExe {
|
|||||||
public EntryRoomResponseCO execute(RoomEntryCmd cmd) {
|
public EntryRoomResponseCO execute(RoomEntryCmd cmd) {
|
||||||
//checkEntryUserId(cmd);
|
//checkEntryUserId(cmd);
|
||||||
|
|
||||||
//进入房间计数
|
//进入房间任务
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(10)
|
.taskId(7)
|
||||||
.userId(cmd.getReqUserId())
|
.userId(cmd.getReqUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
RoomProfileManager manager = roomProfileManagerService.getById(cmd.getRoomId());
|
RoomProfileManager manager = roomProfileManagerService.getById(cmd.getRoomId());
|
||||||
|
|||||||
@ -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.asserts.ResponseAssert;
|
||||||
import com.red.circle.framework.core.response.CommonErrorCode;
|
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.app.dto.cmd.room.RoomSubscriptionCmd;
|
||||||
import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService;
|
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.RoomSubscriptionCountService;
|
||||||
import com.red.circle.other.infra.database.rds.service.live.RoomSubscriptionService;
|
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 com.red.circle.tool.core.text.StringUtils;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -24,6 +27,7 @@ public class RoomSubscriptionCmdExe {
|
|||||||
private final RoomSubscriptionService roomSubscriptionService;
|
private final RoomSubscriptionService roomSubscriptionService;
|
||||||
private final RoomProfileManagerService roomProfileManagerService;
|
private final RoomProfileManagerService roomProfileManagerService;
|
||||||
private final RoomSubscriptionCountService roomSubscriptionCountService;
|
private final RoomSubscriptionCountService roomSubscriptionCountService;
|
||||||
|
private final TaskMqMessage taskMqMessage;
|
||||||
|
|
||||||
public Boolean execute(RoomSubscriptionCmd cmd) {
|
public Boolean execute(RoomSubscriptionCmd cmd) {
|
||||||
// 无法操作,错误归属
|
// 无法操作,错误归属
|
||||||
@ -40,6 +44,13 @@ public class RoomSubscriptionCmdExe {
|
|||||||
}
|
}
|
||||||
roomSubscriptionService.add(cmd.requiredReqUserId(), cmd.getRoomId());
|
roomSubscriptionService.add(cmd.requiredReqUserId(), cmd.getRoomId());
|
||||||
roomSubscriptionCountService.saveRoomSubscriptionCount(cmd.getRoomId(), Boolean.TRUE);
|
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;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,9 +35,8 @@ public class RoomVoiceProfileByUserIdQryExe {
|
|||||||
if (Objects.nonNull(roomProfileManagerDTO)&&Objects.nonNull(roomProfileManagerDTO.getCountryCode())) {
|
if (Objects.nonNull(roomProfileManagerDTO)&&Objects.nonNull(roomProfileManagerDTO.getCountryCode())) {
|
||||||
//放一个创建自己房间钩子
|
//放一个创建自己房间钩子
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(11)
|
.taskId(5)
|
||||||
.userId(cmd.getReqUserId())
|
.userId(cmd.getReqUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -85,12 +85,10 @@ public class UserHandleFriendApplyCmdExe {
|
|||||||
friendsApplyListService.changeStatus(cmd.requiredReqUserId(), cmd.getApplyUserId(),
|
friendsApplyListService.changeStatus(cmd.requiredReqUserId(), cmd.getApplyUserId(),
|
||||||
getFriendApplyStatus(cmd.getAgree()));
|
getFriendApplyStatus(cmd.getAgree()));
|
||||||
|
|
||||||
//添加好友 每日任务
|
//添加好友
|
||||||
|
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(3)
|
.taskId(6)
|
||||||
.userId(cmd.getApplyUserId())
|
.userId(cmd.getApplyUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
|
||||||
.build());
|
.build());
|
||||||
|
|
||||||
//sendPush(cmd);
|
//sendPush(cmd);
|
||||||
|
|||||||
@ -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.external.inner.model.enums.message.OfficialNoticeTypeEnum;
|
||||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||||
import com.red.circle.framework.core.response.CommonErrorCode;
|
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.mq.rocket.business.producer.TaskMqMessage;
|
||||||
import com.red.circle.other.app.convertor.user.UserProfileAppConvertor;
|
import com.red.circle.other.app.convertor.user.UserProfileAppConvertor;
|
||||||
import com.red.circle.other.app.util.OfficialNoticeUtils;
|
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.infra.database.rds.service.user.user.UserSubscriptionService;
|
||||||
import com.red.circle.other.inner.asserts.user.UserRelationErrorCode;
|
import com.red.circle.other.inner.asserts.user.UserRelationErrorCode;
|
||||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
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.date.TimestampUtils;
|
||||||
import com.red.circle.tool.core.text.StringUtils;
|
import com.red.circle.tool.core.text.StringUtils;
|
||||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||||
@ -55,6 +57,7 @@ public class UserSupportRelationFollowOrCancelCmdExe {
|
|||||||
private final OfficialNoticeClient officialNoticeClient;
|
private final OfficialNoticeClient officialNoticeClient;
|
||||||
private final RoomProfileManagerService roomProfileManagerService;
|
private final RoomProfileManagerService roomProfileManagerService;
|
||||||
private final RelationshipFriendService relationshipFriendService;
|
private final RelationshipFriendService relationshipFriendService;
|
||||||
|
private final TaskMqMessage taskMqMessage;
|
||||||
|
|
||||||
public Boolean execute(AppUserIdCmd cmd) {
|
public Boolean execute(AppUserIdCmd cmd) {
|
||||||
// 不可操作自己
|
// 不可操作自己
|
||||||
@ -96,6 +99,13 @@ public class UserSupportRelationFollowOrCancelCmdExe {
|
|||||||
Long subUserId = cmd.getUserId();
|
Long subUserId = cmd.getUserId();
|
||||||
boolean mutual = userSubscriptionService.checkSubscription(subUserId, userId);
|
boolean mutual = userSubscriptionService.checkSubscription(subUserId, userId);
|
||||||
|
|
||||||
|
// 关注一个用户任务
|
||||||
|
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
|
.taskId(9)
|
||||||
|
.userId(cmd.requiredReqUserId())
|
||||||
|
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
||||||
|
.build());
|
||||||
|
|
||||||
// 如果是相互关注 则自动加为好友
|
// 如果是相互关注 则自动加为好友
|
||||||
if (mutual) {
|
if (mutual) {
|
||||||
try {
|
try {
|
||||||
@ -128,6 +138,18 @@ public class UserSupportRelationFollowOrCancelCmdExe {
|
|||||||
roomUserBlacklistService.removeBlack(roomProfile.getId(), cmd.requiredReqUserId());
|
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 {
|
} else {
|
||||||
UserProfileDTO userProfile = userProfileAppConvertor.toUserProfileDTO(userProfileGateway.getByUserId(cmd.requiredReqUserId()));
|
UserProfileDTO userProfile = userProfileAppConvertor.toUserProfileDTO(userProfileGateway.getByUserId(cmd.requiredReqUserId()));
|
||||||
officialNoticeClient.send(NoticeExtTemplateTypeCmd.builder()
|
officialNoticeClient.send(NoticeExtTemplateTypeCmd.builder()
|
||||||
|
|||||||
@ -43,12 +43,6 @@ public class UserCpPairUserProfileQryExe {
|
|||||||
return new CpPairUserProfileCO()
|
return new CpPairUserProfileCO()
|
||||||
.setMeUserProfile(userProfileAppConvertor.toUserProfileDTO((meUser)));
|
.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()
|
return new CpPairUserProfileCO()
|
||||||
.setMeUserProfile(userProfileAppConvertor.toUserProfileDTO((meUser)))
|
.setMeUserProfile(userProfileAppConvertor.toUserProfileDTO((meUser)))
|
||||||
|
|||||||
@ -211,11 +211,11 @@ public class GiftCountStrategy implements GiftStrategy {
|
|||||||
// 送礼物不再计入财富等级
|
// 送礼物不再计入财富等级
|
||||||
// consumptionLevelService.incrConsumptionGolds(runningWater.getUserId(), wealthActualAmount);
|
// consumptionLevelService.incrConsumptionGolds(runningWater.getUserId(), wealthActualAmount);
|
||||||
//累计财富等级mq
|
//累计财富等级mq
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
// taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(13)
|
// .taskId(13)
|
||||||
.userId(runningWater.getUserId())
|
// .userId(runningWater.getUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
// .day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
||||||
.build());
|
// .build());
|
||||||
|
|
||||||
// 财富等级
|
// 财富等级
|
||||||
// consumptionLevelService.incrConsumptionGolds(runningWater.getUserId(), wealthActualAmount);
|
// consumptionLevelService.incrConsumptionGolds(runningWater.getUserId(), wealthActualAmount);
|
||||||
@ -235,11 +235,11 @@ public class GiftCountStrategy implements GiftStrategy {
|
|||||||
|
|
||||||
// 记录魅力等级
|
// 记录魅力等级
|
||||||
consumptionLevelService.incrConsumptionDiamond(accept.getAcceptUserId(), charmGiftValue);
|
consumptionLevelService.incrConsumptionDiamond(accept.getAcceptUserId(), charmGiftValue);
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
/*taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(14)
|
.taskId(14)
|
||||||
.userId(accept.getAcceptUserId())
|
.userId(accept.getAcceptUserId())
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
||||||
.build());
|
.build());*/
|
||||||
|
|
||||||
userMqMessageService.sendBadgeEvent(accept.getAcceptUserId(), BadgeKeyEnum.CHARM.name());
|
userMqMessageService.sendBadgeEvent(accept.getAcceptUserId(), BadgeKeyEnum.CHARM.name());
|
||||||
|
|
||||||
|
|||||||
@ -117,7 +117,7 @@ public class TaskListener implements MessageListener {
|
|||||||
handleTask9(eventBody);
|
handleTask9(eventBody);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
// 处理任务-9 的逻辑 关注一个房间
|
// 处理任务-10 的逻辑 关注一个房间
|
||||||
handleTask10(eventBody);
|
handleTask10(eventBody);
|
||||||
break;
|
break;
|
||||||
default:
|
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) {
|
private void handleTask1(TaskApprovalEvent eventBody) {
|
||||||
// // 增加心跳次数 放一天
|
// // 增加心跳次数 放一天
|
||||||
String redisKey = "mic:heartbeat:" + eventBody.getUserId();
|
String redisKey = "mic:heartbeat:" + eventBody.getUserId();
|
||||||
@ -225,10 +217,9 @@ public class TaskListener implements MessageListener {
|
|||||||
private void handleTask6(TaskApprovalEvent eventBody) {
|
private void handleTask6(TaskApprovalEvent eventBody) {
|
||||||
log.warn("处理任务-6 添加10个好友: {}", eventBody);
|
log.warn("处理任务-6 添加10个好友: {}", eventBody);
|
||||||
// 更新任务状态的逻辑
|
// 更新任务状态的逻辑
|
||||||
if (relationshipFriendService.todayFlowSize(eventBody.getUserId()) >= 3) {
|
if (relationshipFriendService.selectMyFriendsCount(eventBody.getUserId()) >= 10) {
|
||||||
updateTaskStatus(eventBody);
|
updateTaskStatus(eventBody);
|
||||||
}
|
}
|
||||||
//判断用户是否添加了3个好友
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -257,13 +248,17 @@ public class TaskListener implements MessageListener {
|
|||||||
updateTaskStatus(eventBody);
|
updateTaskStatus(eventBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void handleTask8(TaskApprovalEvent eventBody) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void handleTask9(TaskApprovalEvent eventBody) {
|
private void handleTask9(TaskApprovalEvent eventBody) {
|
||||||
log.warn("处理任务-9: {}", eventBody);
|
|
||||||
// 首次充值
|
|
||||||
// updateTaskStatus(eventBody);
|
}
|
||||||
// checkMemberActive(eventBody.getUserId(), MemberActiveEnum.TASK_3);
|
|
||||||
// 如果是币商给用户充值
|
private void handleTask10(TaskApprovalEvent eventBody) {
|
||||||
dealRechargeCommission(eventBody);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dealRechargeCommission(TaskApprovalEvent eventBody) {
|
private void dealRechargeCommission(TaskApprovalEvent eventBody) {
|
||||||
@ -285,7 +280,7 @@ public class TaskListener implements MessageListener {
|
|||||||
redisService.increment(redisKey, 1);
|
redisService.increment(redisKey, 1);
|
||||||
} else {
|
} else {
|
||||||
//大于3次完成
|
//大于3次完成
|
||||||
if ("3".equals(inc)) {
|
if ("3".equals(inc) || Integer.parseInt(inc) >= 3) {
|
||||||
// 更新任务状态的逻辑 直接更新
|
// 更新任务状态的逻辑 直接更新
|
||||||
updateTaskStatus(eventBody);
|
updateTaskStatus(eventBody);
|
||||||
} else {
|
} else {
|
||||||
@ -296,10 +291,6 @@ public class TaskListener implements MessageListener {
|
|||||||
|
|
||||||
private void handleTask5(TaskApprovalEvent eventBody) {
|
private void handleTask5(TaskApprovalEvent eventBody) {
|
||||||
log.warn("处理任务-5 创建我的房间: {}", eventBody);
|
log.warn("处理任务-5 创建我的房间: {}", eventBody);
|
||||||
// AppExtCommand appExtCommand = new AppExtCommand();
|
|
||||||
// appExtCommand.setReqUserId(eventBody.getUserId());
|
|
||||||
// if (!Objects.isNull(roomProfileService.getRoomProfile(appExtCommand))) {
|
|
||||||
// }
|
|
||||||
updateTaskStatus(eventBody);
|
updateTaskStatus(eventBody);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -211,14 +211,6 @@ public class UserAccountCommon {
|
|||||||
userInviteUser.setUserId(userId);
|
userInviteUser.setUserId(userId);
|
||||||
userInviteUser.setSysOrigin(cmd.requireReqSysOrigin());
|
userInviteUser.setSysOrigin(cmd.requireReqSysOrigin());
|
||||||
userInviteUserService.save(userInviteUser);
|
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) {
|
private void mobileRegister(CreateAccountCmd cmd, BaseInfo baseInfo) {
|
||||||
|
|||||||
@ -36,6 +36,11 @@ public interface RelationshipFriendService extends BaseService<RelationshipFrien
|
|||||||
|
|
||||||
Long todayFlowSize(Long userId);
|
Long todayFlowSize(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我有多少个好友
|
||||||
|
*/
|
||||||
|
Long selectMyFriendsCount(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测是否是好友关系.
|
* 检测是否是好友关系.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -74,7 +74,15 @@ public class RelationshipFriendServiceImpl extends
|
|||||||
.count();
|
.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public Long selectMyFriendsCount(Long userId) {
|
||||||
|
return query()
|
||||||
|
.eq(RelationshipFriend::getUserId, userId)
|
||||||
|
.orderByDesc(RelationshipFriend::getId)
|
||||||
|
.count();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Boolean checkFriend(Long userId, Long friendUserId) {
|
public Boolean checkFriend(Long userId, Long friendUserId) {
|
||||||
return Optional.ofNullable(
|
return Optional.ofNullable(
|
||||||
query()
|
query()
|
||||||
|
|||||||
@ -138,13 +138,13 @@ public class SendFreightShipCmdExe {
|
|||||||
userSvipClient.incrIntegral(cmd.getAcceptUserId(), cmd.getQuantity().longValue());
|
userSvipClient.incrIntegral(cmd.getAcceptUserId(), cmd.getQuantity().longValue());
|
||||||
|
|
||||||
//完成任务 钩子 9 充值 币商
|
//完成任务 钩子 9 充值 币商
|
||||||
taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
/*taskMqMessage.sendTask(TaskApprovalEvent.builder()
|
||||||
.taskId(9)
|
.taskId(9)
|
||||||
.userId(cmd.getAcceptUserId())
|
.userId(cmd.getAcceptUserId())
|
||||||
.sysOrigin(cmd.requireReqSysOrigin())
|
.sysOrigin(cmd.requireReqSysOrigin())
|
||||||
.currencyDiff((cmd.getQuantity().longValue()))
|
.currencyDiff((cmd.getQuantity().longValue()))
|
||||||
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
.day(LocalDateTimeUtils.nowFormat("yyyy-MM-dd"))
|
||||||
.build());
|
.build());*/
|
||||||
return balance;
|
return balance;
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user