谷歌马甲包-代码-删除废弃功能
This commit is contained in:
@@ -17,12 +17,6 @@ public interface MqConstant {
|
||||
String ACTIVITY_PACK_TOPIC = "activity_pack_topic";
|
||||
String ACTIVITY_PACK_CONSUME_GROUP = "activity_pack_consume_group";
|
||||
|
||||
String SIGN_DRAW_GOLD_TOPIC = "sign_draw_gold_topic";
|
||||
String SIGN_DRAW_GOLD_CONSUME_GROUP = "sign_draw_gold_consume_group";
|
||||
|
||||
String SIGN_TOPIC = "sign_topic";
|
||||
String SIGN_CONSUME_GROUP = "sign_consume_group";
|
||||
|
||||
String RADISH_GIFT_TOPIC = "radish_gift_topic";
|
||||
String RADISH_GIFT_CONSUME_GROUP = "radish_gift_consume_group";
|
||||
|
||||
|
@@ -1,45 +0,0 @@
|
||||
package com.accompany.mq.consumer;
|
||||
|
||||
import com.accompany.business.message.SignDrawGoldMessage;
|
||||
import com.accompany.business.service.signweb.SignDrawGoldService;
|
||||
import com.accompany.common.redis.RedisKey;
|
||||
import com.accompany.common.utils.BlankUtil;
|
||||
import com.accompany.core.service.common.JedisService;
|
||||
import com.accompany.mq.constant.MqConstant;
|
||||
import com.accompany.mq.listener.AbstractMessageListener;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 瓜分金币
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@ConditionalOnProperty(name = "spring.application.name", havingValue = "web")
|
||||
@RocketMQMessageListener(topic = MqConstant.SIGN_DRAW_GOLD_TOPIC, consumerGroup = MqConstant.SIGN_DRAW_GOLD_CONSUME_GROUP)
|
||||
public class SignDrawGoldMessageConsumer extends AbstractMessageListener<SignDrawGoldMessage> {
|
||||
|
||||
@Autowired
|
||||
private JedisService jedisService;
|
||||
@Autowired
|
||||
private SignDrawGoldService signDrawGoldService;
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void onMessage(SignDrawGoldMessage signDrawGoldMessage) {
|
||||
log.info("onMessage signDrawGoldMessage: {}", JSON.toJSONString(signDrawGoldMessage));
|
||||
|
||||
// 判断该消息是否已经消费过
|
||||
String messStatus = jedisService.hget(RedisKey.mq_sign_draw_gold_status.getKey(), signDrawGoldMessage.getMessId());
|
||||
if (BlankUtil.isBlank(messStatus)) {
|
||||
return;
|
||||
}
|
||||
signDrawGoldService.handleDrawGoldMessage(signDrawGoldMessage);
|
||||
}
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
package com.accompany.mq.consumer;
|
||||
|
||||
import com.accompany.business.message.SignMessage;
|
||||
import com.accompany.business.service.signweb.SignService;
|
||||
import com.accompany.common.redis.RedisKey;
|
||||
import com.accompany.common.utils.BlankUtil;
|
||||
import com.accompany.core.service.common.JedisService;
|
||||
import com.accompany.mq.constant.MqConstant;
|
||||
import com.accompany.mq.listener.AbstractMessageListener;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 每日签到奖励发放
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@ConditionalOnProperty(name = "spring.application.name", havingValue = "web")
|
||||
@RocketMQMessageListener(topic = MqConstant.SIGN_TOPIC, consumerGroup = MqConstant.SIGN_CONSUME_GROUP)
|
||||
public class SignMessageConsumer extends AbstractMessageListener<SignMessage> {
|
||||
|
||||
@Autowired
|
||||
private JedisService jedisService;
|
||||
@Autowired
|
||||
private SignService signService;
|
||||
|
||||
@Override
|
||||
public void onMessage(SignMessage signMessage) {
|
||||
log.info("onMessage signMessage: {}", JSON.toJSONString(signMessage));
|
||||
|
||||
// 判断该消息是否已经消费过
|
||||
String messStatus = jedisService.hget(RedisKey.mq_sign_status.getKey(), signMessage.getMessId());
|
||||
if (BlankUtil.isBlank(messStatus)) {
|
||||
return;
|
||||
}
|
||||
signService.handlerSign(signMessage);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user