package com.community.huiju.controller;

import com.community.commom.mode.ResponseBean;
import com.community.huiju.model.TaAgreement;
import com.community.huiju.service.AgreementServicel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * version V1.0
 * class_name: $METHOD_NAME$
 * param: $METHOD_PARAM$
 * describe: TODO
 * creat_user:fannaixi
 * creat_time: 2018/10/22
 **/

@RestController
@RefreshScope
@RequestMapping("/")
@Api(value = "协议相关的API", description = "协议相关的API")
public class AgreementController {

    @Autowired
    private AgreementServicel agreementService;

    @ApiOperation(value = "获取所有协议", notes = "获取所有协议")
    @RequestMapping(value = "/agreement",method = RequestMethod.GET)
    public ResponseBean getAgreement(){
        ResponseBean responseBean = new ResponseBean();
        TaAgreement agreement = agreementService.getAgreement();
        responseBean.addSuccess(agreement);
        return responseBean;
    }


}
