From 4687e36631bb949bf9fe68f36628781c7e7aafca Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Fri, 06 Feb 2026 14:27:57 +0800
Subject: [PATCH] 1

---
 src/main/java/com/nq/controller/protol/UserController.java |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/nq/controller/protol/UserController.java b/src/main/java/com/nq/controller/protol/UserController.java
index 1b6461a..bc5b9b3 100644
--- a/src/main/java/com/nq/controller/protol/UserController.java
+++ b/src/main/java/com/nq/controller/protol/UserController.java
@@ -356,10 +356,14 @@
     @ResponseBody
     public ServerResponse transfer(@RequestParam("fromType") String fromType, @RequestParam("toType") String toType,
                                    @RequestParam("amt") String amt,  HttpServletRequest request) {
-        if (fromType.equals(toType)) {
-            return ServerResponse.createByErrorMsg("货币类型不能相同", request);
+        try {
+            if (fromType.equals(toType)) {
+                return ServerResponse.createByErrorMsg("货币类型不能相同", request);
+            }
+            return  iUserService.transfer(fromType, toType, amt,request);
+        } catch (Exception e) {
+            return ServerResponse.createByErrorMsg(e.getMessage());
         }
-        return  iUserService.transfer(fromType, toType, amt,request);
     }
 
 

--
Gitblit v1.9.3