Commit abf80708 by qwmqiuwenmin

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents c81d9316 c517a78f
...@@ -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);
} }
List<DepartmentShortDTO> list = departmentApiService.listAllDepartment(wxEnterpriseId); Object cache = RedisUtil.getCache("department-list-cache-"+wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1,list); if (null == cache) {
List<DepartmentShortDTO> list = departmentApiService.listAllDepartment(wxEnterpriseId);
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