package com.neusoft.smart.pos.mq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import com.neusoft.smart.pos.mq.aliyunRocketMq.AliyunRocketMqConsumer;
import com.neusoft.smart.pos.mq.aliyunRocketMq.EnumMsgTopic;
import com.neusoft.smart.pos.mq.aliyunRocketMq.EnumMsgTopicTags;
import com.neusoft.smart.pos.mq.helper.MemberMQReceiverHelper;
import com.neusoft.smart.pos.mq.MQConfig;

@Component
@Profile(MQConfig.Impl.ALIYUN_ROCKET_MQ)
public class MemberAliyunRocketMQReceiver extends AliyunRocketMqConsumer{

	@Autowired
	MemberMQReceiverHelper memberMQReceiverHelper;
	
	
	@Override
	protected void doMessage(String topic,String tag,String msg) {
		if (EnumMsgTopic.ORDER_COMPLETE.getTopic().equals(topic) && EnumMsgTopicTags.ORDER_COMPLETE_QUEUE2.getTags().equals(tag)) {
			memberMQReceiverHelper.processOrderCompleteStringMessage(msg);
		}
	}

}
