提交 1fc578e5 编写于 作者: zhouweidong's avatar zhouweidong

适配rocketmq

上级 8b14fbfc
......@@ -13,7 +13,7 @@ TARGET=PSSYSTEM
<#if hasMQEntity>
<#assign nameAddress="127.0.0.1:9876">
<#assign instanceName="rmq-instance">
package ${dataEntity.codeName}.core.util.config;
package ${pub.getPKGCodeName()}.core.util.config;
import com.alibaba.fastjson.JSON;
import com.alibaba.rocketmq.client.consumer.DefaultMQPushConsumer;
......@@ -25,8 +25,8 @@ import com.alibaba.rocketmq.client.producer.SendResult;
import com.alibaba.rocketmq.common.message.Message;
import com.alibaba.rocketmq.common.message.MessageExt;
import lombok.extern.slf4j.Slf4j;
import ${dataEntity.codeName}.core.valuerule.domain.City;
import ${dataEntity.codeName}.core.valuerule.service.ICityService;
import ${pub.getPKGCodeName()}.core.valuerule.domain.City;
import ${pub.getPKGCodeName()}.core.valuerule.service.ICityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -80,7 +80,7 @@ public class RocketMQConfig {
<#assign instanceName=syncAgent.getAgentTag2()>
</#if>
@Autowired
${pub.getPKGCodeName()}.core.${dataEntity.getPSSystemModule().getCodeName()?lower_case}.service.I${dataEntity.codeName}Service ${dataEntity.codeName}Service;
${pub.getPKGCodeName()}.core.${dataEntity.getPSSystemModule().getCodeName()?lower_case}.service.I${pub.getPKGCodeName()}Service ${pub.getPKGCodeName()}Service;
@Bean("${consumer}")
public DefaultMQPushConsumer ${srfmethodname(consumer)}(){
......@@ -97,8 +97,8 @@ public class RocketMQConfig {
for (MessageExt msg : msgs) {
<#if dataSync.getInTestPSDEAction()??>
<#assign inputAction=srfmethodname(dataSync.getInTestPSDEAction().codeName)>
${dataEntity.codeName}.core.${dataEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${dataEntity.getCodeName()} domain = JSON.parseObject(new String(msg.getBody()),${dataEntity.codeName}.core.${dataEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${dataEntity.getCodeName()}.class);
${dataEntity.codeName}Service.${inputAction}(domain);
${pub.getPKGCodeName()}.core.${dataEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${dataEntity.getCodeName()} domain = JSON.parseObject(new String(msg.getBody()),${pub.getPKGCodeName()}.core.${dataEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${dataEntity.getCodeName()}.class);
${pub.getPKGCodeName()}Service.${inputAction}(domain);
<#else>
log.info("接收到[]消息,但未配置实体输入过滤行为,消息将被忽略。"+new String(msg.getBody()));
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册