|
@@ -1,6 +1,7 @@
|
|
|
package org.dromara.server.mq.event.kafka.impl.cloud;
|
|
package org.dromara.server.mq.event.kafka.impl.cloud;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -32,7 +33,11 @@ public class ConsumeEventStrategyImpl implements IYktEventStrategy {
|
|
|
@Override
|
|
@Override
|
|
|
public void doMsgHandle(String eventType, Object msg) throws Exception {
|
|
public void doMsgHandle(String eventType, Object msg) throws Exception {
|
|
|
if (ObjectUtil.equals(eventType, EventTypeConstants.CONSUME)) {
|
|
if (ObjectUtil.equals(eventType, EventTypeConstants.CONSUME)) {
|
|
|
- RemoteConsumeBo recordBo = JSONUtil.toBean(JSONUtil.parseObj(msg), RemoteConsumeBo.class);
|
|
|
|
|
|
|
+ // 解决枚举类转换异常的问题
|
|
|
|
|
+ JSONObject entries = JSONUtil.parseObj(msg);
|
|
|
|
|
+ entries.set("creditType", "");
|
|
|
|
|
+ entries.set("useType", "");
|
|
|
|
|
+ RemoteConsumeBo recordBo = JSONUtil.toBean(entries, RemoteConsumeBo.class);
|
|
|
recordBo.setStatusFlag(4);
|
|
recordBo.setStatusFlag(4);
|
|
|
recordBo.setUseType(SystemUseTypeEnum.CONSUME);
|
|
recordBo.setUseType(SystemUseTypeEnum.CONSUME);
|
|
|
recordBo.setCreditType(CreditTypeEnum.TERM_CONSUME);
|
|
recordBo.setCreditType(CreditTypeEnum.TERM_CONSUME);
|