package com.ruoyi.web.app;

import com.ruoyi.bst.agreement.domain.AgreementQuery;
import com.ruoyi.bst.agreement.service.AgreementService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/app/agreement")
public class AppAgreementController extends BaseController {

    @Autowired
    private AgreementService agreementService;

    @ApiOperation("查询最新协议")
    @GetMapping("/latest")
    public AjaxResult getAgreement(AgreementQuery query) {
        return success(agreementService.selectLatest(query));
    }


}
