package com.xiaopeng.operation.controller;
|
|
import com.xiaopeng.common.core.domain.R;
|
import com.xiaopeng.common.core.web.controller.BaseController;
|
import com.xiaopeng.common.core.web.domain.AjaxResult;
|
import com.xiaopeng.operation.service.XpAgreementService;
|
import com.xiaopeng.operation.vo.XpAgreementVo;
|
import com.xiaopeng.operation.vo.XpBannerListVo;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
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.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
@Slf4j
|
@RestController
|
@RequestMapping("/base/v1/mini-program")
|
@Api(tags = "协议模块")
|
public class XpAgreementController extends BaseController {
|
|
private final XpAgreementService xpAgreementService;
|
|
public XpAgreementController(XpAgreementService xpAgreementService) {
|
this.xpAgreementService = xpAgreementService;
|
}
|
|
@ApiOperation(value = "获取协议",tags = {"小程序-首页"},response = XpAgreementVo.class)
|
@GetMapping("/privacy/content/{type}")
|
public R<XpAgreementVo> getContent(@PathVariable Integer type) {
|
return R.ok(xpAgreementService.getContentByType(type));
|
}
|
|
|
|
|
}
|