| | |
| | | import org.jeecg.modules.dnc.service.IProductInfoService; |
| | | import org.jeecg.modules.dnc.ucenter.Department; |
| | | import org.jeecg.modules.dnc.ucenter.UserDepartExt; |
| | | import org.jeecg.modules.dnc.utils.ValidateUtil; |
| | | import org.jeecg.modules.system.entity.SysUser; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public QueryListResponseResult<CommonGenericTree> loadProductTree() { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!StrUtil.isEmpty(userId)) |
| | | if(!ValidateUtil.validateString(userId)) |
| | | return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList()); |
| | | List<CommonGenericTree> list = productInfoService.loadProductTree(userId); |
| | | if(list == null) |
| | |
| | | public QueryListResponseResult<CommonGenericTree> loadBaseTree() { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!StrUtil.isEmpty(userId)) |
| | | if(!ValidateUtil.validateString(userId)) |
| | | return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList()); |
| | | List<CommonGenericTree> list = productInfoService.loadBaseTree(userId); |
| | | if(list == null) |
| | |
| | | public QueryListResponseResult<CommonGenericTree> loadTree(@PathVariable("nodeType") Integer nodeType, @PathVariable("paramId") String paramId) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!StrUtil.isEmpty(userId)) |
| | | if(!ValidateUtil.validateString(userId)) |
| | | return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList()); |
| | | List<CommonGenericTree> list = productInfoService.loadTree(userId, nodeType, paramId); |
| | | if(list == null) |
| | |
| | | public QueryListResponseResult<CommonGenericTree> searchProductTree(String queryParam) { |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | String userId = user.getId(); |
| | | if(!StrUtil.isEmpty(userId)) |
| | | if(!ValidateUtil.validateString(userId)) |
| | | return new QueryListResponseResult<>(CommonCode.SUCCESS, Collections.emptyList()); |
| | | List<CommonGenericTree> list = productInfoService.searchProductTree(userId, queryParam); |
| | | if(list == null) |