|
|
168abb1255
|
แก้ format ฟิว posMasterNo (1)
|
2026-05-21 11:26:29 +07:00 |
|
|
|
d093953fbe
|
แก้ไขการคำนวนระยะเวลาครองตำแหน่ง
|
2026-05-18 20:56:20 +07:00 |
|
|
|
334ce4f5fc
|
fixed #2413 จำนวนวันอายุราชการแสดงไม่ตรงกัน
Build & Deploy on Dev / build (push) Successful in 58s
|
2026-05-12 17:24:15 +07:00 |
|
|
|
8705d1abf5
|
update
|
2026-04-24 16:15:47 +07:00 |
|
|
|
7e3982a96d
|
fixed calculate tenure (สูตรคำนวนอายุราชการจาก diff date)
Build & Deploy on Dev / build (push) Successful in 1m6s
|
2026-04-20 18:20:20 +07:00 |
|
adisak
|
28b5408d5b
|
#2427 and migration
|
2026-04-20 08:05:16 +07:00 |
|
|
|
baa8496a69
|
refactor api act/{id}
Build & Deploy on Dev / build (push) Successful in 1m25s
|
2026-03-10 11:45:25 +07:00 |
|
|
|
91887ec63d
|
fix ignore file
|
2026-03-07 21:14:50 +07:00 |
|
|
|
656c2e7341
|
Changed LogMemoryStore from active refresh (setInterval) to passive refresh on-access (60 min TTL)
|
2026-01-29 00:30:34 +07:00 |
|
|
|
7955c855bc
|
fix: extend OrgStructureCache TTL and add graceful shutdown cleanup
- Extended OrgStructureCache TTL from 10 to 30 minutes (reduce cleanup frequency)
- Added orgStructureCache.destroy() in graceful shutdown handler
- Updated documentation to reflect changes
Co-Authored-By: Claude (glm-4.7) <noreply@anthropic.com>
|
2026-01-29 00:05:56 +07:00 |
|
|
|
1a324af483
|
fix: api /super-admin/{id} memory cache
|
2026-01-28 18:26:03 +07:00 |
|
|
|
e068aafe3a
|
fix: เพิ่ม Graceful Shutdown - ป้องกัน connection in app file, Log Mnddleware + Memory Store
|
2026-01-28 17:22:10 +07:00 |
|
|
|
bca25a7a52
|
feat: optimize detailSuperAdmin API to fix database connection issue
ปัญหา: API GET /api/v1/org/super-admin/{id} ทำให้ระบบดับเพราะ N+1 queries
- เดิม: >1,000,000 queries (100 orgRoots × 10 children × 10 counts/level)
- ใหม่: ~10 queries (query รวมครั้งเดียว + 5 org queries)
การเปลี่ยนแปลง:
1. สร้าง OrganizationController-optimized.ts
- getPositionCounts(): query posMaster ทั้งหมดครั้งเดียว
- สร้าง maps (orgRootMap, orgChild1Map, etc.) สำหรับ lookup
- ลด queries จาก 1,000,000+ → ~10 queries
2. เพิ่ม import สำหรับ helper functions ใน OrganizationController.ts
- import { getPositionCounts, getCounts, getRootCounts }
- ต้อง replace ฟังก์ชัน detailSuperAdmin ด้วย optimized version
- ดู OPTIMIZED_FUNCTION.ts สำหรับฟังก์ชันใหม่
ไฟล์ที่เพิ่ม:
- src/controllers/OrganizationController-optimized.ts (helper functions)
- OPTIMIZED_FUNCTION.ts (optimized function reference)
- src/utils/log-memory-store.ts (from earlier log middleware fix)
หมายเหตุ: ฟังก์ชัน detailSuperAdmin ใน OrganizationController.ts
ยังไม่ถูก replace (ต้องทำ manual) - ดู OPTIMIZED_FUNCTION.ts
Co-Authored-By: Claude (glm-4.7) <noreply@anthropic.com>
|
2026-01-28 13:45:52 +07:00 |
|