npm_microservice 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/service.js +3 -3
  2. package/dist/services/BaseService.js +3 -3
  3. package/dist/services/CacheService.js +1 -1
  4. package/dist/services/SettingService.js +3 -3
  5. package/dist/services/app/AppTestService.js +3 -3
  6. package/dist/services/app/BannerService.js +3 -3
  7. package/dist/services/app/CategoryService.js +3 -3
  8. package/dist/services/app/NewService.js +3 -3
  9. package/dist/services/app/RecommendedCourseService.js +3 -3
  10. package/dist/services/app/SettingAppService.js +3 -3
  11. package/dist/services/app/TargetService.js +3 -3
  12. package/dist/services/call_center/CategoryService.js +3 -3
  13. package/dist/services/call_center/TicketActivityService.js +3 -3
  14. package/dist/services/call_center/TicketService.js +3 -3
  15. package/dist/services/call_center/TicketTemplateService.js +3 -3
  16. package/dist/services/call_center/TicketTopicService.js +3 -3
  17. package/dist/services/course/CategoryService.js +3 -3
  18. package/dist/services/course/CourseLessonService.js +3 -3
  19. package/dist/services/course/StudentService.js +3 -3
  20. package/dist/services/crm/ContactsService.js +3 -3
  21. package/dist/services/crm/DeviceService.js +3 -3
  22. package/dist/services/finance/InvoicesCancelService.js +3 -3
  23. package/dist/services/finance/InvoicesDetailService.js +3 -3
  24. package/dist/services/finance/InvoicesLogsAssignService.js +3 -3
  25. package/dist/services/finance/InvoicesService.js +3 -3
  26. package/dist/services/finance/PaymentRequestService.js +3 -3
  27. package/dist/services/finance/PaymentService.js +3 -3
  28. package/dist/services/finance/VouchersCategoryService.js +3 -3
  29. package/dist/services/finance/VouchersService.js +3 -3
  30. package/dist/services/finance/WalletTransactionService.js +3 -3
  31. package/dist/services/finance/WalletsService.js +3 -3
  32. package/dist/services/hr/AllowanceService.js +3 -3
  33. package/dist/services/hr/AnnualLeaveService.js +3 -3
  34. package/dist/services/hr/CategoryService.js +3 -3
  35. package/dist/services/hr/DepartmentService.js +3 -3
  36. package/dist/services/hr/DeviceService.js +3 -3
  37. package/dist/services/hr/DocumentService.js +3 -3
  38. package/dist/services/hr/EmployeeExtendService.js +3 -3
  39. package/dist/services/hr/EmployeeExtendTempService.js +3 -3
  40. package/dist/services/hr/EmployeeLeaveService.js +3 -3
  41. package/dist/services/hr/EmployeeQuitService.js +3 -3
  42. package/dist/services/hr/EmployeeService.js +3 -3
  43. package/dist/services/hr/EmployeeShiftService.js +3 -3
  44. package/dist/services/hr/HolidayService.js +3 -3
  45. package/dist/services/hr/JobTitleService.js +3 -3
  46. package/dist/services/hr/PositionService.js +3 -3
  47. package/dist/services/hr/ReasonTypeService.js +3 -3
  48. package/dist/services/hr/ResignationService.js +3 -3
  49. package/dist/services/hr/SalaryService.js +3 -3
  50. package/dist/services/hr/ScheduleOnlineService.js +3 -3
  51. package/dist/services/hr/ScheduleService.js +3 -3
  52. package/dist/services/hr/SettingDocumentService.js +3 -3
  53. package/dist/services/hr/ShiftService.js +3 -3
  54. package/dist/services/hr/ShiftsCustomerCareService.js +3 -3
  55. package/dist/services/hr/TicketExtendService.js +3 -3
  56. package/dist/services/hr/TicketService.js +3 -3
  57. package/dist/services/hr/TicketTypeService.js +3 -3
  58. package/dist/services/hr/TrackingConfirmService.js +3 -3
  59. package/dist/services/hr/TrackingErrorService.js +3 -3
  60. package/dist/services/inventory/InventoryService.js +3 -3
  61. package/dist/services/inventory/LogService.js +3 -3
  62. package/dist/services/inventory/ProductService.js +3 -3
  63. package/dist/services/inventory/ProductShipmentService.js +3 -3
  64. package/dist/services/inventory/StoreService.js +3 -3
  65. package/dist/services/inventory/SupplierService.js +3 -3
  66. package/dist/services/inventory/TransactionDetailService.js +3 -3
  67. package/dist/services/inventory/TransactionService.js +3 -3
  68. package/dist/services/lms/AlbumCategoryService.js +3 -3
  69. package/dist/services/lms/AlbumFileService.js +3 -3
  70. package/dist/services/lms/AlbumService.js +3 -3
  71. package/dist/services/lms/ClassScheduleService.js +3 -3
  72. package/dist/services/lms/ClassesService.js +3 -3
  73. package/dist/services/lms/CourseLessonService.js +3 -3
  74. package/dist/services/lms/CoursePriceService.js +3 -3
  75. package/dist/services/lms/CourseProductService.js +3 -3
  76. package/dist/services/lms/CourseService.js +3 -3
  77. package/dist/services/lms/DocumentCategoryService.js +3 -3
  78. package/dist/services/lms/DocumentService.js +3 -3
  79. package/dist/services/lms/LicenseService.js +3 -3
  80. package/dist/services/lms/PracticeResultService.js +3 -3
  81. package/dist/services/lms/PracticeService.js +3 -3
  82. package/dist/services/lms/StudentAgainService.js +3 -3
  83. package/dist/services/lms/StudentDocumentService.js +3 -3
  84. package/dist/services/lms/StudentExamTimeService.js +3 -3
  85. package/dist/services/lms/StudentReviewService.js +3 -3
  86. package/dist/services/lms/StudentScoreService.js +3 -3
  87. package/dist/services/lms/StudentService.js +3 -3
  88. package/dist/services/lms/StudentSettingReviewService.js +3 -3
  89. package/dist/services/lms/StudentTrackingService.js +3 -3
  90. package/dist/services/lms/StudentTrialService.js +3 -3
  91. package/dist/services/notification/AppService.js +3 -3
  92. package/dist/services/notification/NotificationService.js +3 -3
  93. package/dist/services/online/CourseLessonService.js +3 -3
  94. package/dist/services/online/CourseService.js +3 -3
  95. package/dist/services/online/StudentService.js +3 -3
  96. package/dist/services/org/BranchRequestService.js +3 -3
  97. package/dist/services/org/BranchService.js +3 -3
  98. package/dist/services/org/BranchToMacsService.js +3 -3
  99. package/dist/services/org/BrandService.js +3 -3
  100. package/dist/services/org/CitiesService.js +3 -3
  101. package/dist/services/org/LegalEntityService.js +3 -3
  102. package/dist/services/pm/NoteService.js +3 -3
  103. package/dist/services/pm/TaskService.js +3 -3
  104. package/dist/services/support/CommentService.js +3 -3
  105. package/dist/services/test/EduTestService.js +3 -3
  106. package/package.json +1 -1
package/dist/service.js CHANGED
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -381,9 +381,9 @@ var BaseService = class extends CacheService {
381
381
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
382
382
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
383
383
  const rows = [...dataCache];
384
- if (enableCache && Array.isArray(datas)) {
384
+ if (enableCache && Array.isArray(datas) && datas.length) {
385
385
  for (const item of datas) {
386
- if (item._id) {
386
+ if (item && item._id) {
387
387
  await this.setCacheById(item._id, item, this.timeCache);
388
388
  rows.push(item);
389
389
  }
@@ -36,7 +36,7 @@ var CacheService = class {
36
36
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
37
37
  );
38
38
  const results = await this.redis.mget(keys);
39
- return results.map((r) => r ? JSON.parse(r) : null);
39
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
40
40
  }
41
41
  // Set cache
42
42
  async setCache(key, value, ttl = this.timeCache) {
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }
@@ -218,7 +218,7 @@ var require_CacheService = __commonJS({
218
218
  (id) => `${this.configService}.${this.service || "unknown"}.${this.module || "unknown"}.id:${id}`
219
219
  );
220
220
  const results = await this.redis.mget(keys);
221
- return results.map((r) => r ? JSON.parse(r) : null);
221
+ return results.map((r) => r ? JSON.parse(r) : null).filter(Boolean);
222
222
  }
223
223
  // Set cache
224
224
  async setCache(key, value, ttl = this.timeCache) {
@@ -383,9 +383,9 @@ var require_BaseService = __commonJS({
383
383
  let params = { params: { filter: { _id: ids }, limit: ids.length } };
384
384
  const datas = await this.request("get", this.baseUrl, params, cacheOption);
385
385
  const rows = [...dataCache];
386
- if (enableCache && Array.isArray(datas)) {
386
+ if (enableCache && Array.isArray(datas) && datas.length) {
387
387
  for (const item of datas) {
388
- if (item._id) {
388
+ if (item && item._id) {
389
389
  await this.setCacheById(item._id, item, this.timeCache);
390
390
  rows.push(item);
391
391
  }