mitao
2024-08-24 403fbe8fa8d3df96d692ad41ffa1c300b0db5493
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
package com.xinquan.system.controller.client;
 
import com.xinquan.common.core.web.domain.AjaxResult;
import com.xinquan.system.service.PublicService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @author mitao
 * @date 2024/8/23
 */
@Slf4j
@Api(tags = {"公共接口"})
@RestController
@RequestMapping("/public")
@RequiredArgsConstructor
public class PublicController {
 
    private final PublicService publicService;
 
    @ApiOperation(value = "获取用户协议、隐私协议、关于心泉、新手冥想指南、课程/冥想音频购买协议")
    @GetMapping("/getContent")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "key", value = "用户内容 1=用户协议 2=隐私协议 3=关于心泉 4=新手冥想指南 5=课程/冥想音频购买协议",
                    required = true, type = "Integer", paramType = "query")})
    public AjaxResult getContent(
            @RequestParam(value = "key", required = true) Integer key) {
        return AjaxResult.success(publicService.getContent(key));
    }
}