Browse Source

swagger修改注释

develop
lau572 11 months ago
parent
commit
2033efc7ce
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
  2. 2
      zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java
  3. 20
      zc-business/src/main/java/com/zc/business/controller/DcFacilityController.java
  4. 20
      zc-business/src/main/java/com/zc/business/controller/DcProductController.java
  5. 20
      zc-business/src/main/java/com/zc/business/controller/DcRoadController.java
  6. 20
      zc-business/src/main/java/com/zc/business/controller/DcStakeMarkController.java

4
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java

@ -112,9 +112,9 @@ public class SwaggerConfig
// 用ApiInfoBuilder进行定制 // 用ApiInfoBuilder进行定制
return new ApiInfoBuilder() return new ApiInfoBuilder()
// 设置标题 // 设置标题
.title("标题:XX平台_接口文档") .title("业务平台_接口文档")
// 描述 // 描述
.description("描述:用于XX平台数据接口信息,具体包括XXX,XXX模块...") .description("描述:用于业务平台数据接口信息,具体包括XXX,XXX模块...")
// 作者信息 // 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null)) .contact(new Contact(ruoyiConfig.getName(), null, null))
// 版本 // 版本

2
zc-business/src/main/java/com/zc/business/controller/DcDeviceController.java

@ -32,7 +32,7 @@ import java.util.List;
* *
* @author zhaoxianglong * @author zhaoxianglong
*/ */
@Api("设备") @Api(tags = {"设备"})
@RestController @RestController
@RequestMapping("/business/device") @RequestMapping("/business/device")
public class DcDeviceController extends BaseController { public class DcDeviceController extends BaseController {

20
zc-business/src/main/java/com/zc/business/controller/DcFacilityController.java

@ -21,22 +21,22 @@ import java.util.List;
* *
* @author zhaoxianglong * @author zhaoxianglong
*/ */
@Api("路网设施") @Api(tags = {"路网设施"})
@RestController @RestController
@RequestMapping("/business/facility") @RequestMapping("/business/facility")
public class DcFacilityController extends BaseController { public class DcFacilityController extends BaseController {
@Resource @Resource
private IDcFacilityService dcFacilityService; private IDcFacilityService dcFacilityService;
//*********************************设备增删改查****************************************** //*********************************路网设施增删改查******************************************
/** /**
* 分页查询设备列表 * 分页查询路网设施列表
* *
* @param dcFacility 请求参数 * @param dcFacility 请求参数
* @return 分页查询结果 * @return 分页查询结果
*/ */
@ApiOperation("分页查询设备列表") @ApiOperation("分页查询路网设施列表")
@PreAuthorize("@ss.hasPermi('iot:facility:list')") @PreAuthorize("@ss.hasPermi('iot:facility:list')")
@GetMapping("list") @GetMapping("list")
public TableDataInfo listFacility(DcFacility dcFacility) { public TableDataInfo listFacility(DcFacility dcFacility) {
@ -44,12 +44,12 @@ public class DcFacilityController extends BaseController {
} }
/** /**
* 无分页查询设备列表 * 无分页查询路网设施列表
* *
* @param dcFacility 请求参数 * @param dcFacility 请求参数
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("无分页查询设备列表") @ApiOperation("无分页查询路网设施列表")
@PreAuthorize("@ss.hasPermi('iot:facility:query')") @PreAuthorize("@ss.hasPermi('iot:facility:query')")
@GetMapping("query") @GetMapping("query")
public AjaxResult queryFacility(DcFacility dcFacility) { public AjaxResult queryFacility(DcFacility dcFacility) {
@ -57,12 +57,12 @@ public class DcFacilityController extends BaseController {
} }
/** /**
* 根据id查询设备信息 * 根据id查询路网设施信息
* *
* @param id id * @param id id
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("根据id查询设备信息") @ApiOperation("根据id查询路网设施信息")
@PreAuthorize("@ss.hasPermi('iot:facility:query')") @PreAuthorize("@ss.hasPermi('iot:facility:query')")
@GetMapping("{id}") @GetMapping("{id}")
public AjaxResult getFacility(@PathVariable String id) { public AjaxResult getFacility(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcFacilityController extends BaseController {
*/ */
@ApiOperation("新增") @ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:facility:add')") @PreAuthorize("@ss.hasPermi('iot:facility:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT) @Log(title = "新增路网设施", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult addFacility(@Valid @RequestBody DcFacility dcFacility) { public AjaxResult addFacility(@Valid @RequestBody DcFacility dcFacility) {
return toAjax(dcFacilityService.addFacility(dcFacility)); return toAjax(dcFacilityService.addFacility(dcFacility));
@ -92,7 +92,7 @@ public class DcFacilityController extends BaseController {
*/ */
@ApiOperation("修改") @ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:facility:edit')") @PreAuthorize("@ss.hasPermi('iot:facility:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE) @Log(title = "修改路网设施", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult editFacility(@Valid @RequestBody DcFacility dcFacility) { public AjaxResult editFacility(@Valid @RequestBody DcFacility dcFacility) {
return toAjax(dcFacilityService.editFacility(dcFacility)); return toAjax(dcFacilityService.editFacility(dcFacility));

20
zc-business/src/main/java/com/zc/business/controller/DcProductController.java

@ -21,22 +21,22 @@ import java.util.List;
* *
* @author zhaoxianglong * @author zhaoxianglong
*/ */
@Api("产品") @Api(tags = {"产品"})
@RestController @RestController
@RequestMapping("/business/product") @RequestMapping("/business/product")
public class DcProductController extends BaseController { public class DcProductController extends BaseController {
@Resource @Resource
private IDcProductService dcProdurtService; private IDcProductService dcProdurtService;
//*********************************设备增删改查****************************************** //*********************************产品增删改查******************************************
/** /**
* 分页查询设备列表 * 分页查询产品列表
* *
* @param dcProduct 请求参数 * @param dcProduct 请求参数
* @return 分页查询结果 * @return 分页查询结果
*/ */
@ApiOperation("分页查询设备列表") @ApiOperation("分页查询产品列表")
@PreAuthorize("@ss.hasPermi('iot:product:list')") @PreAuthorize("@ss.hasPermi('iot:product:list')")
@GetMapping("list") @GetMapping("list")
public TableDataInfo listProduct(DcProduct dcProduct) { public TableDataInfo listProduct(DcProduct dcProduct) {
@ -44,12 +44,12 @@ public class DcProductController extends BaseController {
} }
/** /**
* 无分页查询设备列表 * 无分页查询产品列表
* *
* @param dcProduct 请求参数 * @param dcProduct 请求参数
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("无分页查询设备列表") @ApiOperation("无分页查询产品列表")
@PreAuthorize("@ss.hasPermi('iot:product:query')") @PreAuthorize("@ss.hasPermi('iot:product:query')")
@GetMapping("query") @GetMapping("query")
public AjaxResult queryProduct(DcProduct dcProduct) { public AjaxResult queryProduct(DcProduct dcProduct) {
@ -57,12 +57,12 @@ public class DcProductController extends BaseController {
} }
/** /**
* 根据id查询设备信息 * 根据id查询产品信息
* *
* @param id id * @param id id
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("根据id查询设备信息") @ApiOperation("根据id查询产品信息")
@PreAuthorize("@ss.hasPermi('iot:product:query')") @PreAuthorize("@ss.hasPermi('iot:product:query')")
@GetMapping("{id}") @GetMapping("{id}")
public AjaxResult getProduct(@PathVariable String id) { public AjaxResult getProduct(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcProductController extends BaseController {
*/ */
@ApiOperation("新增") @ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:product:add')") @PreAuthorize("@ss.hasPermi('iot:product:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT) @Log(title = "新增产品", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult addProduct(@Valid @RequestBody DcProduct dcProduct) { public AjaxResult addProduct(@Valid @RequestBody DcProduct dcProduct) {
return toAjax(dcProdurtService.addProduct(dcProduct)); return toAjax(dcProdurtService.addProduct(dcProduct));
@ -92,7 +92,7 @@ public class DcProductController extends BaseController {
*/ */
@ApiOperation("修改") @ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:product:edit')") @PreAuthorize("@ss.hasPermi('iot:product:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE) @Log(title = "修改产品", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult editProduct(@Valid @RequestBody DcProduct dcProduct) { public AjaxResult editProduct(@Valid @RequestBody DcProduct dcProduct) {
return toAjax(dcProdurtService.editProduct(dcProduct)); return toAjax(dcProdurtService.editProduct(dcProduct));

20
zc-business/src/main/java/com/zc/business/controller/DcRoadController.java

@ -21,22 +21,22 @@ import java.util.List;
* *
* @author zhaoxianglong * @author zhaoxianglong
*/ */
@Api("道路信息") @Api(tags = {"道路信息"})
@RestController @RestController
@RequestMapping("/business/road") @RequestMapping("/business/road")
public class DcRoadController extends BaseController { public class DcRoadController extends BaseController {
@Resource @Resource
private IDcRoadService dcRoadService; private IDcRoadService dcRoadService;
//*********************************设备增删改查****************************************** //*********************************道路增删改查******************************************
/** /**
* 分页查询设备列表 * 分页查询道路列表
* *
* @param dcRoad 请求参数 * @param dcRoad 请求参数
* @return 分页查询结果 * @return 分页查询结果
*/ */
@ApiOperation("分页查询设备列表") @ApiOperation("分页查询道路列表")
@PreAuthorize("@ss.hasPermi('iot:road:list')") @PreAuthorize("@ss.hasPermi('iot:road:list')")
@GetMapping("list") @GetMapping("list")
public TableDataInfo listRoad(DcRoad dcRoad) { public TableDataInfo listRoad(DcRoad dcRoad) {
@ -44,12 +44,12 @@ public class DcRoadController extends BaseController {
} }
/** /**
* 无分页查询设备列表 * 无分页查询道路列表
* *
* @param dcRoad 请求参数 * @param dcRoad 请求参数
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("无分页查询设备列表") @ApiOperation("无分页查询道路列表")
@PreAuthorize("@ss.hasPermi('iot:road:query')") @PreAuthorize("@ss.hasPermi('iot:road:query')")
@GetMapping("query") @GetMapping("query")
public AjaxResult queryRoad(DcRoad dcRoad) { public AjaxResult queryRoad(DcRoad dcRoad) {
@ -57,12 +57,12 @@ public class DcRoadController extends BaseController {
} }
/** /**
* 根据id查询设备信息 * 根据id查询道路信息
* *
* @param id id * @param id id
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("根据id查询设备信息") @ApiOperation("根据id查询道路信息")
@PreAuthorize("@ss.hasPermi('iot:road:query')") @PreAuthorize("@ss.hasPermi('iot:road:query')")
@GetMapping("{id}") @GetMapping("{id}")
public AjaxResult getRoad(@PathVariable String id) { public AjaxResult getRoad(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcRoadController extends BaseController {
*/ */
@ApiOperation("新增") @ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:road:add')") @PreAuthorize("@ss.hasPermi('iot:road:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT) @Log(title = "新增道路", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult addRoad(@Valid @RequestBody DcRoad dcRoad) { public AjaxResult addRoad(@Valid @RequestBody DcRoad dcRoad) {
return toAjax(dcRoadService.addRoad(dcRoad)); return toAjax(dcRoadService.addRoad(dcRoad));
@ -92,7 +92,7 @@ public class DcRoadController extends BaseController {
*/ */
@ApiOperation("修改") @ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:road:edit')") @PreAuthorize("@ss.hasPermi('iot:road:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE) @Log(title = "修改道路", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult editRoad(@Valid @RequestBody DcRoad dcRoad) { public AjaxResult editRoad(@Valid @RequestBody DcRoad dcRoad) {
return toAjax(dcRoadService.editRoad(dcRoad)); return toAjax(dcRoadService.editRoad(dcRoad));

20
zc-business/src/main/java/com/zc/business/controller/DcStakeMarkController.java

@ -21,22 +21,22 @@ import java.util.List;
* *
* @author zhaoxianglong * @author zhaoxianglong
*/ */
@Api("桩号") @Api(tags={"桩号"})
@RestController @RestController
@RequestMapping("/business/stakeMark") @RequestMapping("/business/stakeMark")
public class DcStakeMarkController extends BaseController { public class DcStakeMarkController extends BaseController {
@Resource @Resource
private IDcStakeMarkService dcStakeMarkService; private IDcStakeMarkService dcStakeMarkService;
//*********************************设备增删改查****************************************** //*********************************桩号增删改查******************************************
/** /**
* 分页查询设备列表 * 分页查询桩号列表
* *
* @param dcStakeMark 请求参数 * @param dcStakeMark 请求参数
* @return 分页查询结果 * @return 分页查询结果
*/ */
@ApiOperation("分页查询设备列表") @ApiOperation("分页查询桩号列表")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:list')") @PreAuthorize("@ss.hasPermi('iot:stakeMark:list')")
@GetMapping("list") @GetMapping("list")
public TableDataInfo listStakeMark(DcStakeMark dcStakeMark) { public TableDataInfo listStakeMark(DcStakeMark dcStakeMark) {
@ -44,12 +44,12 @@ public class DcStakeMarkController extends BaseController {
} }
/** /**
* 无分页查询设备列表 * 无分页查询桩号列表
* *
* @param dcStakeMark 请求参数 * @param dcStakeMark 请求参数
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("无分页查询设备列表") @ApiOperation("无分页查询桩号列表")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:query')") @PreAuthorize("@ss.hasPermi('iot:stakeMark:query')")
@GetMapping("query") @GetMapping("query")
public AjaxResult queryStakeMark(DcStakeMark dcStakeMark) { public AjaxResult queryStakeMark(DcStakeMark dcStakeMark) {
@ -57,12 +57,12 @@ public class DcStakeMarkController extends BaseController {
} }
/** /**
* 根据id查询设备信息 * 根据id查询桩号信息
* *
* @param id id * @param id id
* @return 查询结果 * @return 查询结果
*/ */
@ApiOperation("根据id查询设备信息") @ApiOperation("根据id查询桩号信息")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:query')") @PreAuthorize("@ss.hasPermi('iot:stakeMark:query')")
@GetMapping("{id}") @GetMapping("{id}")
public AjaxResult getStakeMark(@PathVariable String id) { public AjaxResult getStakeMark(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcStakeMarkController extends BaseController {
*/ */
@ApiOperation("新增") @ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:add')") @PreAuthorize("@ss.hasPermi('iot:stakeMark:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT) @Log(title = "新增桩号", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult addStakeMark(@Valid @RequestBody DcStakeMark dcStakeMark) { public AjaxResult addStakeMark(@Valid @RequestBody DcStakeMark dcStakeMark) {
return toAjax(dcStakeMarkService.addStakeMark(dcStakeMark)); return toAjax(dcStakeMarkService.addStakeMark(dcStakeMark));
@ -92,7 +92,7 @@ public class DcStakeMarkController extends BaseController {
*/ */
@ApiOperation("修改") @ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:edit')") @PreAuthorize("@ss.hasPermi('iot:stakeMark:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE) @Log(title = "修改桩号", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult editStakeMark(@Valid @RequestBody DcStakeMark dcStakeMark) { public AjaxResult editStakeMark(@Valid @RequestBody DcStakeMark dcStakeMark) {
return toAjax(dcStakeMarkService.editStakeMark(dcStakeMark)); return toAjax(dcStakeMarkService.editStakeMark(dcStakeMark));

Loading…
Cancel
Save