From 74df9aed480f07dd184fcd99bf3a1782297bbee8 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Wed, 15 Mar 2023 17:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B6=E6=97=8F=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- route/group_power_r/group_power.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/route/group_power_r/group_power.go b/route/group_power_r/group_power.go index 027378e..e55397b 100644 --- a/route/group_power_r/group_power.go +++ b/route/group_power_r/group_power.go @@ -1091,7 +1091,11 @@ func GroupPowerApplyList(c *gin.Context) (*mycontext.MyContext, error) { result := make([]*group_power_cv.FamilyApplyList, 0, len(rows)) for _, v := range rows { - result = append(result, &group_power_cv.FamilyApplyList{User: userMap[v.UserId], Time: v.CreatedTime, Status: v.IsAccept, MgrName: userMap[v.MgrId].Nick}) + info := &group_power_cv.FamilyApplyList{User: userMap[v.UserId], Time: v.CreatedTime, Status: v.IsAccept} + if v.MgrId > 0 { + info.MgrName = userMap[v.MgrId].Nick + } + result = append(result, info) } resp.ResponsePageBaseOk(c, result, nextPageIndex, hasNextPage) -- 2.22.0