From 562699fa6d0c279fe0f4f81ce87c336a34a3fb91 Mon Sep 17 00:00:00 2001
From: hjl <1657978663@qq.com>
Date: 星期二, 23 七月 2024 14:32:23 +0800
Subject: [PATCH] feat: 数据迁移;netty通信;bug修改

---
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/AgreementController.java |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/AgreementController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/AgreementController.java
index 66a53fb..0a747a1 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/AgreementController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/AgreementController.java
@@ -3,6 +3,7 @@
 
 import com.ruoyi.admin.entity.Agreement;
 import com.ruoyi.admin.service.AgreementService;
+import com.ruoyi.common.core.constant.Constants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.security.annotation.Logical;
 import com.ruoyi.common.security.annotation.RequiresPermissions;
@@ -35,6 +36,7 @@
      *
      * @param type 查询类型
      */
+    @RequiresPermissions(value = {"system_agreement", "system_operate"}, logical = Logical.OR)
     @ApiOperation(value = "根据类型获取注册协议、隐私政策、司机操作指南", tags = {"后台-隐私政策/司机操作指南"})
     @GetMapping(value = "/dataInfo")
     @ApiImplicitParams({
@@ -45,11 +47,30 @@
     }
 
     /**
+     * 获取司机操作指南
+     */
+    @GetMapping(value = "/operate")
+    public R<Agreement> operate() {
+        return agreementService.dataInfo(Constants.TWO);
+    }
+
+    /**
+     * 根据类型获取注册协议、隐私政策
+     * -- 用户端远程调用
+     *
+     * @param type 查询类型
+     */
+    @GetMapping(value = "/agreementPolicy")
+    public R<Agreement> agreementPolicy(@RequestParam("type") Integer type) {
+        return agreementService.dataInfo(type);
+    }
+
+    /**
      * 保存政策协议
      *
      * @param agreement 协议信息
      */
-    @RequiresPermissions(value = {"system_agreement", "system_operate"}, logical = Logical.OR)
+    @RequiresPermissions(value = {"advantage_update", "operate_save"}, logical = Logical.OR)
     @ApiOperation(value = "保存政策协议", tags = {"后台-隐私政策/司机操作指南"})
     @PostMapping(value = "/saveData")
     public R<String> saveData(@RequestBody Agreement agreement) {

--
Gitblit v1.7.1