Skip to content

Commit

Permalink
在租户不隔离的情况下导出部门报错
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangdaiscott committed Mar 25, 2024
1 parent 70847d1 commit f3cf90b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ public ModelAndView exportXls(SysDepart sysDepart,HttpServletRequest request) {
//}
//});
//step.2 组装导出数据
List<SysDepartExportVo> sysDepartExportVos = sysDepartService.getExportDepart(sysDepart.getTenantId());
Integer tenantId = sysDepart == null ? null : sysDepart.getTenantId();
List<SysDepartExportVo> sysDepartExportVos = sysDepartService.getExportDepart(tenantId);
//导出文件名称
mv.addObject(NormalExcelConstants.FILE_NAME, "部门列表");
mv.addObject(NormalExcelConstants.CLASS, SysDepartExportVo.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public interface ISysDepartService extends IService<SysDepart>{
* @param tenantId
* @return
*/
List<SysDepartExportVo> getExportDepart(int tenantId);
List<SysDepartExportVo> getExportDepart(Integer tenantId);

/**
* 导出系统部门excel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ private void setParentDepartIzLeaf(List<String> parentIdList) {
* @return
*/
@Override
public List<SysDepartExportVo> getExportDepart(int tenantId) {
public List<SysDepartExportVo> getExportDepart(Integer tenantId) {
//获取父级部门
List<SysDepartExportVo> parentDepart = departMapper.getSysDepartList("", tenantId);
//子部门
Expand Down

0 comments on commit f3cf90b

Please sign in to comment.