|
@@ -82,7 +82,6 @@ public class CheckBusiness {
|
|
|
private final IXfCardLimitedService cardLimitedService;
|
|
private final IXfCardLimitedService cardLimitedService;
|
|
|
private final DefaultConfig defaultConfig;
|
|
private final DefaultConfig defaultConfig;
|
|
|
private final BaseBusiness baseBusiness;
|
|
private final BaseBusiness baseBusiness;
|
|
|
- // private final SyncRemoteXfTermService syncRemoteXfTermService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 计算折扣金额
|
|
* 计算折扣金额
|
|
@@ -223,7 +222,6 @@ public class CheckBusiness {
|
|
|
return R.fail(errorInfo);
|
|
return R.fail(errorInfo);
|
|
|
}
|
|
}
|
|
|
bo.setTermNo(remoteXfTermVo.getTermNo());
|
|
bo.setTermNo(remoteXfTermVo.getTermNo());
|
|
|
- BeanUtil.copyProperties(remoteXfTermVo, useTermVo);
|
|
|
|
|
RemoteVoConvert.INSTANCE.copyRemoteTermVo(useTermVo, remoteXfTermVo);
|
|
RemoteVoConvert.INSTANCE.copyRemoteTermVo(useTermVo, remoteXfTermVo);
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
}
|
|
}
|
|
@@ -263,23 +261,25 @@ public class CheckBusiness {
|
|
|
MessageFormat.format("流水号为[{0}]的账户已过有效期,不允许交易", userAccountVo.getUserNo()));
|
|
MessageFormat.format("流水号为[{0}]的账户已过有效期,不允许交易", userAccountVo.getUserNo()));
|
|
|
return R.fail(errorInfo);
|
|
return R.fail(errorInfo);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 2.餐类验证
|
|
// 2.餐类验证
|
|
|
RemoteMealTypeVo mealType = remoteMealTypeService.queryMealTypeVoByTime(bo.getConsumeDate());
|
|
RemoteMealTypeVo mealType = remoteMealTypeService.queryMealTypeVoByTime(bo.getConsumeDate());
|
|
|
if (ObjectUtil.isEmpty(mealType)) {
|
|
if (ObjectUtil.isEmpty(mealType)) {
|
|
|
return R.fail(new ErrorInfo(400, ApiErrorTypeConstants.NOT_FOUND, "不在交易时段", "不在交易时段"));
|
|
return R.fail(new ErrorInfo(400, ApiErrorTypeConstants.NOT_FOUND, "不在交易时段", "不在交易时段"));
|
|
|
}
|
|
}
|
|
|
- // 3.设备限制验证,只有消费机上传时会会进行验证,在手工补扣、错扣补款时不进行验证
|
|
|
|
|
|
|
+ // 3.根据消费机的消费模式验证余额,如果余额不足则返回
|
|
|
|
|
+ result = checkOrigDeductionBag(bo, userAccountVo, useTermVo);
|
|
|
|
|
+ if (R.isError(result)) {
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 4.设备限制验证,只有消费机上传时会会进行验证,在手工补扣、错扣补款时不进行验证
|
|
|
if (bo.getStatusFlag() == 1 || bo.getStatusFlag() == 4) {
|
|
if (bo.getStatusFlag() == 1 || bo.getStatusFlag() == 4) {
|
|
|
result = checkTermLimitDeal(bo, useTermVo, userCardVo, mealType);
|
|
result = checkTermLimitDeal(bo, useTermVo, userCardVo, mealType);
|
|
|
if (R.isError(result)) {
|
|
if (R.isError(result)) {
|
|
|
return R.fail(new ErrorInfo(400, ApiErrorTypeConstants.NOT_FOUND, "消费限制判断存在问题", JSONUtil.toJsonStr(result.getData())));
|
|
return R.fail(new ErrorInfo(400, ApiErrorTypeConstants.NOT_FOUND, "消费限制判断存在问题", JSONUtil.toJsonStr(result.getData())));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- // 4.根据消费机的消费模式验证余额,如果余额不足则返回
|
|
|
|
|
- result = checkOrigDeductionBag(bo, userAccountVo, useTermVo);
|
|
|
|
|
- if (R.isError(result)) {
|
|
|
|
|
- return result;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
}
|
|
}
|