From 20b3b1a91bb9d7daf7bbf242b8f6aeae2be6b491 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期四, 21 十一月 2024 14:38:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/AgreementController.java |   41 +++++++++++++++++++++++++++++++----------
 1 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/AgreementController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/AgreementController.java
index 66cca28..d6d43c6 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/AgreementController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/AgreementController.java
@@ -1,20 +1,41 @@
 package com.ruoyi.other.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.other.api.model.Agreement;
+import com.ruoyi.other.service.IAgreementService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
 
 /**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author luodangjia
- * @since 2024-11-20
+ * @author zhibing.pu
+ * @Date 2024/11/21 10:48
  */
 @RestController
 @RequestMapping("/agreement")
 public class AgreementController {
-
+	
+	@Resource
+	private IAgreementService agreementService;
+	
+	
+	/**
+	 * 获取协议详情
+	 * @param type
+	 * @return
+	 */
+	@ResponseBody
+	@GetMapping("/getAgreement/{type}")
+	@ApiOperation(value = "获取协议", tags = {"小程序-登录注册"})
+	@ApiImplicitParams({
+			@ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=技师上门免责声明,4=注销协议,5门店提现免责声明)", name = "type", required = true, dataType = "int"),
+	})
+	public AjaxResult<String> getAgreement(@PathVariable("type") Integer type){
+		Agreement one = agreementService.getOne(new LambdaQueryWrapper<Agreement>().eq(Agreement::getType, type));
+		return AjaxResult.success(null == one ? "" : one.getContent());
+	}
 }
-

--
Gitblit v1.7.1