| | |
| | | private ISysUserService userService; |
| | | @Resource |
| | | private ISysDeptService iSysDeptService; |
| | | |
| | | @Resource |
| | | private FileService fileService; |
| | | @Resource |
| | | private CoreCompanyService coreCompanyService; |
| | | /** |
| | |
| | | * @param deptId |
| | | * @return |
| | | */ |
| | | public String getDeptImg(String deptId) { |
| | | public String isDeptImgExit(String deptId) { |
| | | |
| | | String imgPath = "/img/deptImg.jpg"; //默认图 |
| | | Dept dept = coreDeptService.getDeptById(deptId); |
| | | if(null != dept && StringUtils.isNotEmpty(dept.getImgPath())){ |
| | | imgPath = dept.getImgPath(); |
| | | } |
| | | return imgPath; |
| | | |
| | | String imgPath = (dept == null ? null : dept.getImgPath()); |
| | | return isImgExit(imgPath, "dept"); |
| | | } |
| | | |
| | | /** |
| | | * 判断路径下文件是否存在,不存在则给默认 |
| | | * @param imgPath |
| | | * @param tag |
| | | * @return |
| | | */ |
| | | public String isImgExit(String imgPath, String tag) { |
| | | return fileService.isImgExit(imgPath, tag); |
| | | } |
| | | |
| | | /** |