From f88cfa02e36752e4acad7adc4b045155e8e50f21 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 08 十二月 2023 09:16:29 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai

---
 cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java
index 95d9604..7d92af3 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java
@@ -143,9 +143,12 @@
             if (null == appUserId) {
                 return ResultUtil.tokenErr();
             }
-            TAppGift one = appGiftService.getOne(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, appUserId));
-
-            return ResultUtil.success(one == null ? 0 : one.getNum());
+            Integer num = 0;
+            List<TAppGift> list = appGiftService.list(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, appUserId));
+            for (TAppGift tAppGift : list) {
+                num += tAppGift.getNum();
+            }
+            return ResultUtil.success(num);
         } catch (Exception e) {
             e.printStackTrace();
             return ResultUtil.runErr();
@@ -379,8 +382,6 @@
             }
 
             return ResultUtil.success(istuService.updateById(tStudent));
-
-//            return ResultUtil.success(istuService.commitEditStudentInfo(stu,userIdFormRedis));
         } catch (Exception e) {
             return ResultUtil.runErr();
         }

--
Gitblit v1.7.1