liujie
2026-02-25 e52476e839be9d60f2e7aea3f56cb3974ca1e359
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.xiaopeng.operation.controller;
 
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.web.controller.BaseController;
import com.xiaopeng.operation.service.XpAgreementService;
import com.xiaopeng.operation.vo.XpAgreementVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
@Slf4j
@RestController
public class XpAgreementController extends BaseController {
 
    private final XpAgreementService xpAgreementService;
 
    public XpAgreementController(XpAgreementService xpAgreementService) {
        this.xpAgreementService = xpAgreementService;
    }
 
    @ApiOperation(value = "获取协议",tags = {"小程序-首页"},response = XpAgreementVo.class)
    @GetMapping("/base/v1/mini-program/privacy/content/{type}")
    public R<XpAgreementVo> getContent(@PathVariable Integer type) {
        return R.ok(xpAgreementService.getContentByType(type));
    }
 
 
    @ApiOperation(value = "获取协议所有",tags = {"小程序-首页所有"},response = XpAgreementVo.class)
    @GetMapping("/base/v1/mini-program/privacy/contentAll")
    public R<List<XpAgreementVo>> contentAll() {
        return R.ok(xpAgreementService.getContentByTypeAll());
    }
 
 
 
    @ApiOperation(value = "获取协议/隐私政策",tags = {"运维APP-个人中心"},response = XpAgreementVo.class)
    @GetMapping("/base/v1/privacy/content/{type}")
    public R<XpAgreementVo> getAppContent(@ApiParam(name = "type", value = "类型 1=用户服务协议 2=平台隐私政策 ") @PathVariable Integer type) {
        return R.ok(xpAgreementService.getContentByType(type));
    }
}