Commit dcf776e4 authored by 赵啸非's avatar 赵啸非

修改站点权限分配

parent 890916c7
package com.mortals.xhx.module.site.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
......@@ -11,6 +12,7 @@ import com.mortals.xhx.module.model.service.ModelService;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.site.model.SiteTreeSelect;
import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
......@@ -29,6 +31,7 @@ import java.util.stream.Collectors;
*/
@RestController
@RequestMapping("site")
@Slf4j
public class SiteController extends BaseCRUDJsonBodyMappingController<SiteService, SiteEntity, Long> {
@Autowired
......@@ -100,6 +103,7 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
public SiteTreeSelect reFucurs(List<SiteTreeSelect> siteTree, String siteId) {
for (SiteTreeSelect site : siteTree) {
if (site.getId() == siteId) {
log.info("curTree:{}", JSON.toJSONString(site));
return site;
} else {
if (!ObjectUtils.isEmpty(site.getChildren())) {
......
......@@ -67,6 +67,7 @@ Accept: application/json
###构建站点树
GET {{baseUrl}}/site/siteTree
Authorization: Bearer {{authToken}}
Accept: application/json
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment