瀏覽代碼

fix: 提现记录详情接口Long溢出,改为String类型接收超长交易ID

skyline 1 天之前
父節點
當前提交
0984b28ec5

+ 1 - 1
car-wash-admin/src/main/java/com/kym/admin/controller/FinanceController.java

@@ -199,7 +199,7 @@ public class FinanceController {
 
     @SysLog("提现记录详情")
     @GetMapping("/withdrawnRecord/{id}")
-    public R<?> withdrawnRecordDetail(@PathVariable Long id) {
+    public R<?> withdrawnRecordDetail(@PathVariable String id) {
         return R.success(withdrawnRecordService.detail(id));
     }
 

+ 1 - 1
car-wash-service/src/main/java/com/kym/service/WithdrawnRecordService.java

@@ -19,7 +19,7 @@ public interface WithdrawnRecordService extends MyBaseService<WithdrawnRecord> {
 
     PageBean<WithdrawnRecordVo> listWithdrawnRecords(WithdrawnQueryParam params);
 
-    WithdrawnRecordVo detail(Long id);
+    WithdrawnRecordVo detail(String id);
 
     void reviewWithdrawn(WithdrawnQueryParam params);
 

+ 7 - 2
car-wash-service/src/main/java/com/kym/service/impl/WithdrawnRecordServiceImpl.java

@@ -38,8 +38,13 @@ public class WithdrawnRecordServiceImpl extends MyBaseServiceImpl<WithdrawnRecor
     }
 
     @Override
-    public WithdrawnRecordVo detail(Long id) {
-        var record = getById(id);
+    public WithdrawnRecordVo detail(String id) {
+        WithdrawnRecord record;
+        try {
+            record = getById(Long.valueOf(id));
+        } catch (NumberFormatException e) {
+            return null;
+        }
         if (record == null) {
             return null;
         }