|
@@ -68,10 +68,10 @@ public class ConsumeBusiness {
|
|
|
AllowConsumeValidationContext ctx = AllowConsumeValidationContext.create(bo);
|
|
AllowConsumeValidationContext ctx = AllowConsumeValidationContext.create(bo);
|
|
|
R<ErrorInfo> result = commonCheck.consumeValidation(ctx);
|
|
R<ErrorInfo> result = commonCheck.consumeValidation(ctx);
|
|
|
if (R.isError(result)) {
|
|
if (R.isError(result)) {
|
|
|
- log.error("[请求交易]-[记录有效性验证失败]-[错误: {}]-[数据:{}]", result.getData(), JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.error("[请求交易]-[记录有效性验证失败]-[{}]-[{}]", JSONUtil.toJsonStr(result.getData()), JSONUtil.toJsonStr(bo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- log.info("[请求交易]-[记录有效性验证完成]-[耗时: {} 毫秒]-[记录:{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.info("[请求交易]-[记录有效性验证完成]-[耗时: {} ms]-[{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
|
RemoteUserAccountVo userAccountVo = ctx.getUserAccountVo();
|
|
RemoteUserAccountVo userAccountVo = ctx.getUserAccountVo();
|
|
|
RemoteCardVo userCardVo = ctx.getUserCardVo();
|
|
RemoteCardVo userCardVo = ctx.getUserCardVo();
|
|
@@ -82,18 +82,18 @@ public class ConsumeBusiness {
|
|
|
startTime = System.currentTimeMillis();
|
|
startTime = System.currentTimeMillis();
|
|
|
result = requestCheck.checkConsume(bo, userAccountVo, userCardVo, termVo, mapCardLimited, cardLimitedVo);
|
|
result = requestCheck.checkConsume(bo, userAccountVo, userCardVo, termVo, mapCardLimited, cardLimitedVo);
|
|
|
if (R.isError(result)) {
|
|
if (R.isError(result)) {
|
|
|
- log.error("[请求交易]-[交易流程验证失败]-[错误: {}]-[数据:{}]", result.getData(), JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.error("[请求交易]-[交易流程验证失败]-[{}]-[{}]", JSONUtil.toJsonStr(result.getData()), JSONUtil.toJsonStr(bo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- log.warn("[请求交易]-[交易流程验证完成]-[耗时: {} 毫秒]", System.currentTimeMillis() - startTime);
|
|
|
|
|
|
|
+ log.warn("[请求交易]-[交易流程验证完成]-[耗时: {} ms]-[{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
|
startTime = System.currentTimeMillis();
|
|
startTime = System.currentTimeMillis();
|
|
|
result = requestCheck.completeConsumeRequest(bo, userAccountVo, userCardVo, termVo, mapCardLimited, cardLimitedVo);
|
|
result = requestCheck.completeConsumeRequest(bo, userAccountVo, userCardVo, termVo, mapCardLimited, cardLimitedVo);
|
|
|
if (R.isError(result)) {
|
|
if (R.isError(result)) {
|
|
|
- log.error("[请求交易]-[消费原始记录失败]-[错误: {}]-[数据:{}]", result.getData(), JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.error("[请求交易]-[消费原始记录失败]-[{}]-[{}]", JSONUtil.toJsonStr(result.getData()), JSONUtil.toJsonStr(bo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- log.info("[请求交易]-[生成原始消费记录完成]-[耗时: {} 毫秒]", System.currentTimeMillis() - startTime);
|
|
|
|
|
|
|
+ log.info("[请求交易]-[生成原始消费记录完成]-[耗时: {} ms]-[{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
}
|
|
}
|
|
@@ -111,10 +111,10 @@ public class ConsumeBusiness {
|
|
|
AllowConsumeValidationContext ctx = AllowConsumeValidationContext.create(bo);
|
|
AllowConsumeValidationContext ctx = AllowConsumeValidationContext.create(bo);
|
|
|
R<ErrorInfo> result = commonCheck.consumeValidation(ctx);
|
|
R<ErrorInfo> result = commonCheck.consumeValidation(ctx);
|
|
|
if (R.isError(result)) {
|
|
if (R.isError(result)) {
|
|
|
- log.error("[上传交易]-[记录有效性验证失败]-[错误: {}]-[数据:{}]", result.getData(), JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.error("[上传交易]-[记录有效性验证失败]-[{}]-[{}]", JSONUtil.toJsonStr(result.getData()), JSONUtil.toJsonStr(bo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- log.info("[上传交易]-[记录有效性验证完成]-[耗时: {} 毫秒]-[记录:{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.info("[上传交易]-[记录有效性验证完成]-[耗时: {} ms]-[{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
|
startTime = System.currentTimeMillis();
|
|
startTime = System.currentTimeMillis();
|
|
|
List<PtBagVo> bagVos = new ArrayList<>();
|
|
List<PtBagVo> bagVos = new ArrayList<>();
|
|
@@ -124,22 +124,22 @@ public class ConsumeBusiness {
|
|
|
RemoteMealTypeVo mealTypeVo = new RemoteMealTypeVo();
|
|
RemoteMealTypeVo mealTypeVo = new RemoteMealTypeVo();
|
|
|
result = uploadCheck.checkBill(bo, userAccountVo, termVo, bagVos, mealTypeVo);
|
|
result = uploadCheck.checkBill(bo, userAccountVo, termVo, bagVos, mealTypeVo);
|
|
|
if (R.isError(result)) {
|
|
if (R.isError(result)) {
|
|
|
- log.error("[上传交易]-[交易账单处理失败]-[错误: {}]-[数据:{}]", result.getData(), JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.error("[上传交易]-[交易账单处理失败]-[{}]-[{}]", JSONUtil.toJsonStr(result.getData()), JSONUtil.toJsonStr(bo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- log.info("[上传交易]-[交易账单处理完成]-[耗时: {} 毫秒]-[记录:{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.info("[上传交易]-[交易账单处理完成]-[耗时: {} ms]-[{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
|
startTime = System.currentTimeMillis();
|
|
startTime = System.currentTimeMillis();
|
|
|
try {
|
|
try {
|
|
|
result = baseBusiness.postConsumeRecord(bo, userAccountVo, userCardVo, bagVos, termVo, mealTypeVo, "");
|
|
result = baseBusiness.postConsumeRecord(bo, userAccountVo, userCardVo, bagVos, termVo, mealTypeVo, "");
|
|
|
if (R.isError(result)) {
|
|
if (R.isError(result)) {
|
|
|
- log.error("[上传交易]-[交易入库失败]-[错误:{}]-[数据:{}]", result.getData(), JsonUtils.toJsonString(bo));
|
|
|
|
|
|
|
+ log.error("[上传交易]-[交易入库失败]-[{}]-[{}]", JSONUtil.toJsonStr(result.getData()), JsonUtils.toJsonString(bo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- log.info("[上传交易]-[交易入库处理完成]-[耗时: {} 毫秒]-[记录:{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
|
|
|
|
+ log.info("[上传交易]-[交易入库处理完成]-[耗时: {} ms]-[{}]", System.currentTimeMillis() - startTime, JSONUtil.toJsonStr(bo));
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
} catch (ConsumeException e) {
|
|
} catch (ConsumeException e) {
|
|
|
- log.error("[上传交易]-[交易入库失败]-[{}]", e.getMessage(), e);
|
|
|
|
|
|
|
+ log.error("[上传交易]-[交易入库失败]-[{}]-[{}]", e.getMessage(), JSONUtil.toJsonStr(bo), e);
|
|
|
return R.fail(new ErrorInfo(500, ApiErrorTypeConstants.EXCEPTION, e.getMessage(), ""));
|
|
return R.fail(new ErrorInfo(500, ApiErrorTypeConstants.EXCEPTION, e.getMessage(), ""));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -293,7 +293,6 @@ public class ConsumeBusiness {
|
|
|
* @return 对账结果对象 (ReconciliationResult)。
|
|
* @return 对账结果对象 (ReconciliationResult)。
|
|
|
* 包含处理后的结果信息,包括成功处理的记录、失败的记录以及异常详情。
|
|
* 包含处理后的结果信息,包括成功处理的记录、失败的记录以及异常详情。
|
|
|
*/
|
|
*/
|
|
|
-
|
|
|
|
|
private ReconciliationResult processRecordsInParallel(List<ConsumptionBo> records) {
|
|
private ReconciliationResult processRecordsInParallel(List<ConsumptionBo> records) {
|
|
|
ReconciliationResult result = new ReconciliationResult();
|
|
ReconciliationResult result = new ReconciliationResult();
|
|
|
|
|
|