Commit 5f5fae43 authored by 赵啸非's avatar 赵啸非

添加部门信息表

parent 251d0c5c
...@@ -11,6 +11,7 @@ import com.mortals.framework.common.IBaseEnum; ...@@ -11,6 +11,7 @@ import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.common.code.UserType; import com.mortals.framework.common.code.UserType;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -44,7 +45,7 @@ public class ResourceController extends BaseCRUDJsonBodyMappingController<Resour ...@@ -44,7 +45,7 @@ public class ResourceController extends BaseCRUDJsonBodyMappingController<Resour
Map<String, Object> statsus = new HashMap<String, Object>(); Map<String, Object> statsus = new HashMap<String, Object>();
statsus.put("authType", AuthType.getEnumMap()); statsus.put("authType", AuthType.getEnumMap());
statsus.put("sourceType", SourceType.getEnumMap()); statsus.put("sourceType", SourceType.getEnumMap());
if (getCurUser().isAdmin()) { if (!ObjectUtils.isEmpty(context.getUser())&&context.getUser().isAdmin()) {
statsus.put("userType", IBaseEnum.getEnumMap(UserType.class)); statsus.put("userType", IBaseEnum.getEnumMap(UserType.class));
} else { } else {
statsus.put("userType", UserType.findByValue(getCurUser().getUserType())); statsus.put("userType", UserType.findByValue(getCurUser().getUserType()));
......
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