From f88a4802f5ecc039dc0bfb12385b7539ff516bb8 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 15 一月 2025 10:12:48 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java          |   24 ++++++++++++++++++++++++
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java |    6 +++++-
 2 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
index 8ffd2ff..45a72c5 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
@@ -409,6 +409,30 @@
     }
 
     /**
+     * 门店登录使用
+     * @param username
+     * @return
+     */
+    @InnerAuth
+    @GetMapping("/infoShop/{username}")
+    public R<LoginUser> infoShop(@PathVariable("username") String username) {
+        SysUser sysUser = userService.selectUserByUserName(username);
+        if (StringUtils.isNull(sysUser)) {
+            return R.fail("用户名或密码错误");
+        }
+        // 角色集合
+        Set<String> roles = permissionService.getRolePermission(sysUser);
+        // 权限集合getRolePermission
+        Set<String> permissions = permissionService.getMenuPermission(sysUser);
+        LoginUser sysUserVo = new LoginUser();
+        sysUserVo.setSysUser(sysUser);
+        sysUserVo.setRoles(roles);
+        sysUserVo.setPermissions(permissions);
+
+        return R.ok(sysUserVo);
+    }
+
+    /**
      * 注册用户信息
      */
     @PostMapping("/register")
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java
index a0146b7..827270a 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserSignRecordController.java
@@ -111,7 +111,11 @@
         R<BigDecimal> bigDecimalR = systemConfigClient.redPackegeSet();
         userSignRecord.setRedAmount(bigDecimalR.getData());
         userSignRecord.setSignDay(LocalDate.now());
-
+        BigDecimal sum = appUser.getTotalRedPacketAmount().add(bigDecimalR.getData());
+        appUser.setTotalRedPacketAmount(sum);
+        BigDecimal sum2 = appUser.getBalance().add(bigDecimalR.getData());
+        appUser.setBalance(sum2);
+        appUserService.updateById(appUser);
         SignBackRDto signBackRDto = new SignBackRDto();
         signBackRDto.setPoint(userSignRecord.getPoint());
         signBackRDto.setRedAmount(userSignRecord.getRedAmount());

--
Gitblit v1.7.1