|
@@ -11,6 +11,7 @@ import org.dromara.backstage.api.RemotePtParameterService;
|
|
|
import org.dromara.backstage.api.domain.vo.RemoteCardVo;
|
|
import org.dromara.backstage.api.domain.vo.RemoteCardVo;
|
|
|
import org.dromara.backstage.api.domain.vo.RemoteMealTypeVo;
|
|
import org.dromara.backstage.api.domain.vo.RemoteMealTypeVo;
|
|
|
import org.dromara.backstage.api.domain.vo.RemoteUserAccountVo;
|
|
import org.dromara.backstage.api.domain.vo.RemoteUserAccountVo;
|
|
|
|
|
+import org.dromara.common.core.config.DefaultConfig;
|
|
|
import org.dromara.common.core.constant.ApiErrorTypeConstants;
|
|
import org.dromara.common.core.constant.ApiErrorTypeConstants;
|
|
|
import org.dromara.common.core.constant.DefaultConstants;
|
|
import org.dromara.common.core.constant.DefaultConstants;
|
|
|
import org.dromara.common.core.domain.R;
|
|
import org.dromara.common.core.domain.R;
|
|
@@ -28,6 +29,7 @@ import org.dromara.server.common.domain.vo.yc.YcPushConsumeInfoVo;
|
|
|
import org.dromara.server.consume.domain.bo.*;
|
|
import org.dromara.server.consume.domain.bo.*;
|
|
|
import org.dromara.server.consume.domain.vo.*;
|
|
import org.dromara.server.consume.domain.vo.*;
|
|
|
import org.dromara.server.consume.service.*;
|
|
import org.dromara.server.consume.service.*;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -58,6 +60,7 @@ public class BaseBusiness {
|
|
|
private final IXfConsumeDetailService consumeDetailService;
|
|
private final IXfConsumeDetailService consumeDetailService;
|
|
|
private final IPtBagService bagService;
|
|
private final IPtBagService bagService;
|
|
|
private final KafkaNormalProducer kafkaNormalProducer;
|
|
private final KafkaNormalProducer kafkaNormalProducer;
|
|
|
|
|
+ private final DefaultConfig defaultConfig;
|
|
|
|
|
|
|
|
@DubboReference
|
|
@DubboReference
|
|
|
private final RemotePtParameterService remotePtParameterService;
|
|
private final RemotePtParameterService remotePtParameterService;
|
|
@@ -158,8 +161,11 @@ public class BaseBusiness {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 5.发送一条消费记录到kafka(教务就餐打卡)
|
|
// 5.发送一条消费记录到kafka(教务就餐打卡)
|
|
|
- String pushConsume = remotePtParameterService.getPtParameterByKey("PUSH_CONSUME_MQ");
|
|
|
|
|
- if(ObjectUtil.equals(pushConsume, "1")){
|
|
|
|
|
|
|
+ //String pushConsume = remotePtParameterService.getPtParameterByKey("PUSH_CONSUME_MQ");
|
|
|
|
|
+ //if(ObjectUtil.equals(pushConsume, "1")){
|
|
|
|
|
+ // this.sendConsumeToKafka(detailVos,userAccountVo);
|
|
|
|
|
+ //}
|
|
|
|
|
+ if (ObjectUtil.equals(defaultConfig.getLocationFlag(), DefaultConstants.LOCAL_FLAG)) {
|
|
|
this.sendConsumeToKafka(detailVos,userAccountVo);
|
|
this.sendConsumeToKafka(detailVos,userAccountVo);
|
|
|
}
|
|
}
|
|
|
return R.ok();
|
|
return R.ok();
|