|
@@ -442,14 +442,15 @@ public class CheckBusiness {
|
|
|
// 每天最大消费金额
|
|
// 每天最大消费金额
|
|
|
BigDecimal termDayMoney = termVo.getDayMoney() == null ? BigDecimal.ZERO : termVo.getDayMoney();
|
|
BigDecimal termDayMoney = termVo.getDayMoney() == null ? BigDecimal.ZERO : termVo.getDayMoney();
|
|
|
// 每餐最大消费次数
|
|
// 每餐最大消费次数
|
|
|
- Integer termmealCount = termVo.getMealCount() == null ? 0 : termVo.getMealCount();
|
|
|
|
|
|
|
+ Integer termMealCount = termVo.getMealCount() == null ? 0 : termVo.getMealCount();
|
|
|
// 单次最大消费金额
|
|
// 单次最大消费金额
|
|
|
- BigDecimal termSignleMoney = termVo.getSingleMoney() == null ? BigDecimal.ZERO : termVo.getSingleMoney();
|
|
|
|
|
|
|
+ BigDecimal termSingleMoney = termVo.getSingleMoney() == null ? BigDecimal.ZERO : termVo.getSingleMoney();
|
|
|
// 二次可用最大时间间隔
|
|
// 二次可用最大时间间隔
|
|
|
Integer termSwipeInterval = termVo.getSwipeInterval() == null ? 0 : termVo.getSwipeInterval();
|
|
Integer termSwipeInterval = termVo.getSwipeInterval() == null ? 0 : termVo.getSwipeInterval();
|
|
|
// 设备是否启用了卡有效
|
|
// 设备是否启用了卡有效
|
|
|
Boolean termUseValidity = Objects.equals(termVo.getTermValidity(), "0") ? Boolean.FALSE : Boolean.TRUE;
|
|
Boolean termUseValidity = Objects.equals(termVo.getTermValidity(), "0") ? Boolean.FALSE : Boolean.TRUE;
|
|
|
|
|
|
|
|
|
|
+ // 消费卡类限制验证
|
|
|
int offsetTypeId = (int) Math.pow(2, (cardTypeId - 1));
|
|
int offsetTypeId = (int) Math.pow(2, (cardTypeId - 1));
|
|
|
if ((offsetTypeId & termCardTypeId) != offsetTypeId) {
|
|
if ((offsetTypeId & termCardTypeId) != offsetTypeId) {
|
|
|
return R.fail(new ErrorInfo(400, ApiErrorTypeConstants.NOT_FOUND, "卡类限制", TradeStatusEnum.CardTypeLimit.getName()));
|
|
return R.fail(new ErrorInfo(400, ApiErrorTypeConstants.NOT_FOUND, "卡类限制", TradeStatusEnum.CardTypeLimit.getName()));
|