|
|
@@ -51,8 +51,6 @@ public class ConsumeController {
|
|
|
private final ConsumeBusiness consumeBusiness;
|
|
|
private final BaseBusiness baseBusiness;
|
|
|
private final DefaultConfig defaultConfig;
|
|
|
- @DubboReference
|
|
|
- private final RemotePtParameterService remotePtParameterService;
|
|
|
|
|
|
/**
|
|
|
* 请求消费(校园码)
|
|
|
@@ -81,9 +79,8 @@ public class ConsumeController {
|
|
|
|
|
|
Object object = doRecordData(record, "requestConsume", mac, xfPwd);
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(object);
|
|
|
- scheduledExecutorService.schedule(() -> {
|
|
|
- sendConsumeToCloud(jsonObject, record);
|
|
|
- }, 3, TimeUnit.SECONDS);
|
|
|
+
|
|
|
+ sendConsumeToCloud(jsonObject, record);
|
|
|
|
|
|
return object;
|
|
|
}
|
|
|
@@ -103,9 +100,7 @@ public class ConsumeController {
|
|
|
Object object = doRecordData(record, "requestConsume", mac, xfPwd);
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(object);
|
|
|
|
|
|
- scheduledExecutorService.schedule(() -> {
|
|
|
- sendConsumeToCloud(jsonObject, record);
|
|
|
- }, 3, TimeUnit.SECONDS);
|
|
|
+ sendConsumeToCloud(jsonObject, record);
|
|
|
|
|
|
return object;
|
|
|
}
|
|
|
@@ -203,7 +198,9 @@ public class ConsumeController {
|
|
|
//发送消息
|
|
|
if (ObjectUtil.equals(defaultConfig.getLocationFlag(), DefaultConstants.LOCAL_FLAG)) {
|
|
|
ConsumptionBo bo = recordConvertStrategy.convert(record, "YC");
|
|
|
- baseBusiness.sendCloudConsume(bo);
|
|
|
+ scheduledExecutorService.schedule(() -> {
|
|
|
+ baseBusiness.sendCloudConsume(bo);
|
|
|
+ }, 1, TimeUnit.SECONDS);
|
|
|
}
|
|
|
}
|
|
|
}
|