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进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:XX平台_接口文档")
.title("业务平台_接口文档")
// 描述
.description("描述:用于XX平台数据接口信息,具体包括XXX,XXX模块...")
.description("描述:用于业务平台数据接口信息,具体包括XXX,XXX模块...")
// 作者信息
.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
*/
@Api("设备")
@Api(tags = {"设备"})
@RestController
@RequestMapping("/business/device")
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
*/
@Api("路网设施")
@Api(tags = {"路网设施"})
@RestController
@RequestMapping("/business/facility")
public class DcFacilityController extends BaseController {
@Resource
private IDcFacilityService dcFacilityService;
//*********************************设备增删改查******************************************
//*********************************路网设施增删改查******************************************
/**
* 分页查询设备列表
* 分页查询路网设施列表
*
* @param dcFacility 请求参数
* @return 分页查询结果
*/
@ApiOperation("分页查询设备列表")
@ApiOperation("分页查询路网设施列表")
@PreAuthorize("@ss.hasPermi('iot:facility:list')")
@GetMapping("list")
public TableDataInfo listFacility(DcFacility dcFacility) {
@ -44,12 +44,12 @@ public class DcFacilityController extends BaseController {
}
/**
* 无分页查询设备列表
* 无分页查询路网设施列表
*
* @param dcFacility 请求参数
* @return 查询结果
*/
@ApiOperation("无分页查询设备列表")
@ApiOperation("无分页查询路网设施列表")
@PreAuthorize("@ss.hasPermi('iot:facility:query')")
@GetMapping("query")
public AjaxResult queryFacility(DcFacility dcFacility) {
@ -57,12 +57,12 @@ public class DcFacilityController extends BaseController {
}
/**
* 根据id查询设备信息
* 根据id查询路网设施信息
*
* @param id id
* @return 查询结果
*/
@ApiOperation("根据id查询设备信息")
@ApiOperation("根据id查询路网设施信息")
@PreAuthorize("@ss.hasPermi('iot:facility:query')")
@GetMapping("{id}")
public AjaxResult getFacility(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcFacilityController extends BaseController {
*/
@ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:facility:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT)
@Log(title = "新增路网设施", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult addFacility(@Valid @RequestBody DcFacility dcFacility) {
return toAjax(dcFacilityService.addFacility(dcFacility));
@ -92,7 +92,7 @@ public class DcFacilityController extends BaseController {
*/
@ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:facility:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE)
@Log(title = "修改路网设施", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult editFacility(@Valid @RequestBody DcFacility 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
*/
@Api("产品")
@Api(tags = {"产品"})
@RestController
@RequestMapping("/business/product")
public class DcProductController extends BaseController {
@Resource
private IDcProductService dcProdurtService;
//*********************************设备增删改查******************************************
//*********************************产品增删改查******************************************
/**
* 分页查询设备列表
* 分页查询产品列表
*
* @param dcProduct 请求参数
* @return 分页查询结果
*/
@ApiOperation("分页查询设备列表")
@ApiOperation("分页查询产品列表")
@PreAuthorize("@ss.hasPermi('iot:product:list')")
@GetMapping("list")
public TableDataInfo listProduct(DcProduct dcProduct) {
@ -44,12 +44,12 @@ public class DcProductController extends BaseController {
}
/**
* 无分页查询设备列表
* 无分页查询产品列表
*
* @param dcProduct 请求参数
* @return 查询结果
*/
@ApiOperation("无分页查询设备列表")
@ApiOperation("无分页查询产品列表")
@PreAuthorize("@ss.hasPermi('iot:product:query')")
@GetMapping("query")
public AjaxResult queryProduct(DcProduct dcProduct) {
@ -57,12 +57,12 @@ public class DcProductController extends BaseController {
}
/**
* 根据id查询设备信息
* 根据id查询产品信息
*
* @param id id
* @return 查询结果
*/
@ApiOperation("根据id查询设备信息")
@ApiOperation("根据id查询产品信息")
@PreAuthorize("@ss.hasPermi('iot:product:query')")
@GetMapping("{id}")
public AjaxResult getProduct(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcProductController extends BaseController {
*/
@ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:product:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT)
@Log(title = "新增产品", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult addProduct(@Valid @RequestBody DcProduct dcProduct) {
return toAjax(dcProdurtService.addProduct(dcProduct));
@ -92,7 +92,7 @@ public class DcProductController extends BaseController {
*/
@ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:product:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE)
@Log(title = "修改产品", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult editProduct(@Valid @RequestBody DcProduct 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
*/
@Api("道路信息")
@Api(tags = {"道路信息"})
@RestController
@RequestMapping("/business/road")
public class DcRoadController extends BaseController {
@Resource
private IDcRoadService dcRoadService;
//*********************************设备增删改查******************************************
//*********************************道路增删改查******************************************
/**
* 分页查询设备列表
* 分页查询道路列表
*
* @param dcRoad 请求参数
* @return 分页查询结果
*/
@ApiOperation("分页查询设备列表")
@ApiOperation("分页查询道路列表")
@PreAuthorize("@ss.hasPermi('iot:road:list')")
@GetMapping("list")
public TableDataInfo listRoad(DcRoad dcRoad) {
@ -44,12 +44,12 @@ public class DcRoadController extends BaseController {
}
/**
* 无分页查询设备列表
* 无分页查询道路列表
*
* @param dcRoad 请求参数
* @return 查询结果
*/
@ApiOperation("无分页查询设备列表")
@ApiOperation("无分页查询道路列表")
@PreAuthorize("@ss.hasPermi('iot:road:query')")
@GetMapping("query")
public AjaxResult queryRoad(DcRoad dcRoad) {
@ -57,12 +57,12 @@ public class DcRoadController extends BaseController {
}
/**
* 根据id查询设备信息
* 根据id查询道路信息
*
* @param id id
* @return 查询结果
*/
@ApiOperation("根据id查询设备信息")
@ApiOperation("根据id查询道路信息")
@PreAuthorize("@ss.hasPermi('iot:road:query')")
@GetMapping("{id}")
public AjaxResult getRoad(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcRoadController extends BaseController {
*/
@ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:road:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT)
@Log(title = "新增道路", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult addRoad(@Valid @RequestBody DcRoad dcRoad) {
return toAjax(dcRoadService.addRoad(dcRoad));
@ -92,7 +92,7 @@ public class DcRoadController extends BaseController {
*/
@ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:road:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE)
@Log(title = "修改道路", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult editRoad(@Valid @RequestBody DcRoad 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
*/
@Api("桩号")
@Api(tags={"桩号"})
@RestController
@RequestMapping("/business/stakeMark")
public class DcStakeMarkController extends BaseController {
@Resource
private IDcStakeMarkService dcStakeMarkService;
//*********************************设备增删改查******************************************
//*********************************桩号增删改查******************************************
/**
* 分页查询设备列表
* 分页查询桩号列表
*
* @param dcStakeMark 请求参数
* @return 分页查询结果
*/
@ApiOperation("分页查询设备列表")
@ApiOperation("分页查询桩号列表")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:list')")
@GetMapping("list")
public TableDataInfo listStakeMark(DcStakeMark dcStakeMark) {
@ -44,12 +44,12 @@ public class DcStakeMarkController extends BaseController {
}
/**
* 无分页查询设备列表
* 无分页查询桩号列表
*
* @param dcStakeMark 请求参数
* @return 查询结果
*/
@ApiOperation("无分页查询设备列表")
@ApiOperation("无分页查询桩号列表")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:query')")
@GetMapping("query")
public AjaxResult queryStakeMark(DcStakeMark dcStakeMark) {
@ -57,12 +57,12 @@ public class DcStakeMarkController extends BaseController {
}
/**
* 根据id查询设备信息
* 根据id查询桩号信息
*
* @param id id
* @return 查询结果
*/
@ApiOperation("根据id查询设备信息")
@ApiOperation("根据id查询桩号信息")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:query')")
@GetMapping("{id}")
public AjaxResult getStakeMark(@PathVariable String id) {
@ -78,7 +78,7 @@ public class DcStakeMarkController extends BaseController {
*/
@ApiOperation("新增")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:add')")
@Log(title = "新增设备", businessType = BusinessType.INSERT)
@Log(title = "新增桩号", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult addStakeMark(@Valid @RequestBody DcStakeMark dcStakeMark) {
return toAjax(dcStakeMarkService.addStakeMark(dcStakeMark));
@ -92,7 +92,7 @@ public class DcStakeMarkController extends BaseController {
*/
@ApiOperation("修改")
@PreAuthorize("@ss.hasPermi('iot:stakeMark:edit')")
@Log(title = "修改设备", businessType = BusinessType.UPDATE)
@Log(title = "修改桩号", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult editStakeMark(@Valid @RequestBody DcStakeMark dcStakeMark) {
return toAjax(dcStakeMarkService.editStakeMark(dcStakeMark));

Loading…
Cancel
Save