Commit Graph

27 Commits

Author SHA1 Message Date
masoodafar-web 2a569a024f feat: Implement Magic Wallet functionality
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m36s
- Added ClubMembershipCycle entity and DbSet to IApplicationDbContext.
- Updated VAT rate from 9% to 10% in VatCalculator and related areas.
- Introduced Magic Wallet settings in SystemConstants.
- Enhanced UserWallet entity to support Magic Wallet features.
- Updated TransactionType enum to include Magic Wallet transactions.
- Configured UserWallet to handle Magic Wallet properties in ApplicationDbContext.
- Implemented OrmCommissionCalculationStrategy to exclude Magic Wallet users from commission calculations.
- Added Protobuf definitions for Magic Wallet methods and responses.
- Created PaymentCallbackController endpoint for handling Magic Wallet charge callbacks.
- Updated UserOrderService to manage Magic Wallet state transitions.
- Developed UserWalletService to support Magic Wallet operations.
- Created ChargeMagicWalletCommand and its handler for initiating Magic Wallet charges.
- Implemented VerifyMagicWalletChargeCommand and handler for payment verification.
- Added validation for ChargeMagicWalletCommand.
- Established ClubMembershipCycle configuration for EF Core.
- Introduced WalletMode enum to differentiate between Normal and Magic modes.
2026-02-21 19:50:28 +03:30
masoodafar-web 2502cbbda2 feat: integrate PYMS payment gateway, add blog/sitepage/image services, local file manager
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m44s
Payment Gateway:
- Add PYMSPaymentService: IPaymentGatewayService via gRPC to PYMS microservice
- Add ZarinPalPaymentService: direct ZarinPal integration (backup)
- Register 'pyms' payment provider in DI ConfigureServices
- Add PYMS proto files (pyms_transaction.proto, pyms_public_messages.proto)
- Fix VerifyDiscountWalletCharge: pass 'OK' as status instead of Authority
- Update appsettings: PaymentProvider=pyms, sandbox mode, merchant ID

Blog System:
- Add BlogCategory, BlogPost, BlogPostImage entities and CQRS
- Add proto files and gRPC services for blog management
- Add Mapster profiles for blog responses

Content Management:
- Add SitePage entity and CQRS for static pages
- Add proto and gRPC service for site pages

Image/File Management:
- Add LocalFileManager with disk storage + base64 serving + FMS fallback
- Add ImagePathResolverInterceptor for gRPC responses
- Add ImageResolverService for explicit image resolution
- Add UploadsController for public file serving with FMS fallback
- Add PaymentCallbackController for discount order payment callbacks

Database:
- Add blog and content entity migrations
- Remove ImagePath MaxLength constraints
- Remove old FileManagementService (replaced by LocalFileManager)
2026-02-15 23:01:16 +03:30
masoodafar-web d1ca72300d refactor: Remove ICurrentUserService dependency from query handlers and update user ID handling logic
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 8s
2026-02-10 23:01:49 +03:30
masoodafar-web f64b6be7da feat: Implement GetMyWeeklyBalances query and handler, enhance ClubMembership service with JWT userId handling 2026-02-08 00:24:59 +03:30
masoodafar-web 9185aa227d feat: Add discount balance and change value to wallet change log
- Added CurrentDiscountBalance and ChangeDiscountValue properties to GetCustomerWalletChangeLogResponseDto.
- Updated userwallet.proto to include current_discount_balance and change_discount_value fields.
- Enhanced CommissionProfile mapping to support GetMyCommissionPayouts requests and responses.
- Implemented GetMyCommissionPayouts query and handler to retrieve user commission payouts.
- Added validation for GetMyCommissionPayouts query.
- Updated UserOrderService to handle user orders, including VAT calculations and wallet transactions.
- Enhanced UserWalletService to include new properties in wallet change log responses.
2026-02-07 22:03:49 +03:30
masoodafar-web b2d676b555 feat: Implement customer profile and referral queries
- Add GetCustomerProfileResponseDto for retrieving customer profile information.
- Create GetCustomerReferralsQuery and GetCustomerReferralsQueryHandler to fetch customer referrals with pagination and filtering options.
- Introduce GetCustomerReferralsResponseDto to structure the response for customer referrals.
- Implement GetCustomerSettingsQuery and GetCustomerSettingsQueryHandler to retrieve user settings.
- Add GetCustomerOrder and GetCustomerOrderQueryHandler for fetching specific customer orders.
- Create GetCustomerOrderHistoryQuery and GetCustomerOrderHistoryQueryHandler to retrieve order history with filtering options.
- Implement GetCustomerOrdersQuery and GetCustomerOrdersQueryHandler for fetching multiple customer orders with filters.
- Add GetCustomerWalletChangeLogQuery and GetCustomerWalletChangeLogQueryHandler for retrieving wallet change logs.
- Implement GetCustomerWithdrawalSettingsQuery and GetCustomerWithdrawalSettingsQueryHandler for fetching withdrawal settings.
- Create GetCustomerWithdrawalsQuery and GetCustomerWithdrawalsQueryHandler to retrieve customer withdrawal requests.
2026-02-05 23:01:50 +03:30
masoodafar-web 500e169141 feat: add Id property to WeekDefinitionItemDto and map it in CommissionProfile - Enhanced week definition handling by including the Id in the DTO and mapping configuration
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m51s
2025-12-28 22:21:43 +03:30
masoodafar-web ed45a1759b feat: update user weekly balances model and mappings - Enhanced UserWeeklyBalanceModel with new properties and updated mappings in response DTO and profile
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m34s
2025-12-27 21:52:42 +03:30
masoodafar-web 02e2f8111f feat: implement Kavenegar SMS service and refactor system configurations to use static constants
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m38s
2025-12-26 09:04:27 +03:30
masoodafar-web 25476ba120 feat: implement commission calculation strategy with ORM and SP options
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m43s
2025-12-20 03:15:28 +03:30
masoodafar-web 9864302bab feat: implement user wallet charging and transaction logging for Daya loan processing 2025-12-19 23:14:42 +03:30
masoodafar-web 8b784101be feat: refactor week number handling to use WeekDefinitionId across multiple entities and queries 2025-12-19 10:41:22 +03:30
masoodafar-web 6ae1b0cd70 feat: update commission payout model with user names and timestamps
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 4m11s
2025-12-12 19:31:32 +03:30
masoodafar-web b19cf5e32e fix: use Gregorian week number for API and Persian for display
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m18s
2025-12-12 09:39:20 +03:30
masoodafar-web b1c3fcfd66 feat: add Persian calendar support for week numbers and dates
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 6m35s
2025-12-12 09:18:31 +03:30
masoodafar-web 1f6c5a1f45 fix: update default sorting from descending to ascending Created
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m43s
2025-12-12 07:49:54 +03:30
masoodafar-web 99b217d5b5 fix: change weekly balance sorting from WeekNumber to Created
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m39s
2025-12-12 07:32:22 +03:30
masoodafar-web 8ee3fe6f7b fix: update week calculation to start from Saturday
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m2s
2025-12-12 07:07:28 +03:30
masoodafar-web aba534e07c fix: update week calculation to use Saturday as the start of the week
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m12s
2025-12-12 04:37:34 +03:30
masoodafar-web db951699f8 fix: handle null pool and adjust week calculation rules
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
2025-12-12 04:22:16 +03:30
masoodafar-web ff1c1d5d61 feat: add IsActive field to UserClubFeatures for admin management 2025-12-12 01:40:26 +03:30
masoodafar-web ee1fa9d064 feat: Enhance withdrawal request handling with additional fields and network level configurations 2025-12-04 19:53:30 +03:30
masoodafar-web f0f48118e7 Add validators and services for Product Galleries and Product Tags
- Implemented Create, Delete, Get, and Update validators for Product Galleries.
- Added Create, Delete, Get, and Update validators for Product Tags.
- Created service classes for handling Discount Categories, Discount Orders, Discount Products, Discount Shopping Cart, Product Categories, Product Galleries, and Product Tags.
- Each service class integrates with CQRS for command and query handling.
- Established mapping profiles for Product Galleries.
2025-12-04 02:40:49 +03:30
masoodafar-web 78606cc5cc feat: Add ClearCart command and response, implement CancelOrder command with validation, and enhance DeliveryStatus and User models 2025-12-02 03:30:36 +03:30
masoodafar-web 25fc73ae28 feat: Enhance network membership and withdrawal processing with user tracking and logging 2025-12-01 20:52:18 +03:30
masoodafar-web 4aaf2247ff feat: Implement Approve and Reject Withdrawal commands with handlers 2025-12-01 16:48:07 +03:30
masoodafar-web 487d1ceb15 feat: Add CommissionCQ - Phase 5 Application Layer
Added 5 Commands and 4 Queries for commission calculation and payout system:

Commands:
- CalculateWeeklyBalances: Recursive binary tree traversal for leg balances
- CalculateWeeklyCommissionPool: Calculate ValuePerBalance from total pool
- ProcessUserPayouts: Distribute commission to users, create payout records
- RequestWithdrawal: User requests cash/diamond withdrawal
- ProcessWithdrawal: Admin approves/rejects withdrawal

Queries:
- GetWeeklyCommissionPool: Retrieve pool details
- GetUserCommissionPayouts: List payouts with filters (status, week, user)
- GetCommissionPayoutHistory: Complete audit trail
- GetUserWeeklyBalances: Show leg balances and contributions

Total: 35 files, ~1,100 lines of code
Binary tree algorithm, state machine, withdrawal system implemented
2025-11-29 04:32:17 +03:30