Explorar el Código

Merge remote-tracking branch 'origin/master'

xiari hace 1 año
padre
commit
423dc48d5c

+ 2 - 1
ruoyi-modules/ruoyi-backstage/src/main/java/org/dromara/backstage/business/payments/PayOrderBusiness.java

@@ -204,7 +204,7 @@ public class PayOrderBusiness {
                 return R.fail(result.getMsg());
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("充值失败",e);
             return R.fail(e.getMessage());
         }
     }
@@ -232,6 +232,7 @@ public class PayOrderBusiness {
                 return R.fail(result.getMsg(),boCopy);
             }
         } catch (Exception e) {
+            log.error("退款失败",e);
             return R.fail(e.getMessage(),boCopy);
         }
     }

+ 3 - 3
ruoyi-server/ruoyi-server-base/src/main/java/org/dromara/server/base/service/yktOperation/SyncRemotePtCardCenterService.java

@@ -57,7 +57,7 @@ public class SyncRemotePtCardCenterService {
     public void batchRecharge(Object msg) throws ServiceException{
         JSONObject msgObj = JSONUtil.parseObj(msg);
         RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
-        Long[] userIds = (Long[]) msgObj.get("userIds");
+        Long[] userIds = msgObj.getJSONArray("userIds").toArray(new Long[0]);
         boolean flag = bagService.batchRecharge(bo, userIds);
         if (!flag){
             throw new ServiceException("批量充值失败");
@@ -70,7 +70,7 @@ public class SyncRemotePtCardCenterService {
     public void batchRefund(Object msg) throws ServiceException{
         JSONObject msgObj = JSONUtil.parseObj(msg);
         RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
-        Long[] userIds = (Long[]) msgObj.get("userIds");
+        Long[] userIds =  msgObj.getJSONArray("userIds").toArray(new Long[0]);
         boolean flag = bagService.batchRefund(bo, userIds);
         if (!flag){
             throw new ServiceException("批量退款失败");
@@ -83,7 +83,7 @@ public class SyncRemotePtCardCenterService {
     public void batchSetBalance(Object msg) throws ServiceException{
         JSONObject msgObj = JSONUtil.parseObj(msg);
         RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
-        Long[] userIds = (Long[]) msgObj.get("userIds");
+        Long[] userIds =  msgObj.getJSONArray("userIds").toArray(new Long[0]);
         boolean flag = bagService.batchSetBalance(bo, userIds);
         if (!flag){
             throw new ServiceException("批量设置余额失败");

+ 3 - 2
ruoyi-server/ruoyi-server-consume/src/main/java/org/dromara/server/consume/business/CheckBusiness.java

@@ -442,14 +442,15 @@ public class CheckBusiness {
         // 每天最大消费金额
         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();
         // 设备是否启用了卡有效
         Boolean termUseValidity = Objects.equals(termVo.getTermValidity(), "0") ? Boolean.FALSE : Boolean.TRUE;
 
+        // 消费卡类限制验证
         int offsetTypeId = (int) Math.pow(2, (cardTypeId - 1));
         if ((offsetTypeId & termCardTypeId) != offsetTypeId) {
             return R.fail(new ErrorInfo(400, ApiErrorTypeConstants.NOT_FOUND, "卡类限制", TradeStatusEnum.CardTypeLimit.getName()));