Commit 5631ce69 authored by 廖旭伟's avatar 廖旭伟

登录用户站点列表默认返回空list

parent ac685eba
...@@ -21,6 +21,7 @@ import com.mortals.xhx.module.menu.service.MenuService; ...@@ -21,6 +21,7 @@ import com.mortals.xhx.module.menu.service.MenuService;
import com.mortals.xhx.module.user.model.UserEntity; import com.mortals.xhx.module.user.model.UserEntity;
import com.mortals.xhx.module.user.service.UserService; import com.mortals.xhx.module.user.service.UserService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -80,8 +81,11 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -80,8 +81,11 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
if (apiResp.getCode() != YesNoEnum.YES.getValue()) { if (apiResp.getCode() != YesNoEnum.YES.getValue()) {
throw new AppException("获取用户站点列表树数据失败:" + apiResp.getMsg()); throw new AppException("获取用户站点列表树数据失败:" + apiResp.getMsg());
} }
if(apiResp.getData().get("data")!=null) {
data.put("siteList", apiResp.getData().get("data")); data.put("siteList", apiResp.getData().get("data"));
}else {
data.put("siteList", Collections.emptyList());
}
} }
recordSysLog(request, userEntity, "用户登录系统成功!"); recordSysLog(request, userEntity, "用户登录系统成功!");
......
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