rwadurian/backend/services/authorization-service/src
hailin 6f46a8633f feat(reward): add internal APIs for reward distribution
- Add /referral/chain/{userId} API in referral-service for getting referral chain with hasPlanted status
- Add internal authorization APIs in authorization-service:
  - GET /authorization/nearest-community: find nearest community in referral chain
  - GET /authorization/nearest-province: find nearest province company in referral chain
  - GET /authorization/nearest-city: find nearest city company in referral chain
- Add repository methods for finding active authorizations by accountSequence
- Update reward-service client to use accountSequence parameter

These APIs enable reward-service to correctly distribute:
- 分享权益 (share benefit): to referrer with hasPlanted=true
- 社区权益 (community benefit): to nearest community leader
- 省团队权益 (province team benefit): to nearest province company
- 市团队权益 (city team benefit): to nearest city company

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 21:49:13 -08:00
..
api feat(reward): add internal APIs for reward distribution 2025-12-10 21:49:13 -08:00
application feat(reward): add internal APIs for reward distribution 2025-12-10 21:49:13 -08:00
config refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
domain feat(reward): add internal APIs for reward distribution 2025-12-10 21:49:13 -08:00
infrastructure feat(reward): add internal APIs for reward distribution 2025-12-10 21:49:13 -08:00
shared fix: add accountSequence to all services and fix compilation errors 2025-12-10 14:14:06 -08:00
app.module.ts feat(reward): add internal APIs for reward distribution 2025-12-10 21:49:13 -08:00
main.ts fix(authorization): add Kafka microservice for @EventPattern to work 2025-12-10 10:08:55 -08:00