package com.ruoyi.admin.controller;
|
|
|
import com.ruoyi.admin.entity.Agreement;
|
import com.ruoyi.admin.service.AgreementService;
|
import com.ruoyi.common.core.domain.R;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
/**
|
* <p>
|
* 协议政策、司机操作指导 前端控制器
|
* </p>
|
*
|
* @author hjl
|
* @since 2024-05-29
|
*/
|
@RestController
|
@RequestMapping("/agreement")
|
@Api(tags = {"后台-隐私政策/司机操作指南"})
|
public class AgreementController {
|
|
@Resource
|
private AgreementService agreementService;
|
|
/**
|
* 根据类型获取注册协议、隐私政策、司机操作指南
|
*
|
* @param type 查询类型
|
*/
|
@ApiOperation(value = "根据类型获取注册协议、隐私政策、司机操作指南", tags = {"后台-隐私政策/司机操作指南"})
|
@GetMapping(value = "/dataInfo")
|
@ApiImplicitParams({
|
@ApiImplicitParam(value = "查询类型(0注册协议;1:隐私政策;2:司机操作指导)", name = "type", dataType = "Integer", required = true)
|
})
|
public R<Agreement> dataInfo(@RequestParam("type") Integer type) {
|
return agreementService.dataInfo(type);
|
}
|
|
/**
|
* 保存政策协议
|
*
|
* @param agreement 协议信息
|
*/
|
@ApiOperation(value = "保存政策协议", tags = {"后台-隐私政策/司机操作指南"})
|
@PostMapping(value = "/saveData")
|
public R<String> saveData(@RequestBody Agreement agreement) {
|
return agreementService.saveData(agreement);
|
}
|
|
}
|