| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(value = "根据类型获取注册协议、隐私政策、司机操作指南", tags = {"后台-隐私政策/司机操作指南"}) |
| | | @GetMapping(value = "/dataInfo") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "查询类型(0注册协议;1:隐私政策;2:司机操作指导)", name = "type", dataType = "Integer", required = true) |
| | | @ApiImplicitParam(value = "查询类型(0注册协议;1:隐私政策;2:司机操作指导;3:服务规则管理)", name = "type", dataType = "Integer", required = true) |
| | | }) |
| | | public R<Agreement> dataInfo(@RequestParam("type") Integer type) { |
| | | return agreementService.dataInfo(type); |
| | |
| | | return agreementService.saveData(agreement); |
| | | } |
| | | |
| | | /** |
| | | * 修改服务规则管理 |
| | | * |
| | | * @param agreement 修改服务规则管理 |
| | | */ |
| | | @RequiresPermissions(value = {"advantage_update", "operate_save"}, logical = Logical.OR) |
| | | @ApiOperation(value = "修改服务规则管理", tags = {"后台-修改服务规则管理[2.0]"}) |
| | | @PostMapping(value = "/updateAgree") |
| | | public R<String> updateAgree(@RequestBody Agreement agreement) { |
| | | if(Objects.isNull(agreement.getContentType()) || agreement.getContentType()!=3){ |
| | | return R.fail("服务规则管理类型异常"); |
| | | } |
| | | agreementService.updateById(agreement); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |