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;
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);
}
Object cache = RedisUtil.getCache("department-list-cache-"+wxEnterpriseId);
if (null == cache) {
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