mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 18:45:57 +08:00
feat :组件分类
This commit is contained in:
parent
d0e5c81582
commit
88197f942c
@ -1,8 +1,5 @@
|
||||
### H5 组件分类管理接口测试
|
||||
|
||||
|
||||
### 1. 分页查询分类(查询一级分类)
|
||||
GET {{baseUrl}}/h5/category/page?pageNum=1&pageSize=10
|
||||
GET http://localhost:19200/h5/h5/category/page?pageNum=1&pageSize=10&parentId=1
|
||||
Content-Type: application/json
|
||||
|
||||
### 2. 分页查询分类(查询指定父分类的子分类)
|
||||
|
||||
@ -23,7 +23,7 @@ import java.util.List;
|
||||
*/
|
||||
@Tag(name = "H5 组件分类管理")
|
||||
@RestController
|
||||
@RequestMapping("/h5/category")
|
||||
@RequestMapping("category")
|
||||
@RequiredArgsConstructor
|
||||
public class H5ComponentCategoryController {
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ import java.util.List;
|
||||
*/
|
||||
@Tag(name = "H5 组件管理")
|
||||
@RestController
|
||||
@RequestMapping("/h5/component")
|
||||
@RequestMapping("component")
|
||||
@RequiredArgsConstructor
|
||||
public class H5ComponentController {
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import java.util.List;
|
||||
*/
|
||||
@Tag(name = "H5 组件标签管理")
|
||||
@RestController
|
||||
@RequestMapping("/h5/tag")
|
||||
@RequestMapping("tag")
|
||||
@RequiredArgsConstructor
|
||||
public class H5TagController {
|
||||
|
||||
|
||||
@ -1,50 +1,50 @@
|
||||
package com.luban.api.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.luban.api.entity.Scripts;
|
||||
import com.luban.api.convert.ScriptsConvert;
|
||||
import com.luban.api.service.ScriptsService;
|
||||
import com.luban.api.vo.ScriptsVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 作品 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author lizhengwei
|
||||
* @since 2024-06-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/scripts")
|
||||
public class ScriptsController {
|
||||
|
||||
|
||||
private final ScriptsService scriptsService;
|
||||
|
||||
public ScriptsController(ScriptsService scriptsService) {
|
||||
this.scriptsService = scriptsService;
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "根据scriptsId查询")
|
||||
@GetMapping("/{id}")
|
||||
public ScriptsVO findScriptsById(@PathVariable Long id) {
|
||||
return ScriptsConvert.toVO(scriptsService.getById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询所有scripts")
|
||||
@GetMapping
|
||||
public List<ScriptsVO> listAllScriptss(@RequestParam Integer _limit) {
|
||||
QueryWrapper<Scripts> wrapper = new QueryWrapper<>();
|
||||
wrapper.last("limit " + _limit);
|
||||
return scriptsService.list(wrapper).stream().map(ScriptsConvert::toVO).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//package com.luban.api.controller;
|
||||
//
|
||||
//
|
||||
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
//import com.luban.api.entity.Scripts;
|
||||
//import com.luban.api.convert.ScriptsConvert;
|
||||
//import com.luban.api.service.ScriptsService;
|
||||
//import com.luban.api.vo.ScriptsVO;
|
||||
//import io.swagger.v3.oas.annotations.Operation;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * <p>
|
||||
// * 作品 前端控制器
|
||||
// * </p>
|
||||
// *
|
||||
// * @author lizhengwei
|
||||
// * @since 2024-06-21
|
||||
// */
|
||||
//@RestController
|
||||
//@RequestMapping("/scripts")
|
||||
//public class ScriptsController {
|
||||
//
|
||||
//
|
||||
// private final ScriptsService scriptsService;
|
||||
//
|
||||
// public ScriptsController(ScriptsService scriptsService) {
|
||||
// this.scriptsService = scriptsService;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @Operation(summary = "根据scriptsId查询")
|
||||
// @GetMapping("/{id}")
|
||||
// public ScriptsVO findScriptsById(@PathVariable Long id) {
|
||||
// return ScriptsConvert.toVO(scriptsService.getById(id));
|
||||
// }
|
||||
//
|
||||
// @Operation(summary = "查询所有scripts")
|
||||
// @GetMapping
|
||||
// public List<ScriptsVO> listAllScriptss(@RequestParam Integer _limit) {
|
||||
// QueryWrapper<Scripts> wrapper = new QueryWrapper<>();
|
||||
// wrapper.last("limit " + _limit);
|
||||
// return scriptsService.list(wrapper).stream().map(ScriptsConvert::toVO).collect(Collectors.toList());
|
||||
// }
|
||||
//
|
||||
//}
|
||||
//
|
||||
|
||||
Loading…
Reference in New Issue
Block a user