Quellcode durchsuchen

增加错误日志

baiyun vor 1 Jahr
Ursprung
Commit
4f4de3c2f3

+ 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());
                 return R.fail(result.getMsg());
             }
             }
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("充值失败",e);
             return R.fail(e.getMessage());
             return R.fail(e.getMessage());
         }
         }
     }
     }
@@ -232,6 +232,7 @@ public class PayOrderBusiness {
                 return R.fail(result.getMsg(),boCopy);
                 return R.fail(result.getMsg(),boCopy);
             }
             }
         } catch (Exception e) {
         } catch (Exception e) {
+            log.error("退款失败",e);
             return R.fail(e.getMessage(),boCopy);
             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{
     public void batchRecharge(Object msg) throws ServiceException{
         JSONObject msgObj = JSONUtil.parseObj(msg);
         JSONObject msgObj = JSONUtil.parseObj(msg);
         RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
         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);
         boolean flag = bagService.batchRecharge(bo, userIds);
         if (!flag){
         if (!flag){
             throw new ServiceException("批量充值失败");
             throw new ServiceException("批量充值失败");
@@ -70,7 +70,7 @@ public class SyncRemotePtCardCenterService {
     public void batchRefund(Object msg) throws ServiceException{
     public void batchRefund(Object msg) throws ServiceException{
         JSONObject msgObj = JSONUtil.parseObj(msg);
         JSONObject msgObj = JSONUtil.parseObj(msg);
         RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
         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);
         boolean flag = bagService.batchRefund(bo, userIds);
         if (!flag){
         if (!flag){
             throw new ServiceException("批量退款失败");
             throw new ServiceException("批量退款失败");
@@ -83,7 +83,7 @@ public class SyncRemotePtCardCenterService {
     public void batchSetBalance(Object msg) throws ServiceException{
     public void batchSetBalance(Object msg) throws ServiceException{
         JSONObject msgObj = JSONUtil.parseObj(msg);
         JSONObject msgObj = JSONUtil.parseObj(msg);
         RemotePurseInOutBo bo = msgObj.getJSONObject("bo").toBean(RemotePurseInOutBo.class);
         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);
         boolean flag = bagService.batchSetBalance(bo, userIds);
         if (!flag){
         if (!flag){
             throw new ServiceException("批量设置余额失败");
             throw new ServiceException("批量设置余额失败");