feat: Implement Discount Sales Report Query and Handler
Build and Deploy / build (push) Successful in 2m33s

- Added GetDiscountSalesReportQuery and GetDiscountSalesReportQueryHandler to fetch discount sales reports.
- Introduced DiscountSalesReportDto, SalesSummaryDto, and PeriodSalesDto for structured report data.

feat: Add Discount Product Image Management

- Created AddDiscountProductImageCommand and AddDiscountProductImageCommandHandler for image uploads.
- Implemented DeleteDiscountProductImageCommand and DeleteDiscountProductImageCommandHandler for image deletion.
- Added ReorderDiscountProductImagesCommand and ReorderDiscountProductImagesCommandHandler for image reordering.
- Developed UpdateDiscountProductImageCommand and UpdateDiscountProductImageCommandHandler for image updates.

feat: Enhance Product Tag Management

- Introduced DeleteProductTagCommand and DeleteProductTagCommandHandler for tag deletion.
- Added UpdateProductTagCommand and UpdateProductTagCommandHandler for updating product tags.
- Implemented GetAllProductTagsQuery and GetAllProductTagsQueryHandler for fetching all product tags.
- Created GetProductTagQuery and GetProductTagQueryHandler for retrieving specific product tags.

feat: Develop Web API Services for Discount and Product Management

- Implemented DiscountCategoryService for managing discount categories.
- Created DiscountOrderService for handling discount orders and related queries.
- Developed DiscountProductService for managing discount products and their images.
- Added DiscountShoppingCartService for managing shopping cart operations.
- Implemented ProductTagService for managing product tags and their associations.
- Created TagService for managing tags and their related operations.
This commit is contained in:
masoodafar-web
2026-01-01 02:26:51 +03:30
parent 721207f6a0
commit d0224d41b2
48 changed files with 1368 additions and 51 deletions
+56 -7
View File
@@ -1,22 +1,71 @@
# Plan: فعال‌سازی مرحله‌ای Handler های کامنت‌شده
**تاریخ:** 8 دسامبر 2025
**وضعیت:** در انتظار اجرا
**تعداد کل فایل‌های کامنت‌شده:** 37 فایل در 3 دسته
**وضعیت:** ✅ کامل شده
**آخرین به‌روزرسانی:** 1 ژانویه 2026
---
## خلاصه اجرایی
در `BackOffice.BFF.Application.csproj` سه دسته handler کامنت شدهاند:
در `BackOffice.BFF.Application.csproj` سه دسته handler کامنت شده بودند که همه فعال شدند:
1. **DiscountOrderCQ/** (18 فایل) - عدم تطابق Proto با CMS
2. **DiscountShoppingCartCQ/** (16 فایل) - عدم تطابق Proto
3. **CommissionCQ/Commands/ProcessWithdrawal/** (3 فایل) - مشکل تبدیل StringValue
1. **DiscountOrderCQ/** (18 فایل) - ✅ فعال شد
2. **DiscountShoppingCartCQ/** (16 فایل) - ✅ فعال شد و با CMS proto هماهنگ شد
3. **CommissionCQ/Commands/ProcessWithdrawal/** (3 فایل) - ✅ قبلاً فعال شده بود
**همچنین در BackOffice UI (1 ژانویه 2026):**
- فعال‌سازی همه سرویس‌ها در `ConfigureService.cs`
- ثبت gRPC Clients برای DiscountProduct, DiscountCategory, DiscountOrder, Tag, ProductTag, PublicMessage
- ثبت Application Services
---
## مرحله 1: ProcessWithdrawal (30 دقیقه - ساده ✅)
## تغییرات انجام‌شده (1 ژانویه 2026)
### BackOffice UI - فعال‌سازی فرانت‌اند
#### ConfigureService.cs
- فعال‌سازی using statements برای همه proto clients
- ثبت gRPC Clients در DI container
- ثبت Application Services (IDiscountProductService, IDiscountCategoryService, etc.)
#### صفحات فعال شده:
| Route | صفحه |
|-------|------|
| `/discount-products` | مدیریت محصولات تخفیفی |
| `/discount-categories` | مدیریت دسته‌بندی‌ها |
| `/discount-orders` | مدیریت سفارشات |
| `/tags` | مدیریت تگ‌ها |
| `/public-messages` | پیام‌های عمومی |
---
## تغییرات انجام‌شده (13 ژانویه 2025)
### DiscountShoppingCartCQ - اصلاحات Proto
#### RemoveFromCart
- `CartItemId``ProductId` (مطابق با proto)
#### UpdateCartItemCount
- `CartItemId``ProductId` (مطابق با proto)
#### GetUserCart Response
- حذف `UserId` از response
- `TotalDiscountedPrice``TotalDiscountAmount`
- `TotalSavings` → حذف شد
- اضافه شدن `FinalPrice`
#### CartItemDto
- حذف `Id`
- `DiscountedPrice``DiscountAmount`
- `AddedAt``Created`
- اضافه شدن `FinalPrice`, `ProductRemainingCount`
---
## مرحله 1: ProcessWithdrawal ✅ (قبلاً انجام شده)
### ویژگی بیزینسی
مدیریت درخواست‌های برداشت کمیسیون توسط ادمین (تایید/رد)