mitao
2024-06-15 c2931dfdb47b766ea117f711913d4993c818dd6d
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/AgreementController.java
@@ -1,8 +1,14 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.domain.Agreement;
import com.ruoyi.system.service.IAgreementService;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
@@ -15,6 +21,14 @@
 */
@RestController
@RequestMapping("/agreement")
public class AgreementController {
public class AgreementController {
    @Resource
    private IAgreementService  iAgreementService;
    @RequestMapping("/getAgreement")
    @ResponseBody
    @ApiOperation(value = "获取用户协议/隐私协议")
    public R<Agreement> getAgreement(@PathVariable("agreementType") Integer agreementType) {
        return R.ok(iAgreementService.getAgreement(agreementType));
    }
}