Commit c517a78f by fudahua

全部部门

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