| | |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | /** Deliberately narrow, auditable unmasking capability for the admin account. */ |
| | | /** |
| | | * 超级管理员敏感信息查询接口。 |
| | | * |
| | | * <p>仅提供范围明确、可审计的敏感信息明文查询能力。</p> |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/system/sensitive") |
| | | public class SensitiveDataController { |
| | |
| | | @Resource private RefereeClient refereeClient; |
| | | @Resource private TOperatorService operatorService; |
| | | |
| | | /** |
| | | * 查询 APP 用户的敏感信息。 |
| | | * |
| | | * @param id APP 用户 ID |
| | | * @return 用户基本信息及敏感字段;用户不存在时返回 {@code null} |
| | | */ |
| | | @GetMapping("/app-user/{id}") |
| | | public Map<String, Object> appUser(@PathVariable Integer id) { |
| | | assertAdmin(); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询后台员工的敏感信息。 |
| | | * |
| | | * @param id 员工用户 ID |
| | | * @return 员工基本信息及敏感字段;员工不存在时返回 {@code null} |
| | | */ |
| | | @GetMapping("/employee/{id}") |
| | | public Map<String, Object> employee(@PathVariable Integer id) { |
| | | assertAdmin(); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询学员的敏感信息。 |
| | | * |
| | | * @param id 学员 ID |
| | | * @return 学员基本信息及敏感字段;学员不存在时返回 {@code null} |
| | | */ |
| | | @GetMapping("/student/{id}") |
| | | public Map<String, Object> student(@PathVariable Integer id) { |
| | | assertAdmin(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 预约管理查看关联预约人的敏感信息。 |
| | | * 根据预约记录查询关联预约人的敏感信息。 |
| | | * |
| | | * <p>仅通过预约记录定位用户,避免前端以任意用户 ID 查询;该接口保留在 |
| | | * /system/sensitive 路径下,以使用全局的脱敏豁免和网关放行策略。</p> |
| | | * |
| | | * @param bookingId 预约记录 ID |
| | | * @return 预约关联用户的基本信息及敏感字段;预约或用户不存在时返回 {@code null} |
| | | */ |
| | | @GetMapping("/booking/{bookingId}") |
| | | public Map<String, Object> booking(@PathVariable Integer bookingId) { |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询教练的敏感信息。 |
| | | * |
| | | * @param id 教练 ID |
| | | * @return 教练基本信息及敏感字段;教练不存在时返回 {@code null} |
| | | */ |
| | | @GetMapping("/coach/{id}") |
| | | public Map<String, Object> coach(@PathVariable Integer id) { |
| | | assertAdmin(); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询裁判的敏感信息。 |
| | | * |
| | | * @param id 裁判 ID |
| | | * @return 裁判基本信息及敏感字段;裁判不存在时返回 {@code null} |
| | | */ |
| | | @GetMapping("/referee/{id}") |
| | | public Map<String, Object> referee(@PathVariable Integer id) { |
| | | assertAdmin(); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询运营商关联员工的敏感信息。 |
| | | * |
| | | * @param id 运营商 ID |
| | | * @return 关联员工的基本信息及敏感字段;运营商或员工不存在时返回 {@code null} |
| | | */ |
| | | @GetMapping("/operator/{id}") |
| | | public Map<String, Object> operator(@PathVariable Integer id) { |
| | | assertAdmin(); |