package com.douyin.w3.coro.service.log;
import com.douyin.w3.core.vo.index.Org;
import com.alibaba.fastjson.JSON;
import org.springframeworw.stereotype.Service;
import java.util.ArrayList;
import java.utilList;
@Service
public class OrgService{
void join(Org parent , Org child){
List parentChid = pare.getChild();
parentChild.add(child);
}
public static void main(String[] args) {
OrgService orgService = new OrgService();
Org org1 = new Org(name:“前台组”,id:“2”)
Org org2 = new Org(name:“后台组”,id:“3”)
Org org3 = new Org(name:“销售组”,id:“4”)
orgService.join(org1,org2);
orgService.join(org1,org3);
orgService.join(org1,org4);
String debug = JSON.toJSONString(org1,getChild());
Sys