From 13978ae9ed56ec816823c74589e4c6745f184dff Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期三, 25 二月 2026 17:18:23 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi

---
 xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementController.java |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementController.java b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementController.java
index 8c995c5..33be9d5 100644
--- a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementController.java
+++ b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAgreementController.java
@@ -1,19 +1,23 @@
 package com.xiaopeng.operation.controller;
 
+import com.xiaopeng.api.model.operation.XpAgreement;
 import com.xiaopeng.common.core.domain.R;
 import com.xiaopeng.common.core.web.controller.BaseController;
+import com.xiaopeng.operation.dto.XpAgreementDTO;
 import com.xiaopeng.operation.service.XpAgreementService;
 import com.xiaopeng.operation.vo.XpAgreementVo;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RestController;
+import org.apiguardian.api.API;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
 
+import javax.validation.Valid;
 import java.util.List;
 
 @Slf4j
+@Validated
 @RestController
 public class XpAgreementController extends BaseController {
 
@@ -43,4 +47,16 @@
     public R<XpAgreementVo> getAppContent(@ApiParam(name = "type", value = "类型 1=用户服务协议 2=平台隐私政策 ") @PathVariable Integer type) {
         return R.ok(xpAgreementService.getContentByType(type));
     }
+
+    @ApiOperation(value = "获取协议",tags = {"管理后台-内容中心"})
+    @GetMapping("/api/v1/agreement/content/{type}")
+    public R<XpAgreement> getAgreementContent(@ApiParam(name = "type", value = "类型 1=用户服务协议 2=平台隐私政策 3=敏感个人信息处理情况说明 4=向第三方提供个人信息情况的说明 5=乘车须知 6=计费规则说明 ") @PathVariable Integer type) {
+        return R.ok(xpAgreementService.getAgreementContent(type));
+    }
+    @ApiOperation(value = "保存协议",tags = {"管理后台-内容中心"})
+    @PostMapping("/api/v1/agreement/save")
+    public R<?> saveAgreement(@RequestBody @Valid XpAgreementDTO dto){
+        xpAgreementService.saveAgreement(dto);
+        return R.ok();
+    }
 }

--
Gitblit v1.7.1