package com.stylefeng.guns.modular.api;
|
|
import com.stylefeng.guns.modular.system.service.IAgreementService;
|
import com.stylefeng.guns.modular.system.util.ResultUtil;
|
import com.stylefeng.guns.modular.system.warpper.BaseWarpper;
|
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.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* 协议控制器
|
*/
|
@Api
|
@RestController
|
@RequestMapping("/base/agreement")
|
public class AgreementController {
|
|
@Autowired
|
private IAgreementService agreementService;
|
|
|
/**
|
* 获取各种协议
|
* @param type
|
* @return
|
*/
|
@ResponseBody
|
@PostMapping("/queryByType")
|
@ApiOperation(value = "获取各种协议及H5页面", tags = {"司机端-个人中心"}, notes = "")
|
@ApiImplicitParams({
|
@ApiImplicitParam(value = "数据类型(1:隐私协议,2:用户协议,3:用户指南,4:法律条款,5:关于我们,6=注册协议,7=取消订单说明,8=充值领券规则设置)", name = "type", required = true, dataType = "int")
|
})
|
public ResultUtil<BaseWarpper> queryByType(Integer type){
|
try {
|
String s = agreementService.queryByType(type);
|
BaseWarpper baseWarpper = new BaseWarpper();
|
baseWarpper.setContent(s);
|
return ResultUtil.success(baseWarpper);
|
}catch (Exception e){
|
e.printStackTrace();
|
return ResultUtil.runErr();
|
}
|
}
|
}
|