diff --git a/route/group_power_r/group_power.go b/route/group_power_r/group_power.go index 027378e7dd66e93615a30d8cb99a5ebcda878edf..e55397bdf01fb77da0286548c08cf44ca8043817 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)