| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- classDiagram
- class ProductOrder {
- +Long id
- +String orderNo
- +Long productId
- +String productType
- +Long buyerId
- +String status
- +Date shippedAt
- +Date receiptRemindAt
- +Date confirmTime
- }
- class ProductReview {
- +Long id
- +Long orderId
- +Long productId
- +Long reviewerId
- +Integer rating
- +String reviewText
- +String images
- +String replyText
- +Date repliedAt
- +Long replyBy
- +Integer status
- +Date reviewAt
- }
- class ProductReviewMapper {
- +ProductReview findByOrderId(orderId)
- +List~ProductReview~ listByProduct(pid, offset, size)
- +Map statsByProduct(pid)
- }
- class ProductReviewService <<interface>> {
- +String createReview(ProductReviewRequest, Long reviewerId)
- +ProductReviewResponse detail(Long orderId, Long userId)
- +Map listByProduct(Long productId, int page, int size)
- +String reply(Long reviewId, String replyText, Long operatorId)
- +Map my(Long userId, int page, int size)
- }
- class ProductReviewServiceImpl {
- -ProductReviewMapper reviewMapper
- -ProductOrderMapper orderMapper
- -UserMapper userMapper
- }
- class ProductReviewController {
- +Result create(req, userId)
- +Result detail(params, userId)
- +Result list(params)
- +Result reply(params, userId)
- +Result my(params, userId)
- }
- class ProductOrderService {
- +Result~String~ ship(orderNo, shipType, trackingNumber, expressCompany, shippingCost, receiverContact, operatorId, operatorRoles)
- +Result confirmReceive(orderNo, userId)
- +Result~Map~ myOrderCounts(userId)
- }
- class AdminProductOrderController {
- +Result ship(params, userId, roles)
- }
- class OrderReceiptTimeoutTask {
- +void processTimeoutOrders()
- -void autoComplete()
- -void sendRemind()
- -String resolveShipTimeBase(ProductOrder)
- }
- class DatabaseInitializer {
- +void runMigrations()
- -void migrateProductReviewsTable()
- -void migrateProductOrderShippedColumns()
- }
- ProductReview o-- ProductOrder : order_id 唯一
- ProductReviewMapper --> ProductReview : CRUD
- ProductReviewServiceImpl --> ProductReviewMapper
- ProductReviewServiceImpl --> ProductReviewService : implements
- ProductReviewController --> ProductReviewService
- ProductOrderService --> ProductOrder : 读改写
- AdminProductOrderController --> ProductOrderService : 透传 operatorId/roles
- OrderReceiptTimeoutTask --> ProductOrder : 扫描/置状态
- DatabaseInitializer --> ProductReview : 建表(迁移464)
- DatabaseInitializer --> ProductOrder : 加列(迁移465)
|