| | |
| | | } |
| | | |
| | | /** |
| | | * 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") |