From a3bfafde009c644c21ee8c9971b436f4cd7481f1 Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期日, 20 九月 2026 11:59:29 +0800
Subject: [PATCH] feat:手机号隐私问题

---
 cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java
index 279e705..d8b3fbe 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/controller/AppUserController.java
@@ -269,6 +269,24 @@
     }
 
     /**
+     * Internal data source used when an APP booking submits its displayed,
+     * masked phone number.  Limit the response to the single field needed for
+     * that booking; callers must use the internal sensitive-data header.
+     */
+    @PostMapping("/internal/sensitive/site-booking/app-user/{id}/phone")
+    public Map<String, Object> siteBookingPhone(@PathVariable("id") Integer id,
+                                                @RequestHeader(value = "X-Internal-Sensitive-Access", required = false) String access) {
+        if (!"true".equalsIgnoreCase(access)) {
+            throw new IllegalStateException("Sensitive data access is restricted to site booking");
+        }
+        TAppUser user = appUserService.getById(id);
+        if (user == null) return null;
+        Map<String, Object> result = new java.util.HashMap<String, Object>();
+        result.put("phone", user.getPhone());
+        return result;
+    }
+
+    /**
      * 冻结/解冻 1=解冻 2=冻结
      */
     @RequestMapping("/base/appUser/changeState")

--
Gitblit v1.7.1