From 0ebdfd97b5400c864584147bd72a0de768172d6e Mon Sep 17 00:00:00 2001
From: dd <gitluke@outlook.com>
Date: Tue, 27 Jan 2026 10:19:48 +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