diff --git a/cv/user_cv/user.go b/cv/user_cv/user.go index 3a2762d5e891589d5e17e4713c602bc90c4e12ca..743f167edba08589fe0e757ce8a5c9396574d851 100644 --- a/cv/user_cv/user.go +++ b/cv/user_cv/user.go @@ -71,6 +71,7 @@ type CvUserDetail struct { type GroupPower struct { Id uint64 `json:"id"` // 群主所在的势力ID + Icon string `json:"icon"` // 家族头像 Name string `json:"name"` // 群主所在的势力的名称 Nameplate string `json:"nameplate"` // 势力铭牌 Grade groupPower_e.GroupPowerGrade `json:"grade"` // 等级 @@ -564,6 +565,7 @@ func userToDetail(user *user_m.User, myUserId mysql.ID, userTradeUnion *user_m.U cvUserDetail.MyGroupPowerName = powerNames[user.ID] cvUserDetail.GroupPower = GroupPower{ Id: groupPowerInfos[user.ID].ID, + Icon: groupPowerInfos[user.ID].Icon, Name: groupPowerInfos[user.ID].Name, Nameplate: groupPowerInfos[user.ID].Nameplate, Grade: powerGrades[user.ID].Grade, @@ -843,14 +845,14 @@ func GetUserDetail(model *domain.Model, userId mysql.ID, myUserId mysql.ID) (*Cv return userToDetailOne(model, &user, myUserId, userTradeUnion, likeN > 0, likeMe > 0, rel, isVip, expireTime, svip, headwear, ride, wealthUserScore.Grade, charmUserScore.Grade, - activityUserScore.Grade, medals[userId], medalInfo[userId], rooms[userId], powers[userId], powerNames[userId], groupPowerInfos[groupPowerId].Nameplate, groupPowerGrades[groupPowerId], groupPowerMembers, + activityUserScore.Grade, medals[userId], medalInfo[userId], rooms[userId], powers[userId], powerNames[userId], groupPowerInfos[groupPowerId], groupPowerGrades[groupPowerId], groupPowerMembers, noble, superManagerMap[userId], myGroups, phoneInfo, thirdList, cvCountryManager) } // 单用户版,简化参数 func userToDetailOne(model *domain.Model, user *user_m.User, myUserId mysql.ID, userTradeUnion *user_m.UserTradeUnion, isLike bool, likeMe bool, hvMap map[mysql.ID]Relation, isVip bool, vipExpireTime *int64, svip rpc.CvSvip, headwear *headwear_cv.CvHeadwear, ride property_cv.CvProperty, wealthGrade uint32, charmGrade uint32, activityGrade uint32, - medals []uint32, medalInfo []medal_cv.CvMedal, room string, power uint64, powerName string, powerNameplate string, grade groupPower_m.GroupPowerGrade, members [2]int, noble *noble_m.UserNoble, isOfficialStaff bool, + medals []uint32, medalInfo []medal_cv.CvMedal, room string, power uint64, powerName string, powerInfo groupPower_m.GroupPowerInfo, grade groupPower_m.GroupPowerGrade, members [2]int, noble *noble_m.UserNoble, isOfficialStaff bool, myGroups []group_m.GroupInfo, phoneInfo *user_m.UserPhoneInfo, thirdList []int8, countryManager *country_cv.CVCountryManager) (*CvUserDetail, error) { room, err := group_m.ToTxGroupId(model, room) @@ -893,7 +895,8 @@ func userToDetailOne(model *domain.Model, user *user_m.User, myUserId mysql.ID, GroupPower: GroupPower{ Id: power, Name: powerName, - Nameplate: powerNameplate, + Icon: powerInfo.Icon, + Nameplate: powerInfo.Nameplate, Grade: grade.Grade, MemberNum: mysql.Num(members[0]), MemberMax: mysql.Num(members[1]),