|
@@ -9,6 +9,7 @@ import com.ssj.framework.basic.common.bean.SplitPage;
|
|
import com.ssj.framework.core.common.controller.BaseController;
|
|
import com.ssj.framework.core.common.controller.BaseController;
|
|
import com.ssj.service.sys.organization.service.OrganizationService;
|
|
import com.ssj.service.sys.organization.service.OrganizationService;
|
|
import com.ssj.service.sys.role.service.AdminOrgService;
|
|
import com.ssj.service.sys.role.service.AdminOrgService;
|
|
|
|
+import com.ssj.service.sys.role.service.AdminService;
|
|
import com.ssj.service.sys.sort.service.SortService;
|
|
import com.ssj.service.sys.sort.service.SortService;
|
|
import com.ssj.service.weixin.sales.service.LibStaffingService;
|
|
import com.ssj.service.weixin.sales.service.LibStaffingService;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -24,10 +25,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
-import java.util.Date;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author ZhangCaibao
|
|
* @author ZhangCaibao
|
|
@@ -48,6 +46,9 @@ public class OrganizationController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private AdminOrgService adminOrgService;
|
|
private AdminOrgService adminOrgService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private AdminService adminService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 栏目主页面
|
|
* 栏目主页面
|
|
@@ -147,13 +148,21 @@ public class OrganizationController extends BaseController {
|
|
organizationService.changeSubCount(org.getpId(), true);
|
|
organizationService.changeSubCount(org.getpId(), true);
|
|
if(isAdd){
|
|
if(isAdd){
|
|
//给当前账号插入权限
|
|
//给当前账号插入权限
|
|
- String adminId = adminId();
|
|
|
|
- AdminOrg adminOrg = new AdminOrg();
|
|
|
|
- adminOrg.setAdminId(adminId);
|
|
|
|
- adminOrg.setCreateTime(new Date());
|
|
|
|
- adminOrg.setOrgCode(org.getCode());
|
|
|
|
- adminOrg.setOrgId(org.getId());
|
|
|
|
- adminOrgService.save(adminOrg);
|
|
|
|
|
|
+ //String adminId = adminId();
|
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
|
+ list.add("admin");
|
|
|
|
+ list.add("sishujia");
|
|
|
|
+ list.add("xsxb");
|
|
|
|
+ for(String str:list){
|
|
|
|
+ Admin admin = adminService.getByLoginName(str);
|
|
|
|
+ if(admin == null){continue;}
|
|
|
|
+ AdminOrg adminOrg = new AdminOrg();
|
|
|
|
+ adminOrg.setAdminId(admin.getId());
|
|
|
|
+ adminOrg.setCreateTime(new Date());
|
|
|
|
+ adminOrg.setOrgCode(org.getCode());
|
|
|
|
+ adminOrg.setOrgId(org.getId());
|
|
|
|
+ adminOrgService.save(adminOrg);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
response.success(org);
|
|
response.success(org);
|