| | |
| | | import com.aliyun.openservices.ons.api.Message;
|
| | | import com.aliyun.openservices.ons.api.MessageListener;
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.mq.order.OrderTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.order.body.OrderConfirmMQMsg;
|
| | | import com.yeshi.fanli.dto.mq.order.body.OrderMoneyRecievedMQMsg;
|
| | | import com.yeshi.fanli.dto.mq.user.UserTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.user.body.UserCloudMQMsg;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.user.cloud.UserCloudService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | |
|
| | | /**
|
| | |
| | | String tag = message.getTag();
|
| | | if (tag == null)
|
| | | tag = "";
|
| | |
|
| | | if (java.lang.System.currentTimeMillis() <= Constant.NEW_ORDER_FANLI_RULE_TIME) {
|
| | | return Action.CommitMessage;
|
| | | }
|
| | |
|
| | | // 邀请相关
|
| | | if (MQTopicName.TOPIC_USER.name().equalsIgnoreCase(message.getTopic())) {
|
| | | if (tag.equalsIgnoreCase(UserTopicTagEnum.userCloud.name())) {// 用户等级发生变化
|
| | | if (tag.equalsIgnoreCase(UserTopicTagEnum.userCloud.name())) {
|
| | | UserCloudMQMsg msg = new Gson().fromJson(new String(message.getBody()),UserCloudMQMsg.class);
|
| | | if (msg.getType() == UserCloudMQMsg.TYPE_EVALUATE) {
|
| | | LogHelper.cloudInfo("发圈中信息 -" + msg.getId() );
|
| | | userCloudService.autoSendByDynamic(msg.getUid(), msg.getId());
|
| | | } else {
|
| | | } else if (msg.getType() == UserCloudMQMsg.TYPE_STORE) {
|
| | | LogHelper.cloudInfo("选品库信息 -" + msg.getId() );
|
| | | userCloudService.autoSendCustomGoods(msg.getUid(), Long.parseLong(msg.getId()));
|
| | | } else if (msg.getType() == UserCloudMQMsg.TYPE_PUSH) {
|
| | | LogHelper.cloudInfo("站内信息 -" + msg.getId() );
|
| | | userCloudService.offlineNotificationZNX(msg.getUid());
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return Action.CommitMessage;
|
| | | }
|
| | | }
|