mitao
2024-09-07 2862c3e4da3adbb4bea43151514f0c43b86476d6
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
package com.xinquan.system.controller.client;
 
import com.xinquan.common.core.domain.R;
import com.xinquan.system.domain.vo.ContentSettingVO;
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 R<ContentSettingVO> getContent(
            @RequestParam(value = "key", required = true) Integer key) {
        return R.ok(publicService.getContent(key));
    }
}