无关风月
2025-03-21 6903c41af2520b23809ca90e9a211e738de2c224
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.ruoyi.management.controller;
 
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.management.domain.TProtocol;
import com.ruoyi.management.service.ITProtocolService;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * <p>
 * 协议 前端控制器
 * </p>
 *
 * @author 无关风月
 * @since 2024-04-26
 */
@RestController
@RequestMapping("/tProtocol")
public class TProtocolController {
 
    @Resource
    private ITProtocolService protocolService;
 
    /**
     * 用户协议/隐私协议/注销协议
     *
     * @param type 类型 1用户协议 2隐私协议 3注销协议
     */
    @GetMapping("/home")
    @ApiOperation(value = "用户协议/隐私协议/注销协议", tags = {"用户协议/隐私协议/注销协议"})
    public R<TProtocol> home(@RequestParam Integer type) {
        return R.ok(protocolService.lambdaQuery().eq(TProtocol::getType, type)
                .eq(TProtocol::getDisabled, 0).one());
    }
    @PostMapping("/home1")
    @ApiOperation(value = "用户协议/隐私协议/注销协议", tags = {"用户协议/隐私协议/注销协议"})
    public R<TProtocol> home1(@RequestParam Integer type) {
        return R.ok(protocolService.lambdaQuery().eq(TProtocol::getType, type)
                .eq(TProtocol::getDisabled, 0).one());
    }
 
}