fix(backend): 订单列表 user_name 在 real_name 为空时回退 username
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -741,7 +741,11 @@ func (s *PayService) ListPurchases(shopID uint64, page, pageSize int, status str
|
||||
return nil, err
|
||||
}
|
||||
for _, u := range users {
|
||||
names[u.ID] = u.RealName
|
||||
if u.RealName != "" {
|
||||
names[u.ID] = u.RealName
|
||||
} else {
|
||||
names[u.ID] = u.Username
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user