From c3811d01d1929a98a0f34f70ca187d82ee312dbb Mon Sep 17 00:00:00 2001
From: manailin <261030956@qq.com>
Date: 星期三, 03 十一月 2021 17:26:50 +0800
Subject: [PATCH] Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActWarehouseDonatesApi.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActWarehouseDonatesApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActWarehouseDonatesApi.java
index f7020ad..59c7517 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActWarehouseDonatesApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActWarehouseDonatesApi.java
@@ -75,10 +75,13 @@
     @ApiOperation(value = "新增物品捐赠")
     @PostMapping("/add")
     public R addDonates(@RequestBody @Validated(AddGroup.class) ComActWarehouseDonatesDTO comActWarehouseDonatesDTO) {
-        Long userId = getUserId();
-        comActWarehouseDonatesDTO.setCommunityId(getCommunityId());
+        LoginUserInfoVO loginUserInfo = getLoginUserInfo();
+        Long userId = loginUserInfo.getUserId();
+        comActWarehouseDonatesDTO.setCommunityId(loginUserInfo.getCommunityId());
         comActWarehouseDonatesDTO.setRegisterBy(userId);
         comActWarehouseDonatesDTO.setUserId(userId);
+        comActWarehouseDonatesDTO.setName(loginUserInfo.getName());
+        comActWarehouseDonatesDTO.setPhone(loginUserInfo.getPhone());
         return communityService.addDonates(comActWarehouseDonatesDTO);
     }
 
@@ -96,7 +99,7 @@
         if (isWhich.intValue() == 2 && loginUserInfo.getIsCommunityWorker().intValue() != 1) {
             return R.fail("非社区工作人员");
         }
-        Long userId = null;
+        Long userId = 0L;
         if (nonNull(loginUserInfo)) {
             userId = loginUserInfo.getUserId();
         }

--
Gitblit v1.7.1