| | |
| | | import com.ruoyi.system.service.IAgreementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | private IAgreementService iAgreementService; |
| | | |
| | | @RequestMapping(value = "/getAgreement/{agreementType}", method = RequestMethod.GET) |
| | | @ApiOperation(value = "获取用户协议/隐私协议") |
| | | public R<Agreement> getAgreement(@PathVariable("agreementType") Integer agreementType) { |
| | | @ApiOperation(value = "获取用户协议/隐私协议/竞拍说明") |
| | | public R<Agreement> getAgreement( |
| | | @ApiParam(name = "agreementType", value = "协议类型1:用户协议 2:隐私协议 3:竞拍说明") @PathVariable("agreementType") Integer agreementType) { |
| | | return R.ok(iAgreementService.getAgreement(agreementType)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("管理后台-获取协议列表") |
| | | @GetMapping("/list") |
| | | public R<List<AgreementDTO>> getAgreementList() { |
| | | List<Agreement> list = iAgreementService.lambdaQuery().last("limit 2").list(); |
| | | List<Agreement> list = iAgreementService.lambdaQuery().last("limit 3").list(); |
| | | return R.ok(BeanUtils.copyList(list, AgreementDTO.class)); |
| | | } |
| | | |