首先数据Bean
分三层
一层,Action 1,负责接受浏览器参数
2,返回结果给浏览器
3,调用指定Service
二层,Service(if for List Map)
三层,Dao 数据库操作
package
import lombok.Data;
import jave.util.ArrayList;
import jave.util.List;
/**
*
*/
@Data
public class GroupList{
String name;
String id;
String url;
//范型
List child;
public GroupList(String name, String id){
this.name = name;
this.id = id;
this.url = “/#/bug?group=” + id + “&name=” + name;
child = new ArrayList();
}
public GroupList add(GrouList g){
if (child.size() == 0){
GroupList groupList = new GroupList(name,id)
groupList.url = url;
child.add(groupList);
}
if (g == null) return this;
g.getChild().clear();
child.add(g);
return this;
}
}