Commit c517a78f by fudahua

全部部门

parent f5f27544
...@@ -6,6 +6,7 @@ import java.util.HashSet; ...@@ -6,6 +6,7 @@ import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.gic.haoban.manage.api.dto.DepartmentShortDTO; import com.gic.haoban.manage.api.dto.DepartmentShortDTO;
...@@ -860,8 +861,14 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -860,8 +861,14 @@ public class DepartmentContoller extends WebBaseController{
if (StringUtils.isBlank(wxEnterpriseId)) { if (StringUtils.isBlank(wxEnterpriseId)) {
return resultResponse(HaoBanErrCode.ERR_6); return resultResponse(HaoBanErrCode.ERR_6);
} }
Object cache = RedisUtil.getCache("department-list-cache-"+wxEnterpriseId);
if (null == cache) {
List<DepartmentShortDTO> list = departmentApiService.listAllDepartment(wxEnterpriseId); List<DepartmentShortDTO> list = departmentApiService.listAllDepartment(wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1,list); RedisUtil.setCache("department-list-cache-"+wxEnterpriseId,list);
return resultResponse(HaoBanErrCode.ERR_1, list);
}else {
return resultResponse(HaoBanErrCode.ERR_1, cache);
}
} }
} }
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