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