[
{
value:
'
zhinan
'
,
label:
'
指南
'
,
children: [{
value:
'
shejiyuanze
'
,
label:
'
设计原则
'
,
children: [{
value:
'
yizhi
'
,
label:
'一
致
'
}, {
value:
'
fankui
'
,
label:
'
反馈
'
}, {
value:
'
xiaolv
'
,
label:
'
效率
'
}, {
value:
'
kekong
'
,
label:
'
可控
'
}]
}]
}
]
@Data
@ToString
@Entity
@Table(name
=
"
category
"
)
@GenericGenerator(name
=
"
jpa
‐
assigned
"
, strategy
=
"
assigned
"
)
public class Category implements Serializable {
private static final long serialVersionUID =
‐
906357110051689484L;
@Id
@GeneratedValue(generator =
"
jpa
‐
assigned
"
)
@Column(length =
32)
private String id;
private String name;
private String label;
private String parentid;
private String isshow;
private Integer orderby;
private String isleaf;
}
@Data
@ToString
public class CategoryNode extends Category {
List<CategoryNode> children;
}
package com.xuecheng
.api.web.controller.api.course;
import com.xuecheng
.framework.domain.course.ext.CategoryNode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org
.springframework.web.bind.annotation.GetMapping;
import org
.springframework.web.bind.annotation.RequestMapping;
import org
.springframework.web.bind.annotation.ResponseBody;
@Api(value
=
"
课程分类管理
"
,description =
"
课程分类管理
"
,tags
=
{
"
课程分类管理
"
})
public interface CategoryControllerApi {
@ApiOperation(
"
查询分类
"
)
public CategoryNode findList();
}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |