|
@@ -6,6 +6,8 @@ import cn.hutool.json.JSONUtil;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
|
|
+import org.dromara.common.core.enums.CreditTypeEnum;
|
|
|
|
|
+import org.dromara.common.core.enums.SystemUseTypeEnum;
|
|
|
import org.dromara.common.message.kafka.constant.EventSenderConstants;
|
|
import org.dromara.common.message.kafka.constant.EventSenderConstants;
|
|
|
import org.dromara.common.message.kafka.constant.EventTypeConstants;
|
|
import org.dromara.common.message.kafka.constant.EventTypeConstants;
|
|
|
import org.dromara.consume.api.RemoteConsumeService;
|
|
import org.dromara.consume.api.RemoteConsumeService;
|
|
@@ -34,6 +36,9 @@ public class ConsumeEventStrategyImpl implements IYktEventStrategy {
|
|
|
if (ObjectUtil.equals(eventType, EventTypeConstants.CONSUME)) {
|
|
if (ObjectUtil.equals(eventType, EventTypeConstants.CONSUME)) {
|
|
|
ConsumptionBo consumptionBo = JSONUtil.toBean(JSONUtil.parseObj(msg), ConsumptionBo.class);
|
|
ConsumptionBo consumptionBo = JSONUtil.toBean(JSONUtil.parseObj(msg), ConsumptionBo.class);
|
|
|
RemoteConsumeBo recordBo = BeanUtil.copyProperties(consumptionBo, RemoteConsumeBo.class);
|
|
RemoteConsumeBo recordBo = BeanUtil.copyProperties(consumptionBo, RemoteConsumeBo.class);
|
|
|
|
|
+ recordBo.setStatusFlag(4);
|
|
|
|
|
+ recordBo.setUseType(SystemUseTypeEnum.CONSUME);
|
|
|
|
|
+ recordBo.setCreditType(CreditTypeEnum.TERM_CONSUME);
|
|
|
log.info("[处理本地->云端消费请求]-[消费信息:{}]", JSONUtil.toJsonStr(recordBo));
|
|
log.info("[处理本地->云端消费请求]-[消费信息:{}]", JSONUtil.toJsonStr(recordBo));
|
|
|
remoteConsumeService.dealKafkaConsumeData(recordBo);
|
|
remoteConsumeService.dealKafkaConsumeData(recordBo);
|
|
|
}
|
|
}
|