feat(admin-order): 订单列表展示完整用户手机号便于客服定位
- backend: AdminOrderListItemDTO 不再脱敏 owner_phone/renter_phone,移除 order 包内已无用的 maskPhone - frontend: 同步 AdminOrderListItem 类型注释 - tests: 更新后台列表用例为断言完整手机号,并继续校验不泄露账号快照
This commit is contained in:
@@ -72,7 +72,7 @@ func TestUserOrderListItemDoesNotSerializeDetailFields(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAdminOrderListItemMasksPhonesAndOmitsSnapshot(t *testing.T) {
|
||||
func TestAdminOrderListItemShowsPhonesAndOmitsSnapshot(t *testing.T) {
|
||||
row := orderRow{
|
||||
RentalOrder: model.RentalOrder{ID: 1, OrderNo: "ORD-001", Status: orderStatusPendingPayment},
|
||||
OwnerPhone: "13800001234",
|
||||
@@ -83,8 +83,11 @@ func TestAdminOrderListItemMasksPhonesAndOmitsSnapshot(t *testing.T) {
|
||||
t.Fatalf("Marshal() error = %v", err)
|
||||
}
|
||||
text := string(raw)
|
||||
if strings.Contains(text, "13800001234") || strings.Contains(text, "13900005678") {
|
||||
t.Fatalf("list response contains full phone number: %s", text)
|
||||
// 后台订单列表需要展示完整手机号,方便客服定位用户。
|
||||
for _, phone := range []string{"13800001234", "13900005678"} {
|
||||
if !strings.Contains(text, phone) {
|
||||
t.Fatalf("list response should contain full phone %q: %s", phone, text)
|
||||
}
|
||||
}
|
||||
if strings.Contains(text, "account_snapshot") {
|
||||
t.Fatalf("list response contains account snapshot: %s", text)
|
||||
|
||||
Reference in New Issue
Block a user