From 7a12a72f5a66ae39ef1debf1f120c4d960693705 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期六, 14 二月 2026 11:26:15 +0800
Subject: [PATCH] 小程序接口优化
---
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementUserController.java | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementUserController.java b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementUserController.java
index bcf0048..8c13e86 100644
--- a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementUserController.java
+++ b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementUserController.java
@@ -1,5 +1,7 @@
package com.xiaopeng.operation.controller;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.xiaopeng.api.model.maintenance.XpAgreementAppUser;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.web.controller.BaseController;
import com.xiaopeng.common.core.web.domain.AjaxResult;
@@ -43,5 +45,20 @@
}
+ /**
+ * 用户获取隐私协议/法律条款操作
+ */
+ @ApiOperation(value = "用户获取隐私协议/法律条款操作",tags = {"小程序-用户协议"})
+ @PostMapping("/privacy/getAgreement")
+ @XpClientCheck(checkToken = false, checkOtpToken = true)
+ public R<Boolean> getPrivacyAgreement(HttpServletRequest request) {
+ // uid已通过拦截器otp校验,可以直接使用
+ String uid = request.getHeader("XP-Uid");
+ long count = xpAgreementAppUserService.count(new LambdaQueryWrapper<XpAgreementAppUser>().eq(XpAgreementAppUser::getAppUserId, uid));
+ if (count > 0) {
+ return R.ok(true);
+ }
+ return R.ok(false);
+ }
}
--
Gitblit v1.7.1