|  |  | 
 |  |  | package com.doumee.api.business; | 
 |  |  |  | 
 |  |  | import com.doumee.api.BaseController; | 
 |  |  | import com.doumee.core.annotation.LoginRequired; | 
 |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
 |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
 |  |  | import com.doumee.core.constants.Constants; | 
 |  |  | import com.doumee.core.model.ApiResponse; | 
 |  |  | import com.doumee.core.model.PageWrap; | 
 |  |  | import com.doumee.core.model.PageData; | 
 |  |  | import com.doumee.dao.business.model.BaseParam; | 
 |  |  | import com.doumee.service.business.BaseParamService; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiImplicitParam; | 
 |  |  | import io.swagger.annotations.ApiImplicitParams; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions;     | 
 |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.validation.annotation.Validated; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  | import javax.servlet.http.HttpServletResponse; | 
 |  |  |  | 
 |  |  | 
 |  |  |     @ApiOperation("新建") | 
 |  |  |     @PostMapping("/create") | 
 |  |  |     @RequiresPermissions("business:baseparam:create") | 
 |  |  |     public ApiResponse create(@RequestBody BaseParam baseParam) { | 
 |  |  |     public ApiResponse create(@RequestBody  BaseParam baseParam) { | 
 |  |  |         return ApiResponse.success(baseParamService.create(baseParam)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     public ApiResponse findById(@PathVariable String id) { | 
 |  |  |         return ApiResponse.success(baseParamService.findById(id)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("基础配置数据") | 
 |  |  |     @GetMapping("/baseParamList") | 
 |  |  |     @ApiImplicitParams({ | 
 |  |  |             @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "类型 0车辆报修原因 1强制还车原因 2时长减免原因 3单车类型", required = true) | 
 |  |  |     }) | 
 |  |  |     public ApiResponse<List<BaseParam>> baseParamList (@RequestParam Integer type) { | 
 |  |  |         BaseParam baseParam = new BaseParam(); | 
 |  |  |         baseParam.setIsdeleted(Constants.ZERO); | 
 |  |  |         baseParam.setStatus(Constants.ZERO); | 
 |  |  |         baseParam.setType(type); | 
 |  |  |         return ApiResponse.success(baseParamService.findList(baseParam)); | 
 |  |  |     } | 
 |  |  | } |