diff --git a/src/main/java/com/imyeyu/api/modules/gao/ai/service/implement/GaoAiQueryServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/ai/service/implement/GaoAiQueryServiceImplement.java index 9c2b36c..1054fd4 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/ai/service/implement/GaoAiQueryServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/ai/service/implement/GaoAiQueryServiceImplement.java @@ -38,17 +38,17 @@ import com.imyeyu.api.modules.gao.service.GaoSalesOrderService; import com.imyeyu.api.modules.gao.service.GaoStoreBusinessDayService; import com.imyeyu.api.modules.gao.service.GaoStoreDiaryService; import com.imyeyu.api.modules.gao.service.GaoStoreService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePage; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoFundRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoPointLedgerPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionPage; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductStockPage; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderChartReq; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPage; -import com.imyeyu.api.modules.gao.vo.GaoStoreDiaryPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePage; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordPage; +import com.imyeyu.api.modules.gao.vo.fund.GaoFundRecordPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointLedgerPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockPage; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderChartReq; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPage; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreDiaryPage; import com.imyeyu.spring.bean.PageResult; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerChartController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerChartController.java index 7f54169..0555ed6 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerChartController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerChartController.java @@ -4,11 +4,11 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoCustomerChartService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerChartReq; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseWordReq; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseWordView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseWordReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseWordView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerConsumptionRecordController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerConsumptionRecordController.java index 18e17c4..086e367 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerConsumptionRecordController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerConsumptionRecordController.java @@ -8,8 +8,8 @@ import com.imyeyu.api.modules.gao.entity.GaoCustomerConsumptionRecord; import com.imyeyu.api.modules.gao.service.GaoCustomerConsumptionRecordService; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerConsumptionRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerConsumptionRecordPageResult; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerConsumptionRecordPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerConsumptionRecordPageResult; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerController.java index 2207d2f..ce16d13 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerController.java @@ -8,10 +8,10 @@ import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.entity.GaoCustomer; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerTrendStateReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerGenderStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerTrendStateReq; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.TimiJava; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerFollowUpReminderController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerFollowUpReminderController.java index 1e64463..065ce9b 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerFollowUpReminderController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerFollowUpReminderController.java @@ -10,8 +10,8 @@ import com.imyeyu.api.modules.gao.entity.GaoCustomerFollowUpReminder; import com.imyeyu.api.modules.gao.service.GaoCustomerFollowUpReminderService; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerFollowUpReminderPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerFollowUpReminderPageResult; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerFollowUpReminderPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerFollowUpReminderPageResult; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java index 7bf5bda..7557466 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoCustomerPackageController.java @@ -12,9 +12,9 @@ import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoOrderFulfillmentService; import com.imyeyu.api.modules.gao.service.GaoSalesOrderService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackageCancelRequest; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePurchaseRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackageCancelRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePurchaseRequest; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoEventRecordController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoEventRecordController.java index cc64e50..7344aac 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoEventRecordController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoEventRecordController.java @@ -12,11 +12,11 @@ import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoEventRecordService; import com.imyeyu.api.modules.gao.service.GaoEventService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerEventRankView; -import com.imyeyu.api.modules.gao.vo.GaoEventOptionStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordPageResult; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordRankPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerEventRankView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventOptionStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordPage; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordPageResult; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordRankPage; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.TimiJava; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoFundRecordController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoFundRecordController.java index aa90fdb..f7659e7 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoFundRecordController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoFundRecordController.java @@ -10,9 +10,9 @@ import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoFundRecordService; import com.imyeyu.api.modules.gao.service.GaoOrderPaymentService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoFundRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoFundRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.fund.GaoFundRecordPage; +import com.imyeyu.api.modules.gao.vo.fund.GaoFundRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRevokeRequest; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserLoginService; import com.imyeyu.api.modules.user.service.UserService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoOrderFulfillmentController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoOrderFulfillmentController.java index 41d6213..ac83c86 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoOrderFulfillmentController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoOrderFulfillmentController.java @@ -14,17 +14,17 @@ import com.imyeyu.api.modules.gao.service.GaoOrderFulfillmentService; import com.imyeyu.api.modules.gao.service.GaoSalesOrderService; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentPage; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentPrepareStockRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentReturnRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentCustomerRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSkuView; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceOrderListRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceOrderView; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentActionRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentPage; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentPrepareStockRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentReturnRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentCustomerRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSkuView; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceOrderListRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceOrderView; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPackageConfigController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPackageConfigController.java index 0474edc..4e9e440 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPackageConfigController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPackageConfigController.java @@ -9,7 +9,7 @@ import com.imyeyu.api.modules.gao.service.GaoEventService; import com.imyeyu.api.modules.gao.service.GaoPackageConfigService; import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoPackageConfigPage; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageConfigPage; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointAccountController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointAccountController.java index 5e43000..52adcb1 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointAccountController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointAccountController.java @@ -5,7 +5,7 @@ import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.entity.GaoPointAccount; import com.imyeyu.api.modules.gao.service.GaoPointAccountService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoPointAccountPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAccountPage; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointLedgerController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointLedgerController.java index eaee296..67eaf5e 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointLedgerController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointLedgerController.java @@ -6,8 +6,8 @@ import com.imyeyu.api.modules.gao.entity.GaoPointLedger; import com.imyeyu.api.modules.gao.service.GaoPointLedgerService; import com.imyeyu.api.modules.gao.service.GaoPointTriggerService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoPointAdjustRequest; -import com.imyeyu.api.modules.gao.vo.GaoPointLedgerPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAdjustRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointLedgerPage; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedeemSkuController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedeemSkuController.java index 7f583b3..5429a60 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedeemSkuController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedeemSkuController.java @@ -5,9 +5,9 @@ import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.entity.GaoPointRedeemSku; import com.imyeyu.api.modules.gao.service.GaoPointRedeemSkuService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPageResult; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPageResult; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuRequest; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedemptionController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedemptionController.java index 2b15b6a..285ae6d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedemptionController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoPointRedemptionController.java @@ -6,9 +6,9 @@ import com.imyeyu.api.modules.gao.entity.GaoPointRedemption; import com.imyeyu.api.modules.gao.entity.GaoPointRedemptionReturn; import com.imyeyu.api.modules.gao.service.GaoPointRedemptionService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionReturnRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionCreateRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionReturnRequest; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductChartController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductChartController.java index 5381646..2669f16 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductChartController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductChartController.java @@ -4,16 +4,16 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoProductChartService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductTypeStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductTypeStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductUnitSalesRankView; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductController.java index ecee578..7529f65 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductController.java @@ -12,9 +12,9 @@ import com.imyeyu.api.modules.gao.service.GaoProductSpecService; import com.imyeyu.api.modules.gao.entity.GaoProductSpec; import com.imyeyu.api.modules.gao.entity.GaoProductSpecValue; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryPage; -import com.imyeyu.api.modules.gao.vo.GaoProductPage; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentView; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductSkuChartController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductSkuChartController.java index 7f6d42c..c3a2470 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductSkuChartController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductSkuChartController.java @@ -4,14 +4,14 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoProductSkuChartService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSalesRankView; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductStockController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductStockController.java index cfc82bb..3a58440 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductStockController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoProductStockController.java @@ -7,14 +7,14 @@ import com.imyeyu.api.modules.gao.entity.GaoProductStockRecord; import com.imyeyu.api.modules.gao.service.GaoProductStockService; import com.imyeyu.api.modules.gao.service.GaoProductStockRecordService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoProductStockBatchRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockChangeRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockManualInBatchRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockManualRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockProductView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordPageResult; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockBatchRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockChangeRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockManualInBatchRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockManualRevokeRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockProductView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordPageResult; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleAccountController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleAccountController.java index 7a51c82..14aab49 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleAccountController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleAccountController.java @@ -6,138 +6,137 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.entity.GaoCustomer; import com.imyeyu.api.modules.gao.mapper.GaoRecycleAccountMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleProductYieldMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleItemMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerService; -import com.imyeyu.api.modules.gao.service.GaoRecycleAccountService; -import com.imyeyu.api.modules.gao.service.GaoRecycleLedgerService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoRecycleAccountAdjustRequest; +import com.imyeyu.api.modules.gao.entity.GaoRecycleAccount; +import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; +import com.imyeyu.api.modules.gao.entity.GaoRecycleProductYield; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleAccountCustomerPage; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleAccountCustomerPageResult; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleAccountCustomerView; import com.imyeyu.java.bean.timi.TimiException; +import com.imyeyu.utils.Time; import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import java.math.BigDecimal; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.UUID; -import com.imyeyu.utils.Time; /// 客户回收物额度接口 @RestController @RequiredArgsConstructor @RequestMapping("/gao/recycle/account") public class GaoRecycleAccountController { - private final GaoRecycleAccountMapper mapper; - private final GaoRecycleAccountService service; - private final GaoRecycleLedgerService ledgerService; - private final GaoStoreScopeService scope; - private final GaoCustomerService customerService; - private final AttachmentService attachmentService; + private final GaoRecycleAccountMapper mapper; + private final GaoRecycleProductYieldMapper yieldMapper; + private final GaoRecycleItemMapper itemMapper; + private final GaoStoreScopeService scope; + private final GaoCustomerService customerService; + private final AttachmentService attachmentService; - @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) - @PostMapping("/yield/list") - public List> yields(@RequestParam String storeId, @RequestParam String skuId) { - scope.checkStoreId(storeId); - List> rows = mapper.yieldList(storeId, skuId); - List itemIds = rows.stream().map(row -> (String) row.get("recycleItemId")).filter(java.util.Objects::nonNull).distinct().toList(); - if (!itemIds.isEmpty()) { - Map> attachments = attachmentService.mapByBizIdList(Attachment.BizType.GAO_RECYCLE_ITEM, itemIds); - rows.forEach(row -> row.put("attachmentList", attachments.getOrDefault(row.get("recycleItemId"), List.of()))); - } - return rows; - } + @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) + @PostMapping("/yield/list") + public List yields(@RequestParam String storeId, @RequestParam String skuId) { + scope.checkStoreId(storeId); + List rows = yieldMapper.yieldList(storeId, skuId); + List ids = rows.stream().map(GaoRecycleProductYield::getRecycleItemId).filter(Objects::nonNull).distinct().toList(); + if (!ids.isEmpty()) { + Map> attachments = attachmentService.mapByBizIdList(Attachment.BizType.GAO_RECYCLE_ITEM, ids); + rows.forEach(row -> row.setAttachmentList(attachments.getOrDefault(row.getRecycleItemId(), List.of()))); + } + return rows; + } - /// 产品详情里配置产出回收物用的批量查询,一次返回该产品所有 SKU 的产出行 - @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) - @PostMapping("/yield/product/list") - public List> yieldsByProduct(@RequestParam String storeId, @RequestParam String productId) { - scope.checkStoreId(storeId); - return mapper.yieldListByProduct(storeId, productId); - } + /// 产品所有 SKU 的产出行 + @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) + @PostMapping("/yield/product/list") + public List yieldsByProduct(@RequestParam String storeId, @RequestParam String productId) { + scope.checkStoreId(storeId); + return yieldMapper.yieldListByProduct(storeId, productId); + } - @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) - @PostMapping("/yield/save") - public void saveYield(@RequestParam String storeId, @RequestParam String skuId, @RequestParam String recycleItemId, @RequestParam BigDecimal quantityPerBase) { - scope.checkStoreId(storeId); - // 额度按三位小数记账,比例精度高于额度会让换算结果必然超出精度 - TimiException.requiredTrue(0 < quantityPerBase.signum() && !(3 < quantityPerBase.stripTrailingZeros().scale()) - && !(12 < quantityPerBase.precision() - quantityPerBase.scale()), "产物数量比例最多保留三位小数"); - TimiException.requiredTrue(mapper.validYield(storeId, skuId, recycleItemId) == 1, "商品或回收物不属于当前门店"); - mapper.saveYield(UUID.randomUUID().toString(), storeId, skuId, recycleItemId, quantityPerBase, Time.now()); - } + @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) + @PostMapping("/yield/save") + public void saveYield(@RequestParam String storeId, @RequestParam String skuId, @RequestParam String recycleItemId, @RequestParam BigDecimal quantityPerBase) { + scope.checkStoreId(storeId); + var quantity = quantityPerBase; + TimiException.requiredTrue(quantity != null && 0 < quantity.signum() && !(3 < quantity.stripTrailingZeros().scale()) + && !(12 < quantity.precision() - quantity.scale()), "产物数量比例最多保留三位小数"); + TimiException.requiredTrue(yieldMapper.validYield(storeId, skuId, recycleItemId) == 1, "商品或回收物不属于当前门店"); + yieldMapper.saveYield(UUID.randomUUID().toString(), storeId, skuId, recycleItemId, quantity, Time.now()); + } - @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) - @PostMapping("/yield/delete") - public void deleteYield(@RequestParam String storeId, @RequestParam String skuId, @RequestParam String recycleItemId) { - scope.checkStoreId(storeId); - mapper.deleteYield(storeId, skuId, recycleItemId, Time.now()); - } + @RequireGaoPermission(GaoPermissionCode.RECYCLE_EXCHANGE_CONFIG_MANAGE) + @PostMapping("/yield/delete") + public void deleteYield(@RequestParam String storeId, @RequestParam String skuId, @RequestParam String recycleItemId) { + scope.checkStoreId(storeId); + yieldMapper.deleteYield(storeId, skuId, recycleItemId, Time.now()); + } - @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) - @PostMapping("/list") - public List> list(@RequestParam String storeId, @RequestParam String customerId) { - checkCustomer(storeId, customerId); - return mapper.listAccounts(storeId, customerId); - } + @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) + @PostMapping("/list") + public List list(@RequestParam String storeId, @RequestParam String customerId) { + checkCustomer(storeId, customerId); + return mapper.listAccounts(storeId, customerId); + } - /// 按客户分页返回额度,汇总按回收物分别计算,避免混加不同单位。 - @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) - @PostMapping("/customers") - public Map customers(@RequestParam String storeId, @RequestParam(required = false) String recycleItemId, - @RequestParam(required = false) String keyword, @RequestParam(required = false) List customerIds, @RequestParam(defaultValue = "0") int offset, @RequestParam(defaultValue = "20") int limit) { - scope.checkStoreId(storeId); - int safeOffset = Math.max(0, offset); - int safeLimit = Math.max(1, Math.min(limit, 100)); - List ids = mapper.customerPage(storeId, recycleItemId, keyword, customerIds, safeOffset, safeLimit); - List> rows = new java.util.ArrayList<>(); - if (!ids.isEmpty()) { - Map customers = customerService.mapByIdList(ids); - Map> photos = attachmentService.mapByBizIdList(Attachment.BizType.GAO_CUSTOMER, ids, GaoCustomer.AttachType.PHOTO.name()); - List> accounts = mapper.customerAccounts(storeId, ids, recycleItemId); - for (String id : ids) { - GaoCustomer customer = customers.get(id); - if (customer == null) continue; - customer.setAttachmentList(photos.getOrDefault(id, List.of())); - rows.add(Map.of("customer", customer, "accounts", accounts.stream().filter(account -> id.equals(account.get("customerId"))).toList())); - } - } - return Map.of("list", rows, "total", mapper.customerCount(storeId, recycleItemId, keyword, customerIds), "totals", mapper.accountTotals(storeId, keyword, customerIds)); - } + /// 按客户分页返回额度,汇总按回收物分别计算 + @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) + @PostMapping("/customers") + public GaoRecycleAccountCustomerPageResult customers(@RequestBody GaoRecycleAccountCustomerPage query) { + String storeId = query.getStoreId(); + scope.checkStoreId(storeId); + long limit = Math.max(1, Math.min(query.getLimit(), 100)); + long offset = (long) Math.max(0, query.getIndex()) * limit; + List ids = mapper.customerPage(storeId, query.getRecycleItemId(), query.getKeyword(), query.getCustomerIds(), offset, limit); + List rows = new ArrayList<>(); + if (!ids.isEmpty()) { + Map customers = customerService.mapByIdList(ids); + Map> photos = attachmentService.mapByBizIdList(Attachment.BizType.GAO_CUSTOMER, ids, GaoCustomer.AttachType.PHOTO.name()); + List accounts = mapper.customerAccounts(storeId, ids, query.getRecycleItemId()); + for (String id : ids) { + GaoCustomer customer = customers.get(id); + if (customer == null) continue; + customer.setAttachmentList(photos.getOrDefault(id, List.of())); + GaoRecycleAccountCustomerView row = new GaoRecycleAccountCustomerView(); + row.setCustomer(customer); + row.setAccounts(accounts.stream().filter(account -> id.equals(account.getCustomerId())).toList()); + rows.add(row); + } + } + GaoRecycleAccountCustomerPageResult result = new GaoRecycleAccountCustomerPageResult(); + result.setList(rows); + result.setTotal(mapper.customerCount(storeId, query.getRecycleItemId(), query.getKeyword(), query.getCustomerIds())); + result.setTotals(mapper.accountTotals(storeId, query.getKeyword(), query.getCustomerIds())); + return result; + } - @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) - @PostMapping("/items") - public List> accountItems(@RequestParam String storeId) { - scope.checkStoreId(storeId); - List> items = mapper.accountItems(storeId); - List ids = items.stream().map(item -> (String) item.get("id")).filter(java.util.Objects::nonNull).toList(); - if (!ids.isEmpty()) { - Map> attachments = attachmentService.mapByBizIdList(Attachment.BizType.GAO_RECYCLE_ITEM, ids); - items.forEach(item -> item.put("attachmentList", attachments.getOrDefault(item.get("id"), List.of()))); - } - return items; - } + @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) + @PostMapping("/items") + public List accountItems(@RequestParam String storeId) { + scope.checkStoreId(storeId); + List items = itemMapper.accountItems(storeId); + List ids = items.stream().map(GaoRecycleItem::getId).filter(Objects::nonNull).toList(); + if (!ids.isEmpty()) { + Map> attachments = attachmentService.mapByBizIdList(Attachment.BizType.GAO_RECYCLE_ITEM, ids); + items.forEach(item -> item.setAttachmentList(attachments.getOrDefault(item.getId(), List.of()))); + } + return items; + } - @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) - @PostMapping("/ledger") - public List> ledger(@RequestParam String storeId, @RequestParam String customerId) { - checkCustomer(storeId, customerId); - return ledgerService.listLedger(storeId, customerId); - } - - @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_ADJUST) - @PostMapping("/adjust") - public void adjust(@RequestBody GaoRecycleAccountAdjustRequest request) { - TimiException.required(request, "请求不能为空"); - checkCustomer(request.getStoreId(), request.getCustomerId()); - TimiException.requiredTrue(request.getReason() != null && !request.getReason().isBlank(), "调整原因不能为空"); - TimiException.requiredTrue(request.getQuantity() != null && request.getQuantity().signum() != 0, "调整数量不能为零"); - TimiException.requiredTrue(request.getRequestNo() != null && !request.getRequestNo().isBlank() && !(128 < request.getRequestNo().length()), "请求号无效"); - TimiException.requiredTrue(mapper.validItem(request.getStoreId(), request.getRecycleItemId()) == 1, "回收物不属于当前门店"); - String bizId = UUID.nameUUIDFromBytes(request.getRequestNo().getBytes(java.nio.charset.StandardCharsets.UTF_8)).toString(); - service.change(request.getStoreId(), request.getCustomerId(), request.getRecycleItemId(), request.getQuantity(), BigDecimal.ZERO, "MANUAL", bizId, request.getRequestNo(), request.getReason()); - } - - private void checkCustomer(String storeId, String customerId) { - scope.checkStoreId(storeId); - GaoCustomer customer = customerService.get(customerId); - TimiException.requiredTrue(customer != null && storeId.equals(customer.getStoreId()), "客户不属于当前门店"); - } + private void checkCustomer(String storeId, String customerId) { + scope.checkStoreId(storeId); + GaoCustomer customer = customerService.get(customerId); + TimiException.requiredTrue(customer != null && storeId.equals(customer.getStoreId()), "客户不属于当前门店"); + } } diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleConfigController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleConfigController.java index 3c1390e..21384db 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleConfigController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleConfigController.java @@ -5,8 +5,8 @@ import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRule; import com.imyeyu.api.modules.gao.service.GaoRecycleConfigService; -import com.imyeyu.api.modules.gao.vo.GaoRecycleItemRequest; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeRuleRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleItemRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeRuleRequest; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeQueryController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeQueryController.java index 72cf4b2..b684fc4 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeQueryController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeQueryController.java @@ -4,7 +4,7 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoRecycleExchangeQueryService; import com.imyeyu.api.modules.gao.service.GaoRecycleExchangeViewService; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeDetail; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeDetail; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeWriteController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeWriteController.java index 5417cdb..3f6d2e0 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeWriteController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleExchangeWriteController.java @@ -5,7 +5,7 @@ import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchange; import com.imyeyu.api.modules.gao.service.GaoRecycleExchangeWriteService; import com.imyeyu.api.modules.gao.service.GaoRecycleExchangeViewService; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeCreateRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeCreateRequest; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleLedgerController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleLedgerController.java new file mode 100644 index 0000000..d7b3f49 --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleLedgerController.java @@ -0,0 +1,58 @@ +package com.imyeyu.api.modules.gao.controller; + +import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; +import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; +import com.imyeyu.api.modules.gao.entity.GaoCustomer; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger.BizType; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleItemMapper; +import com.imyeyu.api.modules.gao.service.GaoRecycleAccountService; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleAccountAdjustRequest; +import java.math.BigDecimal; +import java.util.UUID; +import com.imyeyu.api.modules.gao.service.GaoCustomerService; +import com.imyeyu.api.modules.gao.service.GaoRecycleLedgerService; +import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleLedgerPage; +import com.imyeyu.java.bean.timi.TimiException; +import com.imyeyu.spring.bean.PageResult; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +/// 回收物额度流水接口 +@RestController +@RequiredArgsConstructor +@RequestMapping("/gao/recycle/ledger") +public class GaoRecycleLedgerController { + private final GaoRecycleLedgerService service; + private final GaoRecycleAccountService accountService; + private final GaoRecycleItemMapper mapper; + private final GaoStoreScopeService scope; + private final GaoCustomerService customerService; + + @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_READ) + @PostMapping("/list") + public PageResult list(@RequestBody GaoRecycleLedgerPage page) { + TimiException.required(page, "请求不能为空"); + checkCustomer(page.getStoreId(), page.getCustomerId()); + return service.pageByQuery(page); + } + @RequireGaoPermission(GaoPermissionCode.RECYCLE_ACCOUNT_ADJUST) + @PostMapping("/adjust") + public void adjust(@RequestBody GaoRecycleAccountAdjustRequest request) { + TimiException.required(request, "请求不能为空"); + checkCustomer(request.getStoreId(), request.getCustomerId()); + TimiException.requiredTrue(request.getReason() != null && !request.getReason().isBlank(), "调整原因不能为空"); + TimiException.requiredTrue(request.getQuantity() != null && request.getQuantity().signum() != 0, "调整数量不能为零"); + TimiException.requiredTrue(request.getRequestNo() != null && !request.getRequestNo().isBlank() && !(128 < request.getRequestNo().length()), "请求号无效"); + TimiException.requiredTrue(mapper.validItem(request.getStoreId(), request.getRecycleItemId()) == 1, "回收物不属于当前门店"); + String bizId = UUID.nameUUIDFromBytes(request.getRequestNo().getBytes(java.nio.charset.StandardCharsets.UTF_8)).toString(); + accountService.change(request.getStoreId(), request.getCustomerId(), request.getRecycleItemId(), request.getQuantity(), BigDecimal.ZERO, BizType.MANUAL, bizId, request.getRequestNo(), request.getReason()); + } + + private void checkCustomer(String storeId, String customerId) { + scope.checkStoreId(storeId); + GaoCustomer customer = customerService.get(customerId); + TimiException.requiredTrue(customer != null && storeId.equals(customer.getStoreId()), "客户不属于当前门店"); + } +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecyclePaymentController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecyclePaymentController.java index 52ed32b..ba1f8b5 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecyclePaymentController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecyclePaymentController.java @@ -4,7 +4,7 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.entity.GaoRecyclePayment; import com.imyeyu.api.modules.gao.service.GaoRecyclePaymentService; -import com.imyeyu.api.modules.gao.vo.GaoRecyclePaymentRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecyclePaymentRequest; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RequestParam; import com.imyeyu.api.bean.PermissionMatchMode; -import com.imyeyu.api.modules.gao.vo.GaoOrderTransactionView; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderTransactionView; import com.imyeyu.api.modules.user.service.PermissionChecker; import com.imyeyu.api.bean.ModuleCode; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleStatController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleStatController.java index b221a18..d8c6091 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleStatController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoRecycleStatController.java @@ -3,8 +3,8 @@ package com.imyeyu.api.modules.gao.controller; import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoRecycleStatService; -import com.imyeyu.api.modules.gao.vo.GaoRecycleStatView; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeStatView; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleStatView; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeStatView; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderChartController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderChartController.java index a01ec67..c36cc27 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderChartController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderChartController.java @@ -4,19 +4,19 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoSalesOrderChartService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderSkuRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatIntervalStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderChartReq; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCalendarStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderConsumptionDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPaymentStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderStatusStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderTypeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderProductRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderSkuRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatDailyStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatIntervalStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderChartReq; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCalendarStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderConsumptionDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPaymentStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderStatusStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderTypeStatView; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderController.java index bbd0e00..c903064 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoSalesOrderController.java @@ -9,21 +9,21 @@ import com.imyeyu.api.modules.gao.entity.GaoFundRecord; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import com.imyeyu.api.modules.gao.service.GaoOrderPaymentService; import com.imyeyu.api.modules.gao.service.GaoRecycleExchangeWriteService; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeActionRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeActionRequest; import com.imyeyu.api.modules.gao.service.GaoSalesOrderService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoDirectProductOrderCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductCustomerView; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentNoRefundRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentReceiveRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRefundRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCancelRequest; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPage; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderUpdateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoDirectProductOrderCreateRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductCustomerView; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentActionRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentNoRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentReceiveRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCancelRequest; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPage; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderUpdateRequest; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.TimiJava; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreChartController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreChartController.java index f4539f9..fef17b3 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreChartController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreChartController.java @@ -5,15 +5,15 @@ import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoPointChartService; import com.imyeyu.api.modules.gao.service.GaoStoreChartService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerAgeStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoPointDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerAgeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerGenderStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordNumberValueDailyStatView; +import com.imyeyu.api.modules.gao.vo.point.GaoPointDailyStatView; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionProductRankView; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.annotation.AOPLog; import com.imyeyu.spring.annotation.RequestRateLimit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreDiaryController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreDiaryController.java index 9d66a39..28860cc 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreDiaryController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoStoreDiaryController.java @@ -8,7 +8,7 @@ import com.imyeyu.api.modules.gao.annotation.RequireGaoPermission; import com.imyeyu.api.modules.gao.bean.GaoPermissionCode; import com.imyeyu.api.modules.gao.service.GaoStoreDiaryService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoStoreDiaryPage; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreDiaryPage; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserLoginService; import com.imyeyu.api.modules.user.service.UserService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoUserController.java b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoUserController.java index a739f82..4cb96be 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/controller/GaoUserController.java +++ b/src/main/java/com/imyeyu/api/modules/gao/controller/GaoUserController.java @@ -10,12 +10,12 @@ import com.imyeyu.api.modules.gao.entity.GaoUser; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; import com.imyeyu.api.modules.gao.service.GaoUserInviteService; import com.imyeyu.api.modules.gao.service.GaoUserService; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteCreateResponse; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteRegisterData; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteRegisterRequest; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteValidateRequest; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteValidateResponse; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteCreateRequest; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteCreateResponse; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteRegisterData; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteRegisterRequest; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteValidateRequest; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteValidateResponse; import com.imyeyu.api.modules.user.entity.Role; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.AuthorizationScopeService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleAccount.java b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleAccount.java new file mode 100644 index 0000000..b6cedc9 --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleAccount.java @@ -0,0 +1,24 @@ +package com.imyeyu.api.modules.gao.entity; + +import com.imyeyu.spring.annotation.table.Transient; +import com.imyeyu.spring.entity.UUIDEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/// 客户回收物额度账户 +@Data +@EqualsAndHashCode(callSuper = true) +public class GaoRecycleAccount extends UUIDEntity { + + private String storeId; + private String customerId; + private String recycleItemId; + private BigDecimal balance; + private BigDecimal reserved; + @Transient + private String recycleName; + @Transient + private String recycleUnit; +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeAction.java b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeAction.java index 762703d..b36f0e4 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeAction.java +++ b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeAction.java @@ -2,15 +2,22 @@ package com.imyeyu.api.modules.gao.entity; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.spring.annotation.table.Transient; -import com.imyeyu.spring.entity.UUIDEntity; +import com.imyeyu.spring.annotation.table.Id; +import com.imyeyu.spring.annotation.table.AutoUUID; +import com.imyeyu.spring.entity.IDEntity; +import com.imyeyu.spring.entity.Creatable; import lombok.Data; import java.math.BigDecimal; -import lombok.EqualsAndHashCode; /// 回收兑换操作记录 @Data -@EqualsAndHashCode(callSuper = true) -public class GaoRecycleExchangeAction extends UUIDEntity { +public class GaoRecycleExchangeAction implements IDEntity, Creatable { + + @Id + @AutoUUID + private String id; + private Long createdAt; + /// 撤销后门店最终保留的回收物数量 private BigDecimal retainedRecycleQuantity; diff --git a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRule.java b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRule.java index b96223d..68a4bbf 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRule.java +++ b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRule.java @@ -1,18 +1,27 @@ package com.imyeyu.api.modules.gao.entity; -import com.imyeyu.spring.annotation.table.Transient; -import com.imyeyu.spring.entity.UUIDEntity; import com.imyeyu.api.modules.common.entity.Attachment; +import com.imyeyu.spring.annotation.table.AutoUUID; +import com.imyeyu.spring.annotation.table.Id; +import com.imyeyu.spring.annotation.table.Transient; +import com.imyeyu.spring.entity.Creatable; +import com.imyeyu.spring.entity.IDEntity; +import com.imyeyu.spring.entity.Updatable; import lombok.Data; -import lombok.EqualsAndHashCode; import java.math.BigDecimal; import java.util.List; /// 回收兑换规则 @Data -@EqualsAndHashCode(callSuper = true) -public class GaoRecycleExchangeRule extends UUIDEntity { +public class GaoRecycleExchangeRule implements IDEntity, Creatable, Updatable { + + @Id + @AutoUUID + private String id; + private Long createdAt; + private Long updatedAt; + /// 兑换模板明细 @Transient private List itemList; diff --git a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRuleItem.java b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRuleItem.java index 8ca5a19..ffabca7 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRuleItem.java +++ b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleExchangeRuleItem.java @@ -1,13 +1,20 @@ package com.imyeyu.api.modules.gao.entity; import lombok.Data; +import com.imyeyu.spring.annotation.table.Id; +import com.imyeyu.spring.annotation.table.AutoUUID; +import com.imyeyu.spring.annotation.table.Transient; +import com.imyeyu.spring.entity.IDEntity; +import com.imyeyu.spring.entity.Creatable; import java.math.BigDecimal; /// 回收兑换模板明细 @Data -public class GaoRecycleExchangeRuleItem { +public class GaoRecycleExchangeRuleItem implements IDEntity, Creatable { + @Id + @AutoUUID private String id; private String ruleId; private String skuId; @@ -16,19 +23,27 @@ public class GaoRecycleExchangeRuleItem { private Integer sort; private Long createdAt; /// 展示用产品名称 + @Transient private String productName; /// 展示用 SKU 名称 + @Transient private String skuName; /// 展示用规格摘要 + @Transient private String specSummary; /// 展示用单位名称 + @Transient private String unitName; /// 展示用 SKU 编码 + @Transient private String skuCode; /// 展示用产品类型 + @Transient private String productType; /// true 为启用库存管理 + @Transient private Boolean stockEnabled; /// true 为允许小数数量 + @Transient private Boolean allowDecimalQuantity; } diff --git a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleItem.java b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleItem.java index d30cbac..76e904e 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleItem.java +++ b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleItem.java @@ -1,16 +1,25 @@ package com.imyeyu.api.modules.gao.entity; -import com.imyeyu.spring.entity.UUIDEntity; +import com.imyeyu.spring.annotation.table.Id; +import com.imyeyu.spring.annotation.table.AutoUUID; +import com.imyeyu.spring.entity.IDEntity; +import com.imyeyu.spring.entity.Creatable; +import com.imyeyu.spring.entity.Updatable; import com.imyeyu.api.modules.common.entity.Attachment; import com.imyeyu.spring.annotation.table.Transient; import java.util.List; import lombok.Data; -import lombok.EqualsAndHashCode; /// 回收物类型 @Data -@EqualsAndHashCode(callSuper = true) -public class GaoRecycleItem extends UUIDEntity { +public class GaoRecycleItem implements IDEntity, Creatable, Updatable { + + @Id + @AutoUUID + private String id; + private Long createdAt; + private Long updatedAt; + /// 状态 public enum Status { diff --git a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleLedger.java b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleLedger.java index 4e2d219..9a890ef 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleLedger.java +++ b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleLedger.java @@ -11,21 +11,42 @@ import java.math.BigDecimal; /// 回收物额度流水 @Data public class GaoRecycleLedger implements IDEntity, Creatable { - @Id - @AutoUUID - private String id; - private String accountId; - private String storeId; - private String customerId; - private String recycleItemId; - private String bizType; - private String bizId; - private String requestNo; - private BigDecimal balanceDelta; - private BigDecimal reservedDelta; - private BigDecimal balanceAfter; - private BigDecimal reservedAfter; - private String operatorUserId; - private String reason; - private Long createdAt; + + /// 流水业务类型;ADJUST 对应建表定义中的人工调整类型。 + public enum BizType { + /// 履约产生回收物额度 + FULFILLMENT_YIELD, + /// 履约冲正扣回回收物额度 + FULFILLMENT_REVOKE, + /// 人工调整回收物额度 + MANUAL, + /// 人工调整回收物额度(建表定义类型) + ADJUST, + /// 回收物支付预占额度 + PAYMENT_RESERVE, + /// 撤销或拒绝支付时释放预占额度 + PAYMENT_RELEASE, + /// 回收物支付核销额度 + PAYMENT_VERIFY, + /// 回收物支付冲正返还额度 + PAYMENT_REVOKE + } + + @Id + @AutoUUID + private String id; + private String accountId; + private String storeId; + private String customerId; + private String recycleItemId; + private BizType bizType; + private String bizId; + private String requestNo; + private BigDecimal balanceDelta; + private BigDecimal reservedDelta; + private BigDecimal balanceAfter; + private BigDecimal reservedAfter; + private String operatorUserId; + private String reason; + private Long createdAt; } diff --git a/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleProductYield.java b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleProductYield.java new file mode 100644 index 0000000..f4bd190 --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/entity/GaoRecycleProductYield.java @@ -0,0 +1,33 @@ +package com.imyeyu.api.modules.gao.entity; + +import com.imyeyu.api.modules.common.entity.Attachment; +import com.imyeyu.spring.annotation.table.Transient; +import com.imyeyu.spring.entity.UUIDEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.List; + +/// 商品 SKU 的回收物产出配置 +@Data +@EqualsAndHashCode(callSuper = true) +public class GaoRecycleProductYield extends UUIDEntity { + + private String storeId; + private String skuId; + private String recycleItemId; + private BigDecimal quantityPerBase; + @Transient + private String skuName; + @Transient + private String skuSpecSummary; + @Transient + private String recycleName; + @Transient + private String recycleUnit; + @Transient + private Boolean allowDecimalQuantity; + @Transient + private List attachmentList; +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerConsumptionRecordMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerConsumptionRecordMapper.java index 66c3955..853697a 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerConsumptionRecordMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerConsumptionRecordMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoCustomerConsumptionRecord; -import com.imyeyu.api.modules.gao.vo.GaoCustomerConsumptionRecordPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerConsumptionRecordPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerFollowUpReminderMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerFollowUpReminderMapper.java index 9ccc91d..9cc0473 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerFollowUpReminderMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerFollowUpReminderMapper.java @@ -2,7 +2,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoCustomer; import com.imyeyu.api.modules.gao.entity.GaoCustomerFollowUpReminder; -import com.imyeyu.api.modules.gao.vo.GaoCustomerFollowUpReminderPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerFollowUpReminderPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerMapper.java index c421223..9ff1656 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerMapper.java @@ -1,12 +1,12 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoCustomer; -import com.imyeyu.api.modules.gao.vo.GaoCustomerAgeStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateCustomerView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseTextView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerAgeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateCustomerView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseTextView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerGenderStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Update; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerPackageMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerPackageMapper.java index 1e8155b..68eef9e 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerPackageMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoCustomerPackageMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoCustomerPackage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoEventRecordMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoEventRecordMapper.java index c71dc64..1a1e8b5 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoEventRecordMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoEventRecordMapper.java @@ -1,15 +1,15 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoEventRecord; -import com.imyeyu.api.modules.gao.vo.GaoCustomerChartReq; -import com.imyeyu.api.modules.gao.vo.GaoCustomerEventRankView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordRankPage; -import com.imyeyu.api.modules.gao.vo.GaoEventOptionStatView; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerEventRankView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordNumberValueDailyStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordPage; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordRankPage; +import com.imyeyu.api.modules.gao.vo.event.GaoEventOptionStatView; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoFundRecordMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoFundRecordMapper.java index 31d1289..0d16ae8 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoFundRecordMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoFundRecordMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoFundRecord; -import com.imyeyu.api.modules.gao.vo.GaoFundRecordPage; +import com.imyeyu.api.modules.gao.vo.fund.GaoFundRecordPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderFulfillmentMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderFulfillmentMapper.java index 5f5f6a1..978532c 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderFulfillmentMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderFulfillmentMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoOrderFulfillment; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentPage; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderReminderMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderReminderMapper.java index 4a05dd2..af44742 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderReminderMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoOrderReminderMapper.java @@ -1,6 +1,6 @@ package com.imyeyu.api.modules.gao.mapper; -import com.imyeyu.api.modules.gao.vo.GaoOrderReminderCustomer; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderReminderCustomer; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPackageConfigMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPackageConfigMapper.java index 5d8ac9b..705167e 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPackageConfigMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPackageConfigMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoPackageConfig; -import com.imyeyu.api.modules.gao.vo.GaoPackageConfigPage; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageConfigPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointAccountMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointAccountMapper.java index e5d1edd..168c763 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointAccountMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointAccountMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoPointAccount; -import com.imyeyu.api.modules.gao.vo.GaoPointAccountPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAccountPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointChartMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointChartMapper.java index 3749beb..749e2dc 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointChartMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointChartMapper.java @@ -1,8 +1,8 @@ package com.imyeyu.api.modules.gao.mapper; -import com.imyeyu.api.modules.gao.vo.GaoPointDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.point.GaoPointDailyStatView; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionProductRankView; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointLedgerMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointLedgerMapper.java index 4a8e7c8..e98998f 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointLedgerMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointLedgerMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoPointLedger; -import com.imyeyu.api.modules.gao.vo.GaoPointLedgerPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointLedgerPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedeemSkuMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedeemSkuMapper.java index b4eb63d..f1cc35c 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedeemSkuMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedeemSkuMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoPointRedeemSku; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedemptionMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedemptionMapper.java index f25f864..5c80e0a 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedemptionMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoPointRedemptionMapper.java @@ -1,8 +1,8 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoPointRedemption; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPageResult; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPageResult; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductCategoryMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductCategoryMapper.java index 8b83fdc..9d53695 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductCategoryMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductCategoryMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoProductCategory; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductChartMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductChartMapper.java index f5e0924..b4051df 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductChartMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductChartMapper.java @@ -1,15 +1,15 @@ package com.imyeyu.api.modules.gao.mapper; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductTypeStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductTypeStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductUnitSalesRankView; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductMapper.java index 5841a47..33932be 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoProduct; -import com.imyeyu.api.modules.gao.vo.GaoProductPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductPage; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductSkuChartMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductSkuChartMapper.java index 171750a..d445aa8 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductSkuChartMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductSkuChartMapper.java @@ -1,13 +1,13 @@ package com.imyeyu.api.modules.gao.mapper; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSalesRankView; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockMapper.java index ee280c6..4d2b986 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockMapper.java @@ -1,8 +1,8 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoProductStock; -import com.imyeyu.api.modules.gao.vo.GaoProductStockPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockProductView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockProductView; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockRecordMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockRecordMapper.java index 5b20d93..5252dbf 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockRecordMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoProductStockRecordMapper.java @@ -1,8 +1,8 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoProductStockRecord; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordSkuSummaryView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordSkuSummaryView; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleAccountMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleAccountMapper.java index 0ee6f7f..3a41c5a 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleAccountMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleAccountMapper.java @@ -1,32 +1,17 @@ package com.imyeyu.api.modules.gao.mapper; +import com.imyeyu.api.modules.gao.entity.GaoRecycleAccount; +import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; import java.math.BigDecimal; import java.util.Map; import java.util.List; /// 回收物额度账户与流水 -public interface GaoRecycleAccountMapper { +public interface GaoRecycleAccountMapper extends BaseMapper { - @Select("SELECT COUNT(*) FROM gao_recycle_item WHERE store_id=#{store} AND id=#{item}") - int validItem(@Param("store") String store, @Param("item") String item); - - int validYield(@Param("store") String store, @Param("sku") String sku, @Param("item") String item); - - void saveYield( - @Param("id") String id, - @Param("store") String store, - @Param("sku") String sku, - @Param("item") String item, - @Param("quantity") BigDecimal quantity, - @Param("now") long now - ); - - void deleteYield(@Param("store") String store, @Param("sku") String sku, @Param("item") String item, @Param("now") long now); - - List> listAccounts(@Param("store") String store, @Param("customer") String customer); + List listAccounts(@Param("store") String store, @Param("customer") String customer); /// 按客户分页,筛选条件与汇总使用相同的有效账户范围。 List customerPage( @@ -34,27 +19,15 @@ public interface GaoRecycleAccountMapper { @Param("item") String item, @Param("keyword") String keyword, @Param("customers") List customers, - @Param("offset") int offset, - @Param("limit") int limit + @Param("offset") long offset, + @Param("limit") long limit ); long customerCount(@Param("store") String store, @Param("item") String item, @Param("keyword") String keyword, @Param("customers") List customers); - List> customerAccounts(@Param("store") String store, @Param("customers") List customers, @Param("item") String item); + List customerAccounts(@Param("store") String store, @Param("customers") List customers, @Param("item") String item); - List> accountTotals(@Param("store") String store, @Param("keyword") String keyword, @Param("customers") List customers); - - /// 额度查询权限可用的回收物选项。 - @Select("SELECT id, name, unit_name AS unitName, status FROM gao_recycle_item WHERE store_id=#{store} ORDER BY name, id") - List> accountItems(@Param("store") String store); - - List> yields(@Param("store") String store, @Param("sku") String sku); - - /// 配置页需要的字段用驼峰返回,同时带上回收物名称与单位 - List> yieldList(@Param("store") String store, @Param("sku") String sku); - - /// 产品维度的产出配置:一个产品下所有 SKU 的产出行,按 SKU 排序返回 - List> yieldListByProduct(@Param("store") String store, @Param("product") String product); + List accountTotals(@Param("store") String store, @Param("keyword") String keyword, @Param("customers") List customers); void ensure(@Param("id") String id, @Param("store") String store, @Param("customer") String customer, @Param("item") String item, @Param("now") long now); diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleConfigMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleConfigMapper.java deleted file mode 100644 index bbf42a0..0000000 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleConfigMapper.java +++ /dev/null @@ -1,166 +0,0 @@ -package com.imyeyu.api.modules.gao.mapper; - -import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; -import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRule; -import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRuleItem; -import org.apache.ibatis.annotations.Delete; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; - -import java.util.Collection; -import java.util.List; - -/// 回收配置数据访问 -public interface GaoRecycleConfigMapper { - - /// 查询模板明细 - /// - /// @param ruleId 模板 ID - /// @return 模板明细 - @Select("SELECT * FROM gao_recycle_exchange_rule_item WHERE rule_id=#{ruleId} ORDER BY sort, id") - List ruleItems(@Param("ruleId") String ruleId); - - /// 批量查询模板明细 - /// - /// @param ids 模板 ID 列表 - /// @return 模板明细 - List ruleItemsByIds(@Param("ids") Collection ids); - - /// 新增模板明细 - /// - /// @param item 模板明细 - void insertRuleItem(GaoRecycleExchangeRuleItem item); - - /// 删除模板明细 - /// - /// @param ruleId 模板 ID - @Delete("DELETE FROM gao_recycle_exchange_rule_item WHERE rule_id=#{ruleId}") - void deleteRuleItems(@Param("ruleId") String ruleId); - - /// 删除模板 - /// - /// @param storeId 门店 ID - /// @param id 模板 ID - /// @return 删除数量 - @Delete("DELETE FROM gao_recycle_exchange_rule WHERE store_id=#{storeId} AND id=#{id}") - int deleteRule(@Param("storeId") String storeId, @Param("id") String id); - - /// 分页查询回收物 - /// - /// @param storeId 门店 ID - /// @param status 状态,为空不过滤 - /// @param keyword 名称关键字,为空不过滤 - /// @param offset 分页偏移量 - /// @param limit 分页数量 - /// @return 回收物结果 - List items( - @Param("storeId") String storeId, - @Param("status") String status, - @Param("keyword") String keyword, - @Param("offset") int offset, - @Param("limit") int limit - ); - - /// 统计回收物 - /// - /// @param storeId 门店 ID - /// @param status 状态,为空不过滤 - /// @param keyword 名称关键字,为空不过滤 - /// @return 统计回收物结果 - long countItems(@Param("storeId") String storeId, @Param("status") String status, @Param("keyword") String keyword); - - /// 按 ID 批量查询回收物 - /// - /// @param storeId 门店 ID - /// @param idList 回收物 ID 列表 - /// @return 回收物结果 - List itemsByIdList(@Param("storeId") String storeId, @Param("idList") Collection idList); - - /// 查询回收物 - /// - /// @param storeId 门店 ID - /// @param id 记录 ID - /// @return 回收物结果 - @Select("SELECT * FROM gao_recycle_item WHERE store_id = #{storeId} AND id = #{id}") - GaoRecycleItem itemById(@Param("storeId") String storeId, @Param("id") String id); - - /// 锁定回收物 - /// - /// @param storeId 门店 ID - /// @param id 记录 ID - /// @return 锁定回收物结果 - @Select("SELECT * FROM gao_recycle_item WHERE store_id = #{storeId} AND id = #{id} FOR UPDATE") - GaoRecycleItem item(@Param("storeId") String storeId, @Param("id") String id); - - /// 创建回收物 - /// - /// @param item 回收物 - void insertItem(GaoRecycleItem item); - - /// 更新回收物 - /// - /// @param item 回收物 - void updateItem(GaoRecycleItem item); - - /// 分页查询兑换规则 - /// - /// @param storeId 门店 ID - /// @param status 规则状态,为空不过滤 - /// @param recycleItemId 回收物 ID,为空不过滤 - /// @param skuId 兑换 SKU ID,为空不过滤 - /// @param keyword 回收物名称关键字,为空不过滤 - /// @param offset 分页偏移量 - /// @param limit 分页数量 - /// @return 兑换规则结果 - List rules( - @Param("storeId") String storeId, - @Param("status") String status, - @Param("recycleItemId") String recycleItemId, - @Param("skuId") String skuId, - @Param("keyword") String keyword, - @Param("offset") int offset, - @Param("limit") int limit - ); - - /// 统计兑换规则 - /// - /// @param storeId 门店 ID - /// @param status 规则状态,为空不过滤 - /// @param recycleItemId 回收物 ID,为空不过滤 - /// @param skuId 兑换 SKU ID,为空不过滤 - /// @param keyword 回收物名称关键字,为空不过滤 - /// @return 统计兑换规则结果 - long countRules( - @Param("storeId") String storeId, - @Param("status") String status, - @Param("recycleItemId") String recycleItemId, - @Param("skuId") String skuId, - @Param("keyword") String keyword - ); - - /// 查询兑换规则 - /// - /// @param storeId 门店 ID - /// @param id 记录 ID - /// @return 兑换规则结果 - @Select("SELECT * FROM gao_recycle_exchange_rule WHERE store_id = #{storeId} AND id = #{id}") - GaoRecycleExchangeRule ruleById(@Param("storeId") String storeId, @Param("id") String id); - - /// 锁定兑换规则 - /// - /// @param storeId 门店 ID - /// @param id 记录 ID - /// @return 锁定兑换规则结果 - @Select("SELECT * FROM gao_recycle_exchange_rule WHERE store_id = #{storeId} AND id = #{id} FOR UPDATE") - GaoRecycleExchangeRule rule(@Param("storeId") String storeId, @Param("id") String id); - - /// 创建兑换规则 - /// - /// @param rule 兑换规则 - void insertRule(GaoRecycleExchangeRule rule); - - /// 更新兑换规则 - /// - /// @param rule 兑换规则 - void updateRule(GaoRecycleExchangeRule rule); -} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeActionMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeActionMapper.java new file mode 100644 index 0000000..c21f99e --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeActionMapper.java @@ -0,0 +1,18 @@ +package com.imyeyu.api.modules.gao.mapper; + +import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeAction; +import com.imyeyu.spring.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.util.List; + +/// GaoRecycleExchangeAction 表数据访问 +public interface GaoRecycleExchangeActionMapper extends BaseMapper { + @Select("SELECT * FROM gao_recycle_exchange_action WHERE store_id=#{storeId} AND request_no=#{requestNo}") + GaoRecycleExchangeAction actionByRequest(@Param("storeId") String storeId, @Param("requestNo") String requestNo); + + void insertAction(GaoRecycleExchangeAction action); + + @Select("SELECT * FROM gao_recycle_exchange_action WHERE exchange_id = #{id} ORDER BY created_at, id") + List actions(String id); +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeWriteMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeMapper.java similarity index 76% rename from src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeWriteMapper.java rename to src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeMapper.java index d02bf26..24cf24e 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeWriteMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeMapper.java @@ -1,14 +1,12 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchange; -import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeAction; -import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRule; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; /// 回收兑换写入查询 -public interface GaoRecycleExchangeWriteMapper extends BaseMapper { +public interface GaoRecycleExchangeMapper extends BaseMapper { int updateByOrderStatus(@Param("orderId") String orderId, @Param("status") String status, @Param("updatedAt") long updatedAt); @@ -31,10 +29,6 @@ public interface GaoRecycleExchangeWriteMapper extends BaseMapper actions(String id); -} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeRuleItemMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeRuleItemMapper.java new file mode 100644 index 0000000..d84af1d --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeRuleItemMapper.java @@ -0,0 +1,22 @@ +package com.imyeyu.api.modules.gao.mapper; + +import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRuleItem; +import com.imyeyu.spring.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Delete; +import java.util.Collection; +import java.util.List; + +/// GaoRecycleExchangeRuleItem 表数据访问 +public interface GaoRecycleExchangeRuleItemMapper extends BaseMapper { + @Select("SELECT * FROM gao_recycle_exchange_rule_item WHERE rule_id=#{ruleId} ORDER BY sort, id") + List ruleItems(@Param("ruleId") String ruleId); + + List ruleItemsByIds(@Param("ids") Collection ids); + + void insertRuleItem(GaoRecycleExchangeRuleItem item); + + @Delete("DELETE FROM gao_recycle_exchange_rule_item WHERE rule_id=#{ruleId}") + void deleteRuleItems(@Param("ruleId") String ruleId); +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeRuleMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeRuleMapper.java new file mode 100644 index 0000000..63393ff --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleExchangeRuleMapper.java @@ -0,0 +1,44 @@ +package com.imyeyu.api.modules.gao.mapper; + +import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRule; +import com.imyeyu.spring.mapper.BaseMapper; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/// GaoRecycleExchangeRule 表数据访问 +public interface GaoRecycleExchangeRuleMapper extends BaseMapper { + + @Delete("DELETE FROM gao_recycle_exchange_rule WHERE store_id=#{storeId} AND id=#{id}") + int deleteRule(@Param("storeId") String storeId, @Param("id") String id); + + List rules( + @Param("storeId") String storeId, + @Param("status") String status, + @Param("recycleItemId") String recycleItemId, + @Param("skuId") String skuId, + @Param("keyword") String keyword, + @Param("offset") int offset, + @Param("limit") int limit + ); + + long countRules( + @Param("storeId") String storeId, + @Param("status") String status, + @Param("recycleItemId") String recycleItemId, + @Param("skuId") String skuId, + @Param("keyword") String keyword + ); + + @Select("SELECT * FROM gao_recycle_exchange_rule WHERE store_id = #{storeId} AND id = #{id}") + GaoRecycleExchangeRule ruleById(@Param("storeId") String storeId, @Param("id") String id); + + @Select("SELECT * FROM gao_recycle_exchange_rule WHERE store_id = #{storeId} AND id = #{id} FOR UPDATE") + GaoRecycleExchangeRule rule(@Param("storeId") String storeId, @Param("id") String id); + + void insertRule(GaoRecycleExchangeRule rule); + + void updateRule(GaoRecycleExchangeRule rule); +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleItemMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleItemMapper.java new file mode 100644 index 0000000..4deb9c7 --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleItemMapper.java @@ -0,0 +1,40 @@ +package com.imyeyu.api.modules.gao.mapper; + +import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; +import com.imyeyu.spring.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.util.Collection; +import java.util.List; + +/// 回收物表数据访问 +public interface GaoRecycleItemMapper extends BaseMapper { + @Select("SELECT COUNT(*) FROM gao_recycle_item WHERE store_id=#{store} AND id=#{item}") + int validItem(@Param("store") String store, @Param("item") String item); + + /// 额度查询权限可用的回收物选项。 + @Select("SELECT id, name, unit_name AS unitName, status FROM gao_recycle_item WHERE store_id=#{store} ORDER BY name, id") + List accountItems(@Param("store") String store); + + List items( + @Param("storeId") String storeId, + @Param("status") String status, + @Param("keyword") String keyword, + @Param("offset") int offset, + @Param("limit") int limit + ); + + long countItems(@Param("storeId") String storeId, @Param("status") String status, @Param("keyword") String keyword); + + List itemsByIdList(@Param("storeId") String storeId, @Param("idList") Collection idList); + + @Select("SELECT * FROM gao_recycle_item WHERE store_id = #{storeId} AND id = #{id}") + GaoRecycleItem itemById(@Param("storeId") String storeId, @Param("id") String id); + + @Select("SELECT * FROM gao_recycle_item WHERE store_id = #{storeId} AND id = #{id} FOR UPDATE") + GaoRecycleItem item(@Param("storeId") String storeId, @Param("id") String id); + + void insertItem(GaoRecycleItem item); + + void updateItem(GaoRecycleItem item); +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleLedgerMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleLedgerMapper.java index c0307b5..f3f628b 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleLedgerMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleLedgerMapper.java @@ -1,26 +1,29 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleLedgerPage; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger.BizType; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; -import java.util.Map; /// 回收物额度流水 Mapper public interface GaoRecycleLedgerMapper extends BaseMapper { - List> listLedger(@Param("store") String store, @Param("customer") String customer); + long countByQuery(GaoRecycleLedgerPage page); - List> yieldsByFulfillment(@Param("biz") String biz); + List selectByQuery(GaoRecycleLedgerPage page); - Map findRequest(@Param("store") String store, @Param("request") String request); + List yieldsByFulfillment(@Param("biz") String biz); + + GaoRecycleLedger findRequest(@Param("store") String store, @Param("request") String request); void ledger( @Param("id") String id, @Param("account") String account, - @Param("type") String type, + @Param("type") BizType type, @Param("biz") String biz, @Param("request") String request, @Param("balance") BigDecimal balance, diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleProductYieldMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleProductYieldMapper.java new file mode 100644 index 0000000..7ea56c5 --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleProductYieldMapper.java @@ -0,0 +1,33 @@ +package com.imyeyu.api.modules.gao.mapper; + +import com.imyeyu.api.modules.gao.entity.GaoRecycleProductYield; +import com.imyeyu.spring.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/// 商品回收物产出配置表数据访问 +public interface GaoRecycleProductYieldMapper extends BaseMapper { + int validYield(@Param("store") String store, @Param("sku") String sku, @Param("item") String item); + + void saveYield( + @Param("id") String id, + @Param("store") String store, + @Param("sku") String sku, + @Param("item") String item, + @Param("quantity") BigDecimal quantity, + @Param("now") long now + ); + + void deleteYield(@Param("store") String store, @Param("sku") String sku, @Param("item") String item, @Param("now") long now); + + List> yields(@Param("store") String store, @Param("sku") String sku); + + /// 配置页需要的字段用驼峰返回,同时带上回收物名称与单位 + List yieldList(@Param("store") String store, @Param("sku") String sku); + + /// 产品维度的产出配置:一个产品下所有 SKU 的产出行,按 SKU 排序返回 + List yieldListByProduct(@Param("store") String store, @Param("product") String product); + +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleStatMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleStatMapper.java index 1e3a348..2fc22a3 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleStatMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoRecycleStatMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; -import com.imyeyu.api.modules.gao.vo.GaoRecycleStatView; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeStatView; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleStatView; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeStatView; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderChartMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderChartMapper.java index 43b831c..61461f3 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderChartMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderChartMapper.java @@ -1,18 +1,18 @@ package com.imyeyu.api.modules.gao.mapper; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderSkuRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatIntervalStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderChartReq; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCalendarStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderConsumptionDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPaymentStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderStatusStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderTypeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderProductRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderSkuRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatDailyStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatIntervalStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderChartReq; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCalendarStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderConsumptionDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPaymentStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderStatusStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderTypeStatView; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderMapper.java index 3fe014a..e5427e0 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoSalesOrderMapper.java @@ -1,12 +1,12 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductCustomerRow; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPage; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceRow; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductCustomerRow; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPage; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceRow; import com.imyeyu.spring.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; diff --git a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoStoreDiaryMapper.java b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoStoreDiaryMapper.java index 39912c9..2c30636 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoStoreDiaryMapper.java +++ b/src/main/java/com/imyeyu/api/modules/gao/mapper/GaoStoreDiaryMapper.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.mapper; import com.imyeyu.api.modules.common.entity.Article; -import com.imyeyu.api.modules.gao.vo.GaoStoreDiaryPage; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreDiaryPage; import com.imyeyu.spring.mapper.BaseMapper; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerChartService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerChartService.java index 84dbb5b..9caafe9 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerChartService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerChartService.java @@ -1,10 +1,10 @@ package com.imyeyu.api.modules.gao.service; -import com.imyeyu.api.modules.gao.vo.GaoCustomerChartReq; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseWordReq; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseWordView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseWordReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseWordView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerConsumptionRecordService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerConsumptionRecordService.java index 80b420f..943f933 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerConsumptionRecordService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerConsumptionRecordService.java @@ -1,8 +1,8 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoCustomerConsumptionRecord; -import com.imyeyu.api.modules.gao.vo.GaoCustomerConsumptionRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerConsumptionRecordPageResult; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerConsumptionRecordPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerConsumptionRecordPageResult; import com.imyeyu.spring.service.BaseService; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerFollowUpReminderService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerFollowUpReminderService.java index 5978169..ae89ca9 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerFollowUpReminderService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerFollowUpReminderService.java @@ -2,8 +2,8 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.common.entity.NotifyDetail; import com.imyeyu.api.modules.gao.entity.GaoCustomerFollowUpReminder; -import com.imyeyu.api.modules.gao.vo.GaoCustomerFollowUpReminderPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerFollowUpReminderPageResult; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerFollowUpReminderPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerFollowUpReminderPageResult; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerPackageService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerPackageService.java index 7c0a800..ef63cc3 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerPackageService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerPackageService.java @@ -1,9 +1,9 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoCustomerPackage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackageCancelRequest; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePurchaseRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackageCancelRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePurchaseRequest; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerService.java index 69882d1..49703f8 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoCustomerService.java @@ -1,11 +1,11 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoCustomer; -import com.imyeyu.api.modules.gao.vo.GaoCustomerAgeStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerTrendStateReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerAgeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerGenderStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerTrendStateReq; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoEventRecordService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoEventRecordService.java index 3b638a7..e4e7311 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoEventRecordService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoEventRecordService.java @@ -2,15 +2,15 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoCustomer; import com.imyeyu.api.modules.gao.entity.GaoEventRecord; -import com.imyeyu.api.modules.gao.vo.GaoCustomerChartReq; -import com.imyeyu.api.modules.gao.vo.GaoEventOptionStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerEventRankView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordRankPage; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerChartReq; +import com.imyeyu.api.modules.gao.vo.event.GaoEventOptionStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerEventRankView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordPage; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordRankPage; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordNumberValueDailyStatView; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import com.imyeyu.java.TimiJava; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoFundRecordService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoFundRecordService.java index 7263186..169a0c2 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoFundRecordService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoFundRecordService.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoFundRecord; -import com.imyeyu.api.modules.gao.vo.GaoFundRecordPage; +import com.imyeyu.api.modules.gao.vo.fund.GaoFundRecordPage; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderFulfillmentService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderFulfillmentService.java index 92f1eb5..5cd649b 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderFulfillmentService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderFulfillmentService.java @@ -1,17 +1,17 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoOrderFulfillment; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentPage; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentPrepareStockRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentReturnRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentCustomerRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSkuView; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceOrderListRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceOrderView; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentActionRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentPage; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentPrepareStockRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentReturnRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentCustomerRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSkuView; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceOrderListRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceOrderView; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderPaymentService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderPaymentService.java index ecc4641..4c123d1 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderPaymentService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderPaymentService.java @@ -1,11 +1,11 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoFundRecord; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentNoRefundRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentReceiveRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRefundRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentActionRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentNoRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentReceiveRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRevokeRequest; /// GAO 销售订单资金服务 /// diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderStraightThroughService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderStraightThroughService.java index b624eb7..3c82d18 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderStraightThroughService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoOrderStraightThroughService.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; -import com.imyeyu.api.modules.gao.vo.GaoOrderStraightThroughRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderStraightThroughRequest; /// GAO 订单创建直通服务 /// diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPackageConfigService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPackageConfigService.java index 602d2d3..b1ec5ff 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPackageConfigService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPackageConfigService.java @@ -2,7 +2,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoPackageConfig; import com.imyeyu.api.modules.gao.entity.GaoPackageConfigItem; -import com.imyeyu.api.modules.gao.vo.GaoPackageConfigPage; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageConfigPage; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointAccountService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointAccountService.java index ac71d39..54f8c9d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointAccountService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointAccountService.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoPointAccount; -import com.imyeyu.api.modules.gao.vo.GaoPointAccountPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAccountPage; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointChartService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointChartService.java index e356094..0e337cb 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointChartService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointChartService.java @@ -1,8 +1,8 @@ package com.imyeyu.api.modules.gao.service; -import com.imyeyu.api.modules.gao.vo.GaoPointDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.point.GaoPointDailyStatView; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionProductRankView; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointLedgerService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointLedgerService.java index 36e5cbc..2737a68 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointLedgerService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointLedgerService.java @@ -4,8 +4,8 @@ import com.imyeyu.api.modules.common.bean.GroovyScriptExecutionResult; import com.imyeyu.api.modules.gao.entity.GaoPointLedger; import com.imyeyu.api.modules.gao.entity.GaoPointRule; import com.imyeyu.api.modules.gao.script.GaoPointDecision; -import com.imyeyu.api.modules.gao.vo.GaoPointAdjustRequest; -import com.imyeyu.api.modules.gao.vo.GaoPointLedgerPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAdjustRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointLedgerPage; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedeemSkuService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedeemSkuService.java index 5022713..4e7b168 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedeemSkuService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedeemSkuService.java @@ -1,9 +1,9 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoPointRedeemSku; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPageResult; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPageResult; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuRequest; /// GAO 积分兑换 SKU 配置服务 /// diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedemptionService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedemptionService.java index 72f265f..3492800 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedemptionService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointRedemptionService.java @@ -2,9 +2,9 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoPointRedemption; import com.imyeyu.api.modules.gao.entity.GaoPointRedemptionReturn; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionReturnRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionCreateRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionReturnRequest; import com.imyeyu.spring.bean.PageResult; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointTriggerService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointTriggerService.java index 0b7fea9..ca784ac 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointTriggerService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoPointTriggerService.java @@ -3,7 +3,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoEventRecord; import com.imyeyu.api.modules.gao.entity.GaoPointLedger; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; -import com.imyeyu.api.modules.gao.vo.GaoPointAdjustRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAdjustRequest; /// GAO 客户积分触发服务 /// diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductCategoryService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductCategoryService.java index 68c2842..c4920bb 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductCategoryService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductCategoryService.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoProductCategory; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryPage; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductChartService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductChartService.java index 174784c..e19e47c 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductChartService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductChartService.java @@ -1,15 +1,15 @@ package com.imyeyu.api.modules.gao.service; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductTypeStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductTypeStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductUnitSalesRankView; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductService.java index f5a8070..343c420 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductService.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoProduct; -import com.imyeyu.api.modules.gao.vo.GaoProductPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductPage; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuChartService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuChartService.java index a86930a..856aed4 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuChartService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuChartService.java @@ -1,13 +1,13 @@ package com.imyeyu.api.modules.gao.service; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSalesRankView; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuService.java index 50ac705..6c5ba68 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductSkuService.java @@ -3,8 +3,8 @@ package com.imyeyu.api.modules.gao.service; import com.fasterxml.jackson.databind.JsonNode; import com.imyeyu.api.modules.gao.entity.GaoProductSku; import com.imyeyu.api.modules.gao.entity.GaoProductSkuUnit; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSelection; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSelection; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentView; import com.imyeyu.spring.service.BaseService; import java.util.Collection; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockRecordService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockRecordService.java index ab2beb1..4a64ce9 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockRecordService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockRecordService.java @@ -2,8 +2,8 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.common.entity.Attachment; import com.imyeyu.api.modules.gao.entity.GaoProductStockRecord; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordPageResult; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordPageResult; import com.imyeyu.spring.service.BaseService; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockService.java index f7e3ebf..058450d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoProductStockService.java @@ -3,12 +3,12 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.common.entity.Attachment; import com.imyeyu.api.modules.gao.entity.GaoProductStock; import com.imyeyu.api.modules.gao.entity.GaoProductStockRecord; -import com.imyeyu.api.modules.gao.vo.GaoProductStockChangeRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockManualInBatchRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockManualRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockProductView; -import com.imyeyu.api.modules.gao.vo.GaoStockChangeItem; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockChangeRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockManualInBatchRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockManualRevokeRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockProductView; +import com.imyeyu.api.modules.gao.vo.stock.GaoStockChangeItem; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.bean.PageResult; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleAccountService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleAccountService.java index b35670b..38e5250 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleAccountService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleAccountService.java @@ -2,6 +2,9 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.config.dbsource.TimiServerDBConfig; import com.imyeyu.api.modules.gao.mapper.GaoRecycleAccountMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleProductYieldMapper; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger.BizType; import com.imyeyu.api.modules.user.service.UserLoginService; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.utils.Time; @@ -22,6 +25,7 @@ import com.imyeyu.api.modules.gao.entity.GaoOrderFulfillmentItem; @RequiredArgsConstructor public class GaoRecycleAccountService { private final GaoRecycleAccountMapper mapper; + private final GaoRecycleProductYieldMapper yieldMapper; private final GaoRecycleLedgerService ledgerService; private final UserLoginService login; @@ -29,7 +33,7 @@ public class GaoRecycleAccountService { public void addFromFulfillment(String store, String customer, String fulfillmentId, List items) { Map quantities = new TreeMap<>(); for (GaoOrderFulfillmentItem item : items) { - for (Map yield : mapper.yields(store, item.getSkuId())) { + for (Map yield : yieldMapper.yields(store, item.getSkuId())) { String recycleId = (String) yield.get("recycle_item_id"); BigDecimal quantity = item.getBaseQuantity().multiply((BigDecimal) yield.get("quantity_per_base")) .setScale(3, java.math.RoundingMode.DOWN); @@ -41,16 +45,16 @@ public class GaoRecycleAccountService { } } for (var entry : quantities.entrySet()) { - change(store, customer, entry.getKey(), entry.getValue(), BigDecimal.ZERO, "FULFILLMENT_YIELD", fulfillmentId, "yield:" + fulfillmentId + ":" + entry.getKey(), null); + change(store, customer, entry.getKey(), entry.getValue(), BigDecimal.ZERO, BizType.FULFILLMENT_YIELD, fulfillmentId, "yield:" + fulfillmentId + ":" + entry.getKey(), null); } } /// 撤回原履约产生的额度,不追溯历史履约 public void revokeFulfillment(String store, String customer, String sourceId, String reverseId) { - for (Map row : ledgerService.yieldsByFulfillment(sourceId)) { - String item = (String) row.get("recycle_item_id"); - BigDecimal value = (BigDecimal) row.get("balance_delta"); - change(store, customer, item, value.negate(), BigDecimal.ZERO, "FULFILLMENT_REVOKE", reverseId, "yield-revoke:" + reverseId + ":" + item, null); + for (GaoRecycleLedger row : ledgerService.yieldsByFulfillment(sourceId)) { + String item = row.getRecycleItemId(); + BigDecimal value = row.getBalanceDelta(); + change(store, customer, item, value.negate(), BigDecimal.ZERO, BizType.FULFILLMENT_REVOKE, reverseId, "yield-revoke:" + reverseId + ":" + item, null); } } @@ -66,7 +70,7 @@ public class GaoRecycleAccountService { /// @param requestNo 幂等号 /// @param reason 原因 @Transactional(TimiServerDBConfig.ROLLBACKER) - public void change(String storeId, String customerId, String recycleItemId, BigDecimal balanceDelta, BigDecimal reservedDelta, String bizType, String bizId, String requestNo, String reason) { + public void change(String storeId, String customerId, String recycleItemId, BigDecimal balanceDelta, BigDecimal reservedDelta, BizType bizType, String bizId, String requestNo, String reason) { TimiException.required(storeId, "门店不能为空"); TimiException.required(customerId, "客户不能为空"); TimiException.required(recycleItemId, "回收物不能为空"); @@ -76,18 +80,18 @@ public class GaoRecycleAccountService { TimiException.requiredTrue(!(15 < balanceDelta.precision() - balanceDelta.scale()) && !(15 < reservedDelta.precision() - reservedDelta.scale()), "额度超出范围"); TimiException.required(requestNo, "请求号不能为空"); TimiException.requiredTrue(!requestNo.isBlank() && !(128 < requestNo.length()), "请求号无效"); - TimiException.requiredTrue(bizType != null && !bizType.isBlank() && !(32 < bizType.length()) && bizId != null && !bizId.isBlank() && !(36 < bizId.length()), "额度业务信息无效"); + TimiException.requiredTrue(bizType != null && bizId != null && !bizId.isBlank() && !(36 < bizId.length()), "额度业务信息无效"); long now = Time.now(); mapper.ensure(UUID.randomUUID().toString(), storeId, customerId, recycleItemId, now); Map account = mapper.lock(storeId, customerId, recycleItemId); TimiException.required(account, "额度账户不存在"); - Map existing = ledgerService.findRequest(storeId, requestNo); + GaoRecycleLedger existing = ledgerService.findRequest(storeId, requestNo); if (existing != null) { - TimiException.requiredTrue(Objects.equals(customerId, existing.get("customer_id")) && Objects.equals(recycleItemId, existing.get("recycle_item_id")) - && Objects.equals(bizType, existing.get("biz_type")) && Objects.equals(bizId, existing.get("biz_id")) - && balanceDelta.compareTo((BigDecimal) existing.get("balance_delta")) == 0 - && reservedDelta.compareTo((BigDecimal) existing.get("reserved_delta")) == 0 - && Objects.equals(reason, existing.get("reason")), "额度流水请求号对应内容不一致"); + TimiException.requiredTrue(Objects.equals(customerId, existing.getCustomerId()) && Objects.equals(recycleItemId, existing.getRecycleItemId()) + && Objects.equals(bizType, existing.getBizType()) && Objects.equals(bizId, existing.getBizId()) + && balanceDelta.compareTo(existing.getBalanceDelta()) == 0 + && reservedDelta.compareTo(existing.getReservedDelta()) == 0 + && Objects.equals(reason, existing.getReason()), "额度流水请求号对应内容不一致"); return; } String id = (String) account.get("id"); diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleConfigService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleConfigService.java index 061da7e..60eb8b6 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleConfigService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleConfigService.java @@ -11,11 +11,13 @@ import com.imyeyu.api.modules.gao.entity.GaoProductSkuUnit; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRule; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRuleItem; import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; -import com.imyeyu.api.modules.gao.mapper.GaoRecycleConfigMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleItemMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeRuleMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeRuleItemMapper; import com.imyeyu.api.modules.gao.mapper.GaoProductSkuMapper; import com.imyeyu.api.modules.gao.mapper.GaoProductSkuUnitMapper; -import com.imyeyu.api.modules.gao.vo.GaoRecycleItemRequest; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeRuleRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleItemRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeRuleRequest; import org.springframework.beans.BeanUtils; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.utils.Time; @@ -39,7 +41,9 @@ import java.util.stream.Collectors; @Service @RequiredArgsConstructor public class GaoRecycleConfigService { - private final GaoRecycleConfigMapper mapper; + private final GaoRecycleItemMapper itemMapper; + private final GaoRecycleExchangeRuleMapper ruleMapper; + private final GaoRecycleExchangeRuleItemMapper ruleItemMapper; private final AttachmentService attachmentService; private final GaoProductSkuMapper skuMapper; private final GaoProductSkuUnitMapper unitMapper; @@ -60,8 +64,8 @@ public class GaoRecycleConfigService { String statusName = status == null ? null : status.name(); String keywordText = blankToNull(keyword); PageResult result = new PageResult<>(); - result.setTotal(mapper.countItems(storeId, statusName, keywordText)); - List items = mapper.items(storeId, statusName, keywordText, offset, limit); + result.setTotal(itemMapper.countItems(storeId, statusName, keywordText)); + List items = itemMapper.items(storeId, statusName, keywordText, offset, limit); if (!items.isEmpty()) { Map> photos = attachmentService.mapByBizIdList( Attachment.BizType.GAO_RECYCLE_ITEM, items.stream().map(GaoRecycleItem::getId).toList()); @@ -80,7 +84,7 @@ public class GaoRecycleConfigService { TimiException.required(id, "回收物 ID 不能为空"); String resolved = scope.resolveStoreId(storeId); TimiException.required(resolved, "门店不能为空"); - GaoRecycleItem item = mapper.itemById(resolved, id); + GaoRecycleItem item = itemMapper.itemById(resolved, id); TimiException.required(item, "回收物不存在"); item.setAttachmentList(attachmentService.listByBizId(Attachment.BizType.GAO_RECYCLE_ITEM, id)); return item; @@ -104,8 +108,8 @@ public class GaoRecycleConfigService { String exchangeSkuId = blankToNull(skuId); String keywordText = blankToNull(keyword); PageResult result = new PageResult<>(); - result.setTotal(mapper.countRules(storeId, statusName, itemId, exchangeSkuId, keywordText)); - List list = mapper.rules(storeId, statusName, itemId, exchangeSkuId, keywordText, offset, limit); + result.setTotal(ruleMapper.countRules(storeId, statusName, itemId, exchangeSkuId, keywordText)); + List list = ruleMapper.rules(storeId, statusName, itemId, exchangeSkuId, keywordText, offset, limit); fillRuleDisplay(storeId, list); result.setList(list); return result; @@ -121,7 +125,7 @@ public class GaoRecycleConfigService { TimiException.required(id, "规则 ID 不能为空"); String resolved = scope.resolveStoreId(storeId); TimiException.required(resolved, "门店不能为空"); - GaoRecycleExchangeRule rule = mapper.ruleById(resolved, id); + GaoRecycleExchangeRule rule = ruleMapper.ruleById(resolved, id); TimiException.required(rule, "兑换规则不存在"); fillRuleDisplay(resolved, List.of(rule)); return rule; @@ -153,8 +157,8 @@ public class GaoRecycleConfigService { : attachmentService.mapByBizIdList(Attachment.BizType.GAO_RECYCLE_ITEM, itemIdList); Map itemMap = itemIdList.isEmpty() ? Map.of() - : mapper.itemsByIdList(storeId, itemIdList).stream().collect(Collectors.toMap(GaoRecycleItem::getId, Function.identity())); - Map> ruleItems = mapper.ruleItemsByIds(ruleList.stream().map(GaoRecycleExchangeRule::getId).toList()).stream().collect(Collectors.groupingBy(GaoRecycleExchangeRuleItem::getRuleId)); + : itemMapper.itemsByIdList(storeId, itemIdList).stream().collect(Collectors.toMap(GaoRecycleItem::getId, Function.identity())); + Map> ruleItems = ruleItemMapper.ruleItemsByIds(ruleList.stream().map(GaoRecycleExchangeRule::getId).toList()).stream().collect(Collectors.groupingBy(GaoRecycleExchangeRuleItem::getRuleId)); List skuIdList = distinct(ruleItems.values().stream().flatMap(List::stream).map(GaoRecycleExchangeRuleItem::getSkuId).toList()); Map skuMap = skuIdList.isEmpty() ? Map.of() @@ -214,13 +218,13 @@ public class GaoRecycleConfigService { if (item.getAllowDecimalQuantity() == null) item.setAllowDecimalQuantity(true); item.setId(UUID.randomUUID().toString()); item.setCreatedAt(Time.now()); - mapper.insertItem(item); + itemMapper.insertItem(item); } else { - GaoRecycleItem existing = mapper.item(storeId, item.getId()); + GaoRecycleItem existing = itemMapper.item(storeId, item.getId()); TimiException.required(existing, "回收物不存在"); if (item.getAllowDecimalQuantity() == null) item.setAllowDecimalQuantity(existing.getAllowDecimalQuantity()); item.setUpdatedAt(Time.now()); - mapper.updateItem(item); + itemMapper.updateItem(item); } if (request.getAttachmentList() != null) { attachmentService.updateByBizId(Attachment.BizType.GAO_RECYCLE_ITEM, item.getId(), request.getAttachmentList()); @@ -241,10 +245,10 @@ public class GaoRecycleConfigService { rule.setStoreId(storeId); TimiException.required(rule.getRecycleItemId(), "回收物不能为空"); if (rule.getId() != null) { - TimiException.required(mapper.rule(storeId, rule.getId()), "规则不存在"); + TimiException.required(ruleMapper.rule(storeId, rule.getId()), "规则不存在"); } TimiException.required(rule.getStatus(), "规则状态不能为空"); - GaoRecycleItem item = mapper.item(storeId, rule.getRecycleItemId()); + GaoRecycleItem item = itemMapper.item(storeId, rule.getRecycleItemId()); TimiException.required(item, "回收物不存在"); if (rule.getStatus() == GaoRecycleExchangeRule.Status.ACTIVE) { TimiException.requiredTrue(item.getStatus() == GaoRecycleItem.Status.ACTIVE, "回收物已停用"); @@ -283,19 +287,19 @@ public class GaoRecycleConfigService { if (rule.getId() == null) { rule.setId(UUID.randomUUID().toString()); rule.setCreatedAt(Time.now()); - mapper.insertRule(rule); + ruleMapper.insertRule(rule); } else { rule.setUpdatedAt(Time.now()); - mapper.updateRule(rule); + ruleMapper.updateRule(rule); } - mapper.deleteRuleItems(rule.getId()); + ruleItemMapper.deleteRuleItems(rule.getId()); int position = 0; for (GaoRecycleExchangeRuleItem entry : items) { entry.setId(UUID.randomUUID().toString()); entry.setRuleId(rule.getId()); entry.setSort(position++); entry.setCreatedAt(Time.now()); - mapper.insertRuleItem(entry); + ruleItemMapper.insertRuleItem(entry); } fillRuleDisplay(storeId, List.of(rule)); return rule; @@ -306,9 +310,9 @@ public class GaoRecycleConfigService { public void deleteRule(String storeId, String id) { String resolved = scope.resolveStoreId(storeId); TimiException.required(resolved, "门店不能为空"); - TimiException.required(mapper.rule(resolved, id), "规则不存在"); - mapper.deleteRuleItems(id); - mapper.deleteRule(resolved, id); + TimiException.required(ruleMapper.rule(resolved, id), "规则不存在"); + ruleItemMapper.deleteRuleItems(id); + ruleMapper.deleteRule(resolved, id); } private void validateQuantity(BigDecimal quantity) { diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeQueryService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeQueryService.java index e435407..ff4b7d9 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeQueryService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeQueryService.java @@ -4,10 +4,11 @@ import com.imyeyu.api.modules.common.entity.Attachment; import com.imyeyu.api.modules.common.service.AttachmentService; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchange; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeAction; -import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeQueryMapper; -import com.imyeyu.api.modules.gao.mapper.GaoRecycleConfigMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeActionMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleItemMapper; import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeDetail; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeDetail; import com.imyeyu.java.bean.timi.TimiException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -21,8 +22,9 @@ import java.util.Map; @RequiredArgsConstructor public class GaoRecycleExchangeQueryService { - private final GaoRecycleExchangeQueryMapper mapper; - private final GaoRecycleConfigMapper configMapper; + private final GaoRecycleExchangeMapper mapper; + private final GaoRecycleExchangeActionMapper actionMapper; + private final GaoRecycleItemMapper itemMapper; private final GaoStoreScopeService scopeService; private final AttachmentService attachmentService; @@ -39,12 +41,12 @@ public class GaoRecycleExchangeQueryService { TimiException.required(exchange, "兑换单不存在"); scopeService.checkStoreId(exchange.getStoreId()); if (exchange.getRecycleItemId() != null) { - GaoRecycleItem item = configMapper.itemById(exchange.getStoreId(), exchange.getRecycleItemId()); + GaoRecycleItem item = itemMapper.itemById(exchange.getStoreId(), exchange.getRecycleItemId()); if (item != null) exchange.setAllowDecimalQuantity(item.getAllowDecimalQuantity()); } GaoRecycleExchangeDetail detail = new GaoRecycleExchangeDetail(); detail.setExchange(exchange); - List actions = mapper.actions(id); + List actions = actionMapper.actions(id); detail.setActionList(actions); Map> attachments = new HashMap<>(); for (GaoRecycleExchangeAction action : actions) { diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeWriteService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeWriteService.java index d5925a7..6a33e91 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeWriteService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleExchangeWriteService.java @@ -17,23 +17,26 @@ import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeAction; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRule; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRuleItem; import com.imyeyu.api.modules.gao.entity.GaoSalesOrderItem; -import com.imyeyu.api.modules.gao.vo.GaoPackageOrderCreateData; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCancelRequest; -import com.imyeyu.api.modules.gao.vo.GaoRecyclePaymentRequest; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeItemRequest; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageOrderCreateData; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCancelRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecyclePaymentRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeItemRequest; import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; import com.imyeyu.api.modules.gao.mapper.GaoProductMapper; import com.imyeyu.api.modules.gao.mapper.GaoProductSkuMapper; import com.imyeyu.api.modules.gao.mapper.GaoProductSkuUnitMapper; import com.imyeyu.api.modules.gao.mapper.GaoProductStockRecordMapper; -import com.imyeyu.api.modules.gao.mapper.GaoRecycleConfigMapper; -import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeWriteMapper; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoStockChangeItem; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentItemRequest; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleItemMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeRuleMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeRuleItemMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeActionMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeMapper; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeActionRequest; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeCreateRequest; +import com.imyeyu.api.modules.gao.vo.stock.GaoStockChangeItem; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentItemRequest; import com.imyeyu.api.modules.user.service.PermissionChecker; import com.imyeyu.api.modules.user.service.UserLoginService; import com.imyeyu.api.modules.system.audit.AuditOperation; @@ -62,8 +65,11 @@ import java.util.HashMap; @Service @RequiredArgsConstructor public class GaoRecycleExchangeWriteService { - private final GaoRecycleExchangeWriteMapper mapper; - private final GaoRecycleConfigMapper configMapper; + private final GaoRecycleExchangeMapper mapper; + private final GaoRecycleItemMapper itemMapper; + private final GaoRecycleExchangeRuleMapper ruleMapper; + private final GaoRecycleExchangeRuleItemMapper ruleItemMapper; + private final GaoRecycleExchangeActionMapper actionMapper; private final GaoProductSkuMapper skuMapper; private final GaoProductMapper productMapper; private final GaoProductSkuUnitMapper unitMapper; @@ -118,20 +124,20 @@ public class GaoRecycleExchangeWriteService { boolean free = request.getRuleId() == null || request.getRuleId().isBlank(); boolean canAdjust = permissions.hasAny(ModuleCode.GAO, GaoPermissionCode.SALES_ORDER_PRICE_OVERRIDE.getValue()); TimiException.requiredTrue(!free || canAdjust, "缺少自由创建兑换单权限"); - GaoRecycleExchangeRule rule = free ? null : configMapper.rule(store, request.getRuleId()); + GaoRecycleExchangeRule rule = free ? null : ruleMapper.rule(store, request.getRuleId()); TimiException.requiredTrue(free || rule != null && rule.getStatus() == GaoRecycleExchangeRule.Status.ACTIVE, "兑换模板不存在或已停用"); int multiple = free ? 1 : request.getMultiple() == null ? 1 : request.getMultiple(); TimiException.requiredTrue(0 < multiple, "兑换份数必须大于零"); String itemId = request.getRecycleItemId() == null ? free ? null : rule.getRecycleItemId() : request.getRecycleItemId(); TimiException.required(itemId, "回收物不能为空"); - GaoRecycleItem item = configMapper.item(store, itemId); + GaoRecycleItem item = itemMapper.item(store, itemId); TimiException.requiredTrue(item != null && item.getStatus() == GaoRecycleItem.Status.ACTIVE, "回收物不存在或已停用"); BigDecimal preset = free ? null : quantity(rule.getRecycleQuantity().multiply(BigDecimal.valueOf(multiple))); BigDecimal actual = quantity(request.getRecycleQuantity() == null ? preset : request.getRecycleQuantity()); if (!free && (!itemId.equals(rule.getRecycleItemId()) || actual.compareTo(preset) != 0)) { TimiException.requiredTrue(canAdjust, "缺少兑换数量调整权限"); } - List defaults = free ? List.of() : configMapper.ruleItems(rule.getId()); + List defaults = free ? List.of() : ruleItemMapper.ruleItems(rule.getId()); TimiException.requiredTrue(free || !defaults.isEmpty(), "兑换模板没有明细"); List inputs = request.getItemList(); if (inputs == null || inputs.isEmpty()) { @@ -296,7 +302,7 @@ public class GaoRecycleExchangeWriteService { String store = snapshot.getStoreId(); String fingerprint = fingerprint(request.getExchangeId(), GaoRecycleExchangeAction.ActionType.CANCEL, request.getOccurredAt(), request.getReason(), request.getRemark(), number(request.getRetainedRecycleQuantity()), request.getFulfillmentRevokeList(), request.getPaymentRevokeList(), attachments(request.getAttachmentList())); TimiException.required(mapper.lockStore(store), "门店不存在"); - GaoRecycleExchangeAction existing = mapper.actionByRequest(store, request.getRequestNo()); + GaoRecycleExchangeAction existing = actionMapper.actionByRequest(store, request.getRequestNo()); if (existing != null) { TimiException.requiredTrue(fingerprint.equals(existing.getRequestFingerprint()), "请求号对应的操作内容不一致"); return mapper.lockExchange(store, existing.getExchangeId()); @@ -359,7 +365,7 @@ public class GaoRecycleExchangeWriteService { action.setReason(request.getReason()); action.setRemark(request.getRemark()); action.setRetainedRecycleQuantity(retained); - mapper.insertAction(action); + actionMapper.insertAction(action); if (orderRequest == null) attachmentService.updateByBizId(Attachment.BizType.GAO_RECYCLE_EXCHANGE_REVOKE, action.getId(), request.getAttachmentList()); TimiException.requiredTrue(mapper.cancel(exchange.getId(), now) == 1, "兑换单状态已变更"); exchange.setStatus(GaoRecycleExchange.Status.CANCELLED); diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleLedgerService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleLedgerService.java index 3870dbb..c5d7875 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleLedgerService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleLedgerService.java @@ -1,12 +1,15 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.mapper.GaoRecycleLedgerMapper; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleLedgerPage; +import com.imyeyu.spring.bean.PageResult; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger.BizType; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.List; -import java.util.Map; /// 回收物额度流水服务 @Service @@ -14,19 +17,22 @@ import java.util.Map; public class GaoRecycleLedgerService { private final GaoRecycleLedgerMapper mapper; - public List> listLedger(String store, String customer) { - return mapper.listLedger(store, customer); + public PageResult pageByQuery(GaoRecycleLedgerPage page) { + PageResult result = new PageResult<>(); + result.setTotal(mapper.countByQuery(page)); + result.setList(mapper.selectByQuery(page)); + return result; } - public List> yieldsByFulfillment(String biz) { + public List yieldsByFulfillment(String biz) { return mapper.yieldsByFulfillment(biz); } - public Map findRequest(String store, String request) { + public GaoRecycleLedger findRequest(String store, String request) { return mapper.findRequest(store, request); } - public void ledger(String id, String account, String type, String biz, String request, BigDecimal balance, + public void ledger(String id, String account, BizType type, String biz, String request, BigDecimal balance, BigDecimal reserved, String operator, String reason, long now) { mapper.ledger(id, account, type, biz, request, balance, reserved, operator, reason, now); } diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecyclePaymentService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecyclePaymentService.java index fd0655d..84d7bac 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecyclePaymentService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecyclePaymentService.java @@ -1,11 +1,12 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.config.dbsource.TimiServerDBConfig; +import com.imyeyu.api.modules.gao.entity.GaoRecycleLedger.BizType; import com.imyeyu.api.modules.gao.entity.GaoRecyclePayment; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import com.imyeyu.api.modules.gao.mapper.GaoRecyclePaymentMapper; -import com.imyeyu.api.modules.gao.vo.GaoRecyclePaymentRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderTransactionView; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecyclePaymentRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderTransactionView; import com.imyeyu.api.modules.common.entity.Attachment; import com.imyeyu.api.modules.common.service.AttachmentService; import com.fasterxml.jackson.databind.ObjectMapper; @@ -182,7 +183,7 @@ public class GaoRecyclePaymentService { attachments.update(clone); } } - accounts.change(order.getStoreId(), order.getCustomerId(), order.getRecycleItemId(), BigDecimal.ZERO, payment.getQuantity(), "PAYMENT_RESERVE", payment.getId(), "recycle:reserve:" + payment.getId(), null); + accounts.change(order.getStoreId(), order.getCustomerId(), order.getRecycleItemId(), BigDecimal.ZERO, payment.getQuantity(), BizType.PAYMENT_RESERVE, payment.getId(), "recycle:reserve:" + payment.getId(), null); return payment; } @@ -202,7 +203,7 @@ public class GaoRecyclePaymentService { GaoRecyclePayment payment = mapper.lock(snapshot.getId()); TimiException.requiredTrue(payment.getStatus() == GaoRecyclePayment.Status.PENDING, "支付状态不允许撤销"); if (onlyOperator) TimiException.requiredTrue(login.getRequireLoginUserId().equals(payment.getOperatorUserId()), "只能撤销自己提交的支付"); - accounts.change(payment.getStoreId(), payment.getCustomerId(), payment.getRecycleItemId(), BigDecimal.ZERO, payment.getQuantity().negate(), "PAYMENT_RELEASE", payment.getId(), "recycle:release:" + payment.getId(), request.getReason()); + accounts.change(payment.getStoreId(), payment.getCustomerId(), payment.getRecycleItemId(), BigDecimal.ZERO, payment.getQuantity().negate(), BizType.PAYMENT_RELEASE, payment.getId(), "recycle:release:" + payment.getId(), request.getReason()); GaoRecyclePayment.Status target = reject ? GaoRecyclePayment.Status.REJECTED : GaoRecyclePayment.Status.CANCELLED; TimiException.requiredTrue(mapper.status(payment.getId(), GaoRecyclePayment.Status.PENDING, target, login.getRequireLoginUserId(), Time.now(), request.getReason()) == 1, "支付状态已变更"); return mapper.byId(payment.getId()); @@ -248,7 +249,7 @@ public class GaoRecyclePaymentService { reverse.setReturnedToCustomer(request.getReturnedToCustomer()); reverse.setCreatedAt(now); mapper.insert(reverse); - accounts.change(source.getStoreId(), source.getCustomerId(), source.getRecycleItemId(), source.getQuantity(), BigDecimal.ZERO, "PAYMENT_REVOKE", reverse.getId(), "recycle:revoke:" + source.getId(), request.getReason()); + accounts.change(source.getStoreId(), source.getCustomerId(), source.getRecycleItemId(), source.getQuantity(), BigDecimal.ZERO, BizType.PAYMENT_REVOKE, reverse.getId(), "recycle:revoke:" + source.getId(), request.getReason()); if (Boolean.TRUE.equals(request.getReturnedToCustomer())) { physical.returnPayment(order, source.getId(), reverse.getId(), reverse.getOccurredAt()); } @@ -296,7 +297,7 @@ public class GaoRecyclePaymentService { scope.checkStoreId(order.getStoreId()); GaoRecyclePayment payment = mapper.lock(paymentId); TimiException.requiredTrue(order.getStatus() != GaoSalesOrder.Status.CANCELLED && payment.getStatus() == GaoRecyclePayment.Status.PENDING, "支付状态不允许核销"); - accounts.change(payment.getStoreId(), payment.getCustomerId(), payment.getRecycleItemId(), payment.getQuantity().negate(), payment.getQuantity().negate(), "PAYMENT_VERIFY", payment.getId(), "recycle:verify:" + payment.getId(), null); + accounts.change(payment.getStoreId(), payment.getCustomerId(), payment.getRecycleItemId(), payment.getQuantity().negate(), payment.getQuantity().negate(), BizType.PAYMENT_VERIFY, payment.getId(), "recycle:verify:" + payment.getId(), null); physical.record(order, "PAYMENT_VERIFY", payment.getId(), payment.getId(), true, payment.getQuantity(), payment.getOccurredAt()); TimiException.requiredTrue(mapper.status(paymentId, GaoRecyclePayment.Status.PENDING, GaoRecyclePayment.Status.VERIFIED, login.getRequireLoginUserId(), Time.now(), null) == 1, "支付状态已变更"); refresh(order); diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleStatService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleStatService.java index 845628d..1d1c205 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleStatService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoRecycleStatService.java @@ -1,8 +1,8 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.mapper.GaoRecycleStatMapper; -import com.imyeyu.api.modules.gao.vo.GaoRecycleExchangeStatView; -import com.imyeyu.api.modules.gao.vo.GaoRecycleStatView; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleExchangeStatView; +import com.imyeyu.api.modules.gao.vo.recycle.GaoRecycleStatView; import com.imyeyu.java.bean.timi.TimiException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderChartService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderChartService.java index c95c273..b04e53d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderChartService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderChartService.java @@ -1,18 +1,18 @@ package com.imyeyu.api.modules.gao.service; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderSkuRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatIntervalStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderChartReq; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCalendarStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderConsumptionDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPaymentStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderStatusStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderTypeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderProductRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderSkuRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatDailyStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatIntervalStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderChartReq; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCalendarStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderConsumptionDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPaymentStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderStatusStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderTypeStatView; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderService.java index b69f508..fbf0d2c 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoSalesOrderService.java @@ -2,14 +2,14 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import com.imyeyu.api.modules.gao.entity.GaoSalesOrderItem; -import com.imyeyu.api.modules.gao.vo.GaoDirectProductOrderCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductCustomerView; -import com.imyeyu.api.modules.gao.vo.GaoPackageOrderCreateData; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCancelRequest; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPage; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderUpdateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoDirectProductOrderCreateRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductCustomerView; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageOrderCreateData; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCancelRequest; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPage; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderUpdateRequest; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.service.BaseService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreChartService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreChartService.java index 1cc6f73..f2a5ac9 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreChartService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreChartService.java @@ -1,12 +1,12 @@ package com.imyeyu.api.modules.gao.service; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerAgeStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerAgeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerGenderStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordNumberValueDailyStatView; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreDiaryService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreDiaryService.java index 1d44ab9..32d7573 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreDiaryService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreDiaryService.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.common.entity.Article; -import com.imyeyu.api.modules.gao.vo.GaoStoreDiaryPage; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreDiaryPage; import com.imyeyu.spring.bean.PageResult; /// GAO 门店日记服务 diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreSettingService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreSettingService.java index 85abd9d..216b10d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreSettingService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoStoreSettingService.java @@ -1,7 +1,7 @@ package com.imyeyu.api.modules.gao.service; import com.imyeyu.api.modules.common.entity.Setting; -import com.imyeyu.api.modules.gao.vo.GaoStoreBirthdayReminderSetting; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreBirthdayReminderSetting; import java.util.Collection; import java.util.List; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/GaoUserInviteService.java b/src/main/java/com/imyeyu/api/modules/gao/service/GaoUserInviteService.java index bedcac9..b7fd29f 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/GaoUserInviteService.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/GaoUserInviteService.java @@ -1,9 +1,9 @@ package com.imyeyu.api.modules.gao.service; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteCreateResponse; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteRegisterData; -import com.imyeyu.api.modules.gao.vo.GaoUserInviteValidateResponse; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteCreateRequest; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteCreateResponse; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteRegisterData; +import com.imyeyu.api.modules.gao.vo.user.GaoUserInviteValidateResponse; /// GAO 用户邀请注册服务 /// diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerBirthdayReminderServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerBirthdayReminderServiceImplement.java index 6260981..832d586 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerBirthdayReminderServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerBirthdayReminderServiceImplement.java @@ -12,7 +12,7 @@ import com.imyeyu.api.modules.gao.service.GaoCustomerFollowUpReminderService; import com.imyeyu.api.modules.gao.service.GaoStoreService; import com.imyeyu.api.modules.gao.service.GaoStoreSettingService; import com.imyeyu.api.modules.gao.util.LunarDate; -import com.imyeyu.api.modules.gao.vo.GaoStoreBirthdayReminderSetting; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreBirthdayReminderSetting; import com.imyeyu.java.TimiJava; import com.imyeyu.utils.Time; import freemarker.template.Configuration; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerChartServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerChartServiceImplement.java index 6f30c4f..e751be6 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerChartServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerChartServiceImplement.java @@ -5,12 +5,12 @@ import com.hankcs.hanlp.tokenizer.StandardTokenizer; import com.imyeyu.api.modules.gao.mapper.GaoCustomerMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerChartService; import com.imyeyu.api.modules.gao.service.GaoEventRecordService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerChartReq; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseTextView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseWordReq; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDiseaseWordView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseTextView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseWordReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDiseaseWordView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; import com.imyeyu.java.bean.timi.TimiException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerConsumptionRecordServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerConsumptionRecordServiceImplement.java index d0a47de..5fa3af8 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerConsumptionRecordServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerConsumptionRecordServiceImplement.java @@ -7,8 +7,8 @@ import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import com.imyeyu.api.modules.gao.mapper.GaoCustomerConsumptionRecordMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerConsumptionRecordService; import com.imyeyu.api.modules.gao.service.GaoCustomerService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerConsumptionRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerConsumptionRecordPageResult; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerConsumptionRecordPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerConsumptionRecordPageResult; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.mapper.BaseMapper; import com.imyeyu.spring.service.AbstractEntityService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerFollowUpReminderServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerFollowUpReminderServiceImplement.java index 1d355d0..331cfd6 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerFollowUpReminderServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerFollowUpReminderServiceImplement.java @@ -16,8 +16,8 @@ import com.imyeyu.api.modules.gao.mapper.GaoUserMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerFollowUpReminderService; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerFollowUpReminderPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerFollowUpReminderPageResult; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerFollowUpReminderPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerFollowUpReminderPageResult; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.entity.User; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerPackageServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerPackageServiceImplement.java index 580e226..015e4bf 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerPackageServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerPackageServiceImplement.java @@ -19,13 +19,13 @@ import com.imyeyu.api.modules.gao.service.GaoCustomerPackageService; import com.imyeyu.api.modules.gao.service.GaoPackageConfigService; import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackageCancelRequest; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePurchaseRequest; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPackagePurchaseItem; -import com.imyeyu.api.modules.gao.vo.GaoPackageOrderCreateData; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSelection; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCancelRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackageCancelRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePurchaseRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPackagePurchaseItem; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageOrderCreateData; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSelection; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCancelRequest; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.PermissionChecker; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerServiceImplement.java index 2f60616..a3659e8 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoCustomerServiceImplement.java @@ -12,12 +12,12 @@ import com.imyeyu.api.modules.gao.mapper.GaoCustomerMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoEventRecordService; import com.imyeyu.api.modules.gao.service.GaoPointAccountService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerAgeStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateCustomerView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerTrendStateReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerAgeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerDailyStateCustomerView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerGenderStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerTrendStateReq; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.UserLoginService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoEventRecordServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoEventRecordServiceImplement.java index d11cecb..024f46f 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoEventRecordServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoEventRecordServiceImplement.java @@ -18,15 +18,15 @@ import com.imyeyu.api.modules.gao.service.GaoEventRecordService; import com.imyeyu.api.modules.gao.service.GaoEventService; import com.imyeyu.api.modules.gao.service.GaoPointTriggerService; import com.imyeyu.api.modules.gao.service.GaoStoreBusinessDayService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerEventRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerChartReq; -import com.imyeyu.api.modules.gao.vo.GaoEventOptionStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoEventRecordRankPage; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerEventRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerChartReq; +import com.imyeyu.api.modules.gao.vo.event.GaoEventOptionStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordCalendarView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordDailyStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordNumberValueDailyStatView; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordPage; +import com.imyeyu.api.modules.gao.vo.event.GaoEventRecordRankPage; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.RoleChecker; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoFundRecordServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoFundRecordServiceImplement.java index 8ac00da..865bcca 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoFundRecordServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoFundRecordServiceImplement.java @@ -3,7 +3,7 @@ package com.imyeyu.api.modules.gao.service.implement; import com.imyeyu.api.modules.gao.entity.GaoFundRecord; import com.imyeyu.api.modules.gao.mapper.GaoFundRecordMapper; import com.imyeyu.api.modules.gao.service.GaoFundRecordService; -import com.imyeyu.api.modules.gao.vo.GaoFundRecordPage; +import com.imyeyu.api.modules.gao.vo.fund.GaoFundRecordPage; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.mapper.BaseMapper; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderFulfillmentServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderFulfillmentServiceImplement.java index bd0bcc9..43fc6cb 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderFulfillmentServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderFulfillmentServiceImplement.java @@ -28,25 +28,25 @@ import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoSalesOrderService; import com.imyeyu.api.modules.gao.service.GaoProductStockRecordService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentItemRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentPage; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentPrepareStockRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentReturnRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSelection; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentCreateItemRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentCustomerRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSkuView; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceItemView; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceOrderListRequest; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceOrderView; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentSourceRow; -import com.imyeyu.api.modules.gao.vo.GaoQuickFulfillmentUnitView; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentActionRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentItemRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentPage; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentPrepareStockRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentReturnRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSelection; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentCreateItemRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentCustomerRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSkuView; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceItemView; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceOrderListRequest; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceOrderView; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentSourceRow; +import com.imyeyu.api.modules.gao.vo.fulfillment.GaoQuickFulfillmentUnitView; import com.imyeyu.api.modules.user.service.PermissionChecker; -import com.imyeyu.api.modules.gao.vo.GaoStockChangeItem; +import com.imyeyu.api.modules.gao.vo.stock.GaoStockChangeItem; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.RoleChecker; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderPaymentServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderPaymentServiceImplement.java index f06e38b..cf07e44 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderPaymentServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderPaymentServiceImplement.java @@ -11,11 +11,11 @@ import com.imyeyu.api.modules.gao.service.GaoFundRecordService; import com.imyeyu.api.modules.gao.service.GaoOrderPaymentService; import com.imyeyu.api.modules.gao.service.GaoPointTriggerService; import com.imyeyu.api.modules.gao.service.GaoSalesOrderService; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentNoRefundRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentReceiveRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRefundRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentActionRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentNoRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentReceiveRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRevokeRequest; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.UserLoginService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderReminderServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderReminderServiceImplement.java index 7dd22fd..d2807a6 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderReminderServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderReminderServiceImplement.java @@ -10,7 +10,7 @@ import com.imyeyu.api.modules.gao.mapper.GaoOrderReminderMapper; import com.imyeyu.api.modules.gao.mapper.GaoRecycleReminderMapper; import com.imyeyu.api.modules.gao.mapper.GaoUserMapper; import com.imyeyu.api.modules.gao.service.GaoOrderReminderService; -import com.imyeyu.api.modules.gao.vo.GaoOrderReminderCustomer; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderReminderCustomer; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.utils.Time; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderStraightThroughServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderStraightThroughServiceImplement.java index dd7b30d..bdc93a4 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderStraightThroughServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoOrderStraightThroughServiceImplement.java @@ -10,11 +10,11 @@ import com.imyeyu.api.modules.gao.entity.GaoSalesOrderItem; import com.imyeyu.api.modules.gao.service.GaoOrderFulfillmentService; import com.imyeyu.api.modules.gao.service.GaoOrderPaymentService; import com.imyeyu.api.modules.gao.service.GaoOrderStraightThroughService; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentActionRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentItemRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentReceiveRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderStraightThroughRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentCreateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentActionRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentItemRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentReceiveRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderStraightThroughRequest; import com.imyeyu.api.modules.user.service.PermissionChecker; import com.imyeyu.java.TimiJava; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPackageConfigServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPackageConfigServiceImplement.java index d964acd..be41c2d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPackageConfigServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPackageConfigServiceImplement.java @@ -12,8 +12,8 @@ import com.imyeyu.api.modules.gao.mapper.GaoPackageConfigItemMapper; import com.imyeyu.api.modules.gao.mapper.GaoPackageConfigMapper; import com.imyeyu.api.modules.gao.service.GaoPackageConfigService; import com.imyeyu.api.modules.gao.service.GaoProductSkuService; -import com.imyeyu.api.modules.gao.vo.GaoPackageConfigPage; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSelection; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageConfigPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSelection; import com.imyeyu.api.modules.user.service.UserLoginService; import com.imyeyu.java.TimiJava; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointAccountServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointAccountServiceImplement.java index 180813c..79a2944 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointAccountServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointAccountServiceImplement.java @@ -8,7 +8,7 @@ import com.imyeyu.api.modules.gao.entity.GaoPointAccount; import com.imyeyu.api.modules.gao.mapper.GaoPointAccountMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoPointAccountService; -import com.imyeyu.api.modules.gao.vo.GaoPointAccountPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAccountPage; import com.imyeyu.java.bean.timi.TimiException; import com.imyeyu.spring.bean.PageResult; import com.imyeyu.spring.mapper.BaseMapper; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointChartServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointChartServiceImplement.java index d5ececc..600098d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointChartServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointChartServiceImplement.java @@ -2,9 +2,9 @@ package com.imyeyu.api.modules.gao.service.implement; import com.imyeyu.api.modules.gao.mapper.GaoPointChartMapper; import com.imyeyu.api.modules.gao.service.GaoPointChartService; -import com.imyeyu.api.modules.gao.vo.GaoPointDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq; +import com.imyeyu.api.modules.gao.vo.point.GaoPointDailyStatView; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionProductRankView; +import com.imyeyu.api.modules.gao.vo.store.GaoStoreChartReq; import com.imyeyu.java.bean.timi.TimiException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointLedgerServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointLedgerServiceImplement.java index e29c2ef..814d795 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointLedgerServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointLedgerServiceImplement.java @@ -17,8 +17,8 @@ import com.imyeyu.api.modules.gao.script.GaoPointDecision; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoPointAccountService; import com.imyeyu.api.modules.gao.service.GaoPointLedgerService; -import com.imyeyu.api.modules.gao.vo.GaoPointAdjustRequest; -import com.imyeyu.api.modules.gao.vo.GaoPointLedgerPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAdjustRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointLedgerPage; import com.imyeyu.api.modules.system.entity.Logger; import com.imyeyu.api.modules.system.service.LoggerService; import com.imyeyu.api.modules.user.service.UserLoginService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedeemSkuServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedeemSkuServiceImplement.java index 253f18d..18b1fd5 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedeemSkuServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedeemSkuServiceImplement.java @@ -11,9 +11,9 @@ import com.imyeyu.api.modules.gao.service.GaoPointRedeemSkuService; import com.imyeyu.api.modules.gao.service.GaoProductService; import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuPageResult; -import com.imyeyu.api.modules.gao.vo.GaoPointRedeemSkuRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuPageResult; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedeemSkuRequest; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.java.TimiJava; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java index 7dd9cb1..b907ffb 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java @@ -24,10 +24,10 @@ import com.imyeyu.api.modules.gao.service.GaoProductService; import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoProductStockService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionPage; -import com.imyeyu.api.modules.gao.vo.GaoPointRedemptionReturnRequest; -import com.imyeyu.api.modules.gao.vo.GaoStockChangeItem; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionCreateRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionPage; +import com.imyeyu.api.modules.gao.vo.point.GaoPointRedemptionReturnRequest; +import com.imyeyu.api.modules.gao.vo.stock.GaoStockChangeItem; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.PermissionChecker; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointTriggerServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointTriggerServiceImplement.java index dc8d8b6..d4d42a4 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointTriggerServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointTriggerServiceImplement.java @@ -18,7 +18,7 @@ import com.imyeyu.api.modules.gao.service.GaoEventRecordService; import com.imyeyu.api.modules.gao.service.GaoPointLedgerService; import com.imyeyu.api.modules.gao.service.GaoPointRuleService; import com.imyeyu.api.modules.gao.service.GaoPointTriggerService; -import com.imyeyu.api.modules.gao.vo.GaoPointAdjustRequest; +import com.imyeyu.api.modules.gao.vo.point.GaoPointAdjustRequest; import com.imyeyu.api.modules.user.service.UserLoginService; import com.imyeyu.java.TimiJava; import com.imyeyu.java.bean.timi.TimiException; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductCategoryServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductCategoryServiceImplement.java index bac88c4..d1c2ba2 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductCategoryServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductCategoryServiceImplement.java @@ -5,7 +5,7 @@ import com.imyeyu.api.modules.gao.entity.GaoProductCategory; import com.imyeyu.api.modules.gao.mapper.GaoProductCategoryMapper; import com.imyeyu.api.modules.gao.service.GaoProductCategoryService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryPage; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.UserLoginService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductChartServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductChartServiceImplement.java index 9779df6..3ab51fe 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductChartServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductChartServiceImplement.java @@ -2,16 +2,16 @@ package com.imyeyu.api.modules.gao.service.implement; import com.imyeyu.api.modules.gao.mapper.GaoProductChartMapper; import com.imyeyu.api.modules.gao.service.GaoProductChartService; -import com.imyeyu.api.modules.gao.vo.GaoProductCategoryStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductTypeStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductCategoryStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductTypeStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductUnitSalesRankView; import com.imyeyu.java.bean.timi.TimiException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductServiceImplement.java index ceeed9a..45c75ca 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductServiceImplement.java @@ -17,7 +17,7 @@ import com.imyeyu.api.modules.gao.service.GaoProductCategoryService; import com.imyeyu.api.modules.gao.service.GaoProductService; import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoProductSpecService; -import com.imyeyu.api.modules.gao.vo.GaoProductPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductPage; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAuditContext; import com.imyeyu.api.modules.system.audit.OperationAudit; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuChartServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuChartServiceImplement.java index 713f3bf..1807f39 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuChartServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuChartServiceImplement.java @@ -2,14 +2,14 @@ package com.imyeyu.api.modules.gao.service.implement; import com.imyeyu.api.modules.gao.mapper.GaoProductSkuChartMapper; import com.imyeyu.api.modules.gao.service.GaoProductSkuChartService; -import com.imyeyu.api.modules.gao.vo.GaoProductChartReq; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuSalesRankView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockHealthView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuStockMovementDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductChartReq; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuSalesRankView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockHealthView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuStockMovementDailyStatView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSalesRankView; import com.imyeyu.java.bean.timi.TimiException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuServiceImplement.java index b7f674f..ba341f4 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductSkuServiceImplement.java @@ -24,8 +24,8 @@ import com.imyeyu.api.modules.gao.mapper.GaoProductSpecValueMapper; import com.imyeyu.api.modules.gao.service.GaoProductService; import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSelection; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuFulfillmentView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSelection; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuFulfillmentView; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.UserLoginService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockRecordServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockRecordServiceImplement.java index 1a4ccf0..76d015c 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockRecordServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockRecordServiceImplement.java @@ -11,9 +11,9 @@ import com.imyeyu.api.modules.gao.mapper.GaoPointRedemptionMapper; import com.imyeyu.api.modules.gao.mapper.GaoProductStockRecordMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerService; import com.imyeyu.api.modules.gao.service.GaoProductStockRecordService; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordPageResult; -import com.imyeyu.api.modules.gao.vo.GaoProductStockRecordSkuSummaryView; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordPageResult; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockRecordSkuSummaryView; import com.imyeyu.api.modules.user.entity.User; import com.imyeyu.api.modules.user.service.UserService; import com.imyeyu.java.TimiJava; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockServiceImplement.java index 5944b6c..060a464 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoProductStockServiceImplement.java @@ -14,13 +14,13 @@ import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoProductStockRecordService; import com.imyeyu.api.modules.gao.service.GaoProductStockService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSelection; -import com.imyeyu.api.modules.gao.vo.GaoProductStockChangeRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockManualInBatchRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockManualRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoProductStockPage; -import com.imyeyu.api.modules.gao.vo.GaoProductStockProductView; -import com.imyeyu.api.modules.gao.vo.GaoStockChangeItem; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSelection; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockChangeRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockManualInBatchRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockManualRevokeRequest; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockPage; +import com.imyeyu.api.modules.gao.vo.product.GaoProductStockProductView; +import com.imyeyu.api.modules.gao.vo.stock.GaoStockChangeItem; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.UserLoginService; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderChartServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderChartServiceImplement.java index 2385ec7..a849729 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderChartServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderChartServiceImplement.java @@ -2,19 +2,19 @@ package com.imyeyu.api.modules.gao.service.implement; import com.imyeyu.api.modules.gao.mapper.GaoSalesOrderChartMapper; import com.imyeyu.api.modules.gao.service.GaoSalesOrderChartService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderProductRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerOrderSkuRankView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerRepeatIntervalStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderChartReq; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCalendarStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderConsumptionDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderDailyStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPaymentStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderStatusStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderTypeStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderProductRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerOrderSkuRankView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatDailyStatView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerRepeatIntervalStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderChartReq; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCalendarStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderConsumptionDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderDailyStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPaymentStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderStatusStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderTypeStatView; import com.imyeyu.java.bean.timi.TimiException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderServiceImplement.java index 699f13a..fd728d6 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoSalesOrderServiceImplement.java @@ -16,7 +16,7 @@ import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import com.imyeyu.api.modules.gao.entity.GaoSalesOrderItem; import com.imyeyu.api.modules.gao.entity.GaoStore; import com.imyeyu.api.modules.gao.mapper.GaoProductSkuUnitMapper; -import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeWriteMapper; +import com.imyeyu.api.modules.gao.mapper.GaoRecycleExchangeMapper; import com.imyeyu.api.modules.gao.mapper.GaoSalesOrderItemMapper; import com.imyeyu.api.modules.gao.mapper.GaoSalesOrderMapper; import com.imyeyu.api.modules.gao.service.GaoCustomerService; @@ -30,23 +30,23 @@ import com.imyeyu.api.modules.gao.service.GaoProductSkuService; import com.imyeyu.api.modules.gao.service.GaoSalesOrderService; import com.imyeyu.api.modules.gao.service.GaoStoreScopeService; import com.imyeyu.api.modules.gao.service.GaoStoreService; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductCustomerRow; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductCustomerView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductPage; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductSummaryView; -import com.imyeyu.api.modules.gao.vo.GaoCustomerProductView; -import com.imyeyu.api.modules.gao.vo.GaoDirectProductOrderCreateRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentReturnRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderFulfillmentRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRefundRequest; -import com.imyeyu.api.modules.gao.vo.GaoOrderPaymentRevokeRequest; -import com.imyeyu.api.modules.gao.vo.GaoPackageOrderCreateData; -import com.imyeyu.api.modules.gao.vo.GaoProductSkuUnitSelection; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderCancelRequest; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderItemRequest; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderPage; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderReceivableStatView; -import com.imyeyu.api.modules.gao.vo.GaoSalesOrderUpdateRequest; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductCustomerRow; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductCustomerView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductPage; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductSummaryView; +import com.imyeyu.api.modules.gao.vo.customer.GaoCustomerProductView; +import com.imyeyu.api.modules.gao.vo.order.GaoDirectProductOrderCreateRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentReturnRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.packageconfig.GaoPackageOrderCreateData; +import com.imyeyu.api.modules.gao.vo.product.GaoProductSkuUnitSelection; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderCancelRequest; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderItemRequest; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderPage; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderReceivableStatView; +import com.imyeyu.api.modules.gao.vo.salesorder.GaoSalesOrderUpdateRequest; import com.imyeyu.api.modules.system.audit.AuditOperation; import com.imyeyu.api.modules.system.audit.OperationAudit; import com.imyeyu.api.modules.user.service.PermissionChecker; @@ -87,7 +87,7 @@ public class GaoSalesOrderServiceImplement extends AbstractEntityService customerIds; +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleAccountCustomerPageResult.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleAccountCustomerPageResult.java new file mode 100644 index 0000000..b080acb --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleAccountCustomerPageResult.java @@ -0,0 +1,14 @@ +package com.imyeyu.api.modules.gao.vo.recycle; + +import com.imyeyu.api.modules.gao.entity.GaoRecycleAccount; +import com.imyeyu.spring.bean.PageResult; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.List; + +/// 客户回收物额度分页结果及按回收物汇总 +@Data +@EqualsAndHashCode(callSuper = true) +public class GaoRecycleAccountCustomerPageResult extends PageResult { + private List totals; +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleAccountCustomerView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleAccountCustomerView.java new file mode 100644 index 0000000..d2ef47a --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleAccountCustomerView.java @@ -0,0 +1,13 @@ +package com.imyeyu.api.modules.gao.vo.recycle; + +import com.imyeyu.api.modules.gao.entity.GaoCustomer; +import com.imyeyu.api.modules.gao.entity.GaoRecycleAccount; +import lombok.Data; +import java.util.List; + +/// 客户及其回收物额度 +@Data +public class GaoRecycleAccountCustomerView { + private GaoCustomer customer; + private List accounts; +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeActionRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeActionRequest.java similarity index 87% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeActionRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeActionRequest.java index 49aa1fd..1b231fe 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeActionRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeActionRequest.java @@ -1,4 +1,6 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; + +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentRevokeRequest; import com.imyeyu.api.modules.common.entity.Attachment; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeCreateRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeCreateRequest.java similarity index 96% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeCreateRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeCreateRequest.java index 4ea028d..e7ee19d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeCreateRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeCreateRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import com.imyeyu.api.modules.common.entity.Attachment; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeDetail.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeDetail.java similarity index 93% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeDetail.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeDetail.java index b78c2e3..31c2766 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeDetail.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeDetail.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import com.imyeyu.api.modules.common.entity.Attachment; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchange; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeItemRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeItemRequest.java similarity index 84% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeItemRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeItemRequest.java index 3754bcf..fc2b97b 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeItemRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeItemRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import lombok.Data; import java.math.BigDecimal; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeRuleRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeRuleRequest.java similarity index 93% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeRuleRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeRuleRequest.java index 0bc8b79..1c374be 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeRuleRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeRuleRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import com.imyeyu.api.modules.gao.entity.GaoRecycleExchangeRule; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeStatView.java similarity index 91% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeStatView.java index 269784f..3e035ec 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleExchangeStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleExchangeStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleItemRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleItemRequest.java similarity index 93% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleItemRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleItemRequest.java index 113a6b5..3dba754 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleItemRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleItemRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import com.imyeyu.api.modules.gao.entity.GaoRecycleItem; import com.imyeyu.api.modules.common.entity.Attachment; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleLedgerPage.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleLedgerPage.java new file mode 100644 index 0000000..03636b1 --- /dev/null +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleLedgerPage.java @@ -0,0 +1,13 @@ +package com.imyeyu.api.modules.gao.vo.recycle; + +import com.imyeyu.java.bean.BasePage; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/// 回收物额度流水分页查询 +@Data +@EqualsAndHashCode(callSuper = true) +public class GaoRecycleLedgerPage extends BasePage { + private String storeId; + private String customerId; +} diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecyclePaymentRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecyclePaymentRequest.java similarity index 90% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecyclePaymentRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecyclePaymentRequest.java index 29920d2..f5c6d48 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecyclePaymentRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecyclePaymentRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import com.imyeyu.api.modules.common.entity.Attachment; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleStatView.java similarity index 90% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleStatView.java index aa9e424..4565522 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoRecycleStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/recycle/GaoRecycleStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.recycle; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderCalendarStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderCalendarStatView.java similarity index 88% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderCalendarStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderCalendarStatView.java index de30244..185295f 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderCalendarStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderCalendarStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderCancelRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderCancelRequest.java similarity index 73% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderCancelRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderCancelRequest.java index 223326c..d4013d3 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderCancelRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderCancelRequest.java @@ -1,4 +1,9 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; + +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentReturnRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderFulfillmentRevokeRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRefundRequest; +import com.imyeyu.api.modules.gao.vo.order.GaoOrderPaymentRevokeRequest; import com.imyeyu.api.modules.common.entity.Attachment; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderChartReq.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderChartReq.java similarity index 93% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderChartReq.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderChartReq.java index a484dc1..e8bea18 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderChartReq.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderChartReq.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderConsumptionDailyStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderConsumptionDailyStatView.java similarity index 89% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderConsumptionDailyStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderConsumptionDailyStatView.java index 6e6aa06..1dfaaf9 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderConsumptionDailyStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderConsumptionDailyStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderDailyStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderDailyStatView.java similarity index 91% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderDailyStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderDailyStatView.java index c8b6b31..601e7b8 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderDailyStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderDailyStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderItemRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderItemRequest.java similarity index 89% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderItemRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderItemRequest.java index 89f995c..67eb60f 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderItemRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderItemRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderPage.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderPage.java similarity index 96% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderPage.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderPage.java index e608a6c..9f43434 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderPage.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderPage.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import com.imyeyu.java.bean.BasePage; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderPaymentStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderPaymentStatView.java similarity index 92% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderPaymentStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderPaymentStatView.java index af68e5f..2d46244 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderPaymentStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderPaymentStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderReceivableStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderReceivableStatView.java similarity index 91% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderReceivableStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderReceivableStatView.java index b306990..7d0012b 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderReceivableStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderReceivableStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderStatusStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderStatusStatView.java similarity index 90% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderStatusStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderStatusStatView.java index d5abe12..e5e6350 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderStatusStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderStatusStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderTypeStatView.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderTypeStatView.java similarity index 91% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderTypeStatView.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderTypeStatView.java index db5d249..ea3a40f 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderTypeStatView.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderTypeStatView.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import com.imyeyu.api.modules.gao.entity.GaoSalesOrder; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderUpdateRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderUpdateRequest.java similarity index 90% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderUpdateRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderUpdateRequest.java index 237194f..8011ae3 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoSalesOrderUpdateRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/salesorder/GaoSalesOrderUpdateRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.salesorder; import com.imyeyu.api.modules.common.entity.Attachment; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStockChangeItem.java b/src/main/java/com/imyeyu/api/modules/gao/vo/stock/GaoStockChangeItem.java similarity index 97% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoStockChangeItem.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/stock/GaoStockChangeItem.java index 3d73636..6dabb4e 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStockChangeItem.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/stock/GaoStockChangeItem.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.stock; import com.fasterxml.jackson.databind.JsonNode; import com.imyeyu.api.modules.gao.entity.GaoProduct; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreBirthdayReminderSetting.java b/src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreBirthdayReminderSetting.java similarity index 92% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreBirthdayReminderSetting.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreBirthdayReminderSetting.java index 76c0b13..aee8e36 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreBirthdayReminderSetting.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreBirthdayReminderSetting.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.store; import com.imyeyu.api.modules.user.entity.User; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreChartReq.java b/src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreChartReq.java similarity index 88% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreChartReq.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreChartReq.java index f3c343a..a99b6fe 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreChartReq.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreChartReq.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.store; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreDiaryPage.java b/src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreDiaryPage.java similarity index 90% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreDiaryPage.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreDiaryPage.java index 4739549..9483f76 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoStoreDiaryPage.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/store/GaoStoreDiaryPage.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.store; import com.imyeyu.java.bean.BasePage; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteCreateRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteCreateRequest.java similarity index 89% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteCreateRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteCreateRequest.java index 52bca73..651b873 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteCreateRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteCreateRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.user; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteCreateResponse.java b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteCreateResponse.java similarity index 87% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteCreateResponse.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteCreateResponse.java index fda22cc..2c2983d 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteCreateResponse.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteCreateResponse.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.user; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteRegisterData.java b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteRegisterData.java similarity index 94% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteRegisterData.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteRegisterData.java index c624f94..10edfe3 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteRegisterData.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteRegisterData.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.user; import com.imyeyu.api.modules.user.validation.UserPassword; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteRegisterRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteRegisterRequest.java similarity index 93% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteRegisterRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteRegisterRequest.java index f4a9fa5..1baa653 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteRegisterRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteRegisterRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.user; import jakarta.validation.Valid; import jakarta.validation.constraints.NotBlank; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteValidateRequest.java b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteValidateRequest.java similarity index 89% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteValidateRequest.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteValidateRequest.java index b601a72..12742fd 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteValidateRequest.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteValidateRequest.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.user; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Pattern; diff --git a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteValidateResponse.java b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteValidateResponse.java similarity index 88% rename from src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteValidateResponse.java rename to src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteValidateResponse.java index 5c9ff40..51f969c 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/vo/GaoUserInviteValidateResponse.java +++ b/src/main/java/com/imyeyu/api/modules/gao/vo/user/GaoUserInviteValidateResponse.java @@ -1,4 +1,4 @@ -package com.imyeyu.api.modules.gao.vo; +package com.imyeyu.api.modules.gao.vo.user; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/src/main/resources/mapper/timi-server/gao/GaoCustomerMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoCustomerMapper.xml index 234cb44..bda3bb2 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoCustomerMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoCustomerMapper.xml @@ -87,7 +87,7 @@ LIMIT #{offset}, #{limit} - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(`created_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, COUNT(1) AS `newCustomerCount` @@ -101,7 +101,7 @@ ORDER BY `dateValue` ASC - SELECT `name`, CAST(DATE_FORMAT(FROM_UNIXTIME(`created_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue` @@ -124,7 +124,7 @@ AND `deleted_at` IS NULL - SELECT IFNULL(CAST(`gender` AS CHAR), 'UNKNOWN') AS `genderCode`, COUNT(1) AS `count` @@ -135,7 +135,7 @@ GROUP BY IFNULL(CAST(`gender` AS CHAR), 'UNKNOWN') - SELECT COALESCE(`age`, TIMESTAMPDIFF(YEAR, `birthdate`, CURDATE())) AS `age`, COUNT(1) AS `count` @@ -148,7 +148,7 @@ ORDER BY COALESCE(`age`, TIMESTAMPDIFF(YEAR, `birthdate`, CURDATE())) ASC - SELECT `remark`, `disease` diff --git a/src/main/resources/mapper/timi-server/gao/GaoEventRecordMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoEventRecordMapper.xml index 1ebf273..d1f8a21 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoEventRecordMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoEventRecordMapper.xml @@ -182,7 +182,7 @@ AND r.`number_value` IS NOT NULL - SELECT ro.`group_id` AS `groupId`, ro.`group_name_snapshot` AS `groupName`, @@ -259,7 +259,7 @@ WHERE - SELECT @@ -441,7 +441,7 @@ ) - SELECT r.`event_id` AS `eventId`, r.`registered_date_value` AS `dateValue`, @@ -456,7 +456,7 @@ r.`registered_date_value` ASC, r.`event_id` ASC - SELECT r.`event_id` AS `eventId`, r.`registered_date_value` AS `dateValue`, @@ -472,7 +472,7 @@ r.`registered_date_value` ASC, r.`event_id` ASC - SELECT r.`id`, r.`customer_id` AS `customerId`, @@ -508,7 +508,7 @@ ) - SELECT r.`event_id` AS `eventId`, r.`registered_date_value` AS `dateValue`, @@ -523,7 +523,7 @@ r.`registered_date_value` ASC, r.`event_id` ASC - SELECT r.`id`, r.`customer_id` AS `customerId`, diff --git a/src/main/resources/mapper/timi-server/gao/GaoOrderReminderMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoOrderReminderMapper.xml index 3516a4e..1e2d218 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoOrderReminderMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoOrderReminderMapper.xml @@ -48,7 +48,7 @@ ) ff ON ff.`store_id` = o.`store_id` AND ff.`sales_order_id` = o.`id` - FROM `gao_sales_order` o @@ -59,7 +59,7 @@ ORDER BY o.`store_id`, c.`name`, o.`customer_id`, o.`purchased_at`, o.`order_no` - FROM `gao_sales_order` o @@ -75,7 +75,7 @@ ORDER BY o.`store_id`, c.`name`, o.`customer_id`, o.`purchased_at`, o.`order_no` - FROM `gao_sales_order` o diff --git a/src/main/resources/mapper/timi-server/gao/GaoPointChartMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoPointChartMapper.xml index d1632ec..03b595b 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoPointChartMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoPointChartMapper.xml @@ -1,7 +1,7 @@ - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(l.`occurred_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, COALESCE(SUM(CASE WHEN l.`change_type` = 'EARN' THEN l.`point_delta` ELSE 0 END), 0) AS `earnedPoints`, @@ -17,7 +17,7 @@ ORDER BY `dateValue` ASC - SELECT r.`product_id_snapshot` AS `productId`, COALESCE(MAX(NULLIF(r.`product_name_snapshot`, '')), '未命名产品') AS `productName`, diff --git a/src/main/resources/mapper/timi-server/gao/GaoPointRedemptionMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoPointRedemptionMapper.xml index f6dcf56..733a876 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoPointRedemptionMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoPointRedemptionMapper.xml @@ -68,7 +68,7 @@ AND `redeemed_at` >= #{beginAt} AND `redeemed_at` <= #{endAt} - SELECT COALESCE(SUM(`r`.`base_quantity`), 0) AS `redeemed_base_quantity_total`, COALESCE(SUM(`return_summary`.`base_quantity_total`), 0) AS `returned_base_quantity_total`, COALESCE(SUM(`r`.`base_quantity` - COALESCE(`return_summary`.`base_quantity_total`, 0)), 0) AS `net_redeemed_base_quantity_total` diff --git a/src/main/resources/mapper/timi-server/gao/GaoProductChartMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoProductChartMapper.xml index 608c591..3abeefc 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoProductChartMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoProductChartMapper.xml @@ -27,7 +27,7 @@ AND o.`purchased_at` <= #{endAt} - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(o.`purchased_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, COUNT(DISTINCT o.`id`) AS `orderCount`, @@ -45,7 +45,7 @@ ORDER BY `dateValue` ASC - SELECT i.`product_id_snapshot` AS `productId`, MAX(i.`product_name_snapshot`) AS `productName`, @@ -68,7 +68,7 @@ LIMIT #{topN} - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(f.`delivered_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, COALESCE(SUM(CASE WHEN i.`item_type` = 'DIRECT_PRODUCT' @@ -99,7 +99,7 @@ ORDER BY `dateValue` ASC - SELECT i.`product_id_snapshot` AS `productId`, MAX(i.`product_name_snapshot`) AS `productName`, @@ -124,7 +124,7 @@ LIMIT #{topN} - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(r.`occurred_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, COALESCE(SUM(CASE WHEN r.`on_hand_delta` > 0 THEN r.`on_hand_delta` ELSE 0 END), 0) AS `inQuantity`, @@ -145,7 +145,7 @@ ORDER BY `dateValue` ASC - SELECT p.`id` AS `productId`, p.`name` AS `productName`, @@ -175,7 +175,7 @@ LIMIT #{topN} - SELECT p.`product_type` AS `productType`, COUNT(1) AS `productCount` @@ -186,7 +186,7 @@ ORDER BY p.`product_type` ASC - SELECT p.`category_id` AS `categoryId`, COALESCE(c.`name`, '未分类') AS `categoryName`, @@ -199,7 +199,7 @@ ORDER BY `productCount` DESC, `categoryName` ASC - SELECT i.`product_id_snapshot` AS `productId`, MAX(i.`product_name_snapshot`) AS `productName`, diff --git a/src/main/resources/mapper/timi-server/gao/GaoProductSkuChartMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoProductSkuChartMapper.xml index 0f467ac..b1b75b8 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoProductSkuChartMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoProductSkuChartMapper.xml @@ -15,7 +15,7 @@ AND o.`purchased_at` <= #{endAt} - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(o.`purchased_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, i.`sku_id` AS `skuId`, @@ -37,7 +37,7 @@ ORDER BY `dateValue` ASC, i.`sku_id` ASC - SELECT i.`sku_id` AS `skuId`, MAX(i.`sku_code_snapshot`) AS `skuCode`, @@ -61,7 +61,7 @@ LIMIT #{topN} - SELECT i.`sku_id` AS `skuId`, MAX(i.`sku_code_snapshot`) AS `skuCode`, @@ -85,7 +85,7 @@ LIMIT #{topN} - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(f.`delivered_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, fi.`sku_id` AS `skuId`, @@ -119,7 +119,7 @@ ORDER BY `dateValue` ASC, fi.`sku_id` ASC - SELECT i.`sku_id` AS `skuId`, MAX(i.`sku_code_snapshot`) AS `skuCode`, @@ -143,7 +143,7 @@ LIMIT #{topN} - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(r.`occurred_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, r.`sku_id` AS `skuId`, @@ -167,7 +167,7 @@ ORDER BY `dateValue` ASC, r.`sku_id` ASC - SELECT k.`id` AS `skuId`, k.`code` AS `skuCode`, diff --git a/src/main/resources/mapper/timi-server/gao/GaoProductStockMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoProductStockMapper.xml index f668887..b1121c1 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoProductStockMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoProductStockMapper.xml @@ -78,7 +78,7 @@ AND p.`store_id` = #{storeId} AND (p.`code` LIKE CONCAT('%', #{keyword}, '%') OR p.`name` LIKE CONCAT('%', #{keyword}, '%') OR p.`name_pinyin_full` LIKE CONCAT(#{keyword}, '%') OR p.`name_pinyin_initial` LIKE CONCAT(#{keyword}, '%') OR p.`name_pinyin_mixed` LIKE CONCAT(#{keyword}, '%')) - SELECT p.`id` AS `product_id`, p.`code` AS `product_code`, p.`name` AS `product_name`, diff --git a/src/main/resources/mapper/timi-server/gao/GaoProductStockRecordMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoProductStockRecordMapper.xml index 2e6efef..db746e0 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoProductStockRecordMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoProductStockRecordMapper.xml @@ -61,7 +61,7 @@ ORDER BY r.`occurred_at` DESC, r.`id` DESC LIMIT #{offset}, #{limit} - SELECT COALESCE(SUM(CASE WHEN 0 < r.`on_hand_delta` THEN COALESCE(r.`base_quantity`, 0) ELSE 0 END), 0) AS `in_base_quantity_total`, COALESCE(SUM(CASE WHEN r.`on_hand_delta` < 0 THEN COALESCE(r.`base_quantity`, 0) ELSE 0 END), 0) AS `out_base_quantity_total` FROM `gao_product_stock_record` r diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleAccountMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleAccountMapper.xml index 71a712d..d73ba25 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoRecycleAccountMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleAccountMapper.xml @@ -1,23 +1,7 @@ - - - INSERT INTO gao_recycle_product_yield (id,store_id,sku_id,recycle_item_id,quantity_per_base,created_at) - VALUES (#{id},#{store},#{sku},#{item},#{quantity},#{now}) ON DUPLICATE KEY UPDATE - quantity_per_base=VALUES(quantity_per_base),updated_at=VALUES(created_at),deleted_at=NULL - - - UPDATE gao_recycle_product_yield - SET deleted_at=#{now}, updated_at=#{now} - WHERE store_id=#{store} AND sku_id=#{sku} AND recycle_item_id=#{item} AND deleted_at IS NULL - - SELECT a.id, a.customer_id AS customerId, a.recycle_item_id AS recycleItemId, a.balance, a.reserved, i.name AS recycleName, i.unit_name AS recycleUnit, a.created_at AS createdAt, a.updated_at AS updatedAt FROM gao_recycle_account a @@ -68,7 +52,7 @@ AND a.recycle_item_id=#{item} - SELECT a.customer_id AS customerId, a.recycle_item_id AS recycleItemId, a.balance, a.reserved, i.name AS recycleName, i.unit_name AS recycleUnit FROM gao_recycle_account a LEFT JOIN gao_recycle_item i ON i.id=a.recycle_item_id AND i.store_id=a.store_id @@ -81,7 +65,7 @@ ORDER BY a.recycle_item_id - SELECT a.recycle_item_id AS recycleItemId, i.name AS recycleName, i.unit_name AS recycleUnit, SUM(a.balance) AS balance, SUM(a.reserved) AS reserved FROM gao_recycle_account a @@ -102,29 +86,6 @@ GROUP BY a.recycle_item_id, i.name, i.unit_name ORDER BY i.name, a.recycle_item_id - - - INSERT IGNORE INTO gao_recycle_account (id,store_id,customer_id,recycle_item_id,balance,reserved,created_at) diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleConfigMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleConfigMapper.xml deleted file mode 100644 index 448c997..0000000 --- a/src/main/resources/mapper/timi-server/gao/GaoRecycleConfigMapper.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - INSERT INTO gao_recycle_exchange_rule_item - (id,rule_id,sku_id,sku_unit_id,exchange_quantity,sort,created_at) - VALUES (#{id},#{ruleId},#{skuId},#{skuUnitId},#{exchangeQuantity},#{sort},#{createdAt}) - - - - - - INSERT INTO gao_recycle_item (id, store_id, name, unit_name, allow_decimal_quantity, status, remark, - created_at) - VALUES (#{id}, #{storeId} , #{name} , #{unitName} , #{allowDecimalQuantity} , #{status} , #{remark} , - #{createdAt} ) - - - UPDATE gao_recycle_item - SET name=#{name}, unit_name=#{unitName}, allow_decimal_quantity=#{allowDecimalQuantity}, - status=#{status}, remark=#{remark}, updated_at=#{updatedAt} - WHERE store_id=#{storeId} AND id=#{id} - - - - - INSERT INTO gao_recycle_exchange_rule (id, store_id, recycle_item_id, recycle_quantity, status, sort, - remark, created_at) - VALUES (#{id}, #{storeId} , #{recycleItemId} , #{recycleQuantity} , #{status} , #{sort} , #{remark} , - #{createdAt} ) - - - UPDATE gao_recycle_exchange_rule - SET recycle_item_id=#{recycleItemId}, recycle_quantity=#{recycleQuantity}, status=#{status}, - sort=#{sort}, remark=#{remark}, updated_at=#{updatedAt} - WHERE store_id=#{storeId} AND id=#{id} - - diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeActionMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeActionMapper.xml new file mode 100644 index 0000000..cf7aab1 --- /dev/null +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeActionMapper.xml @@ -0,0 +1,10 @@ + + + + + INSERT INTO gao_recycle_exchange_action + (id,store_id,exchange_id,request_no,request_fingerprint,action_type,operator_user_id,occurred_at,created_at,reason,remark,retained_recycle_quantity) + VALUES + (#{id},#{storeId},#{exchangeId},#{requestNo},#{requestFingerprint},#{actionType},#{operatorUserId},#{occurredAt},#{createdAt},#{reason},#{remark},#{retainedRecycleQuantity}) + + diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeWriteMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeMapper.xml similarity index 65% rename from src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeWriteMapper.xml rename to src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeMapper.xml index fd841b2..0045772 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeWriteMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeMapper.xml @@ -1,6 +1,6 @@ - + UPDATE gao_recycle_exchange SET status=#{status}, updated_at=#{updatedAt} @@ -12,12 +12,6 @@ WHERE sales_order_id=#{orderId} LIMIT 1 - - INSERT INTO gao_recycle_exchange_action - (id,store_id,exchange_id,request_no,request_fingerprint,action_type,operator_user_id,occurred_at,created_at,reason,remark,retained_recycle_quantity) - VALUES - (#{id},#{storeId},#{exchangeId},#{requestNo},#{requestFingerprint},#{actionType},#{operatorUserId},#{occurredAt},#{createdAt},#{reason},#{remark},#{retainedRecycleQuantity}) - UPDATE gao_recycle_exchange SET status = 'CANCELLED' , updated_at = #{updatedAt} diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeRuleItemMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeRuleItemMapper.xml new file mode 100644 index 0000000..fabe2e2 --- /dev/null +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeRuleItemMapper.xml @@ -0,0 +1,18 @@ + + + + + + INSERT INTO gao_recycle_exchange_rule_item + (id,rule_id,sku_id,sku_unit_id,exchange_quantity,sort,created_at) + VALUES (#{id},#{ruleId},#{skuId},#{skuUnitId},#{exchangeQuantity},#{sort},#{createdAt}) + + diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeRuleMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeRuleMapper.xml new file mode 100644 index 0000000..ed823ca --- /dev/null +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleExchangeRuleMapper.xml @@ -0,0 +1,40 @@ + + + + + + + INSERT INTO gao_recycle_exchange_rule (id, store_id, recycle_item_id, recycle_quantity, status, sort, + remark, created_at) + VALUES (#{id}, #{storeId} , #{recycleItemId} , #{recycleQuantity} , #{status} , #{sort} , #{remark} , + #{createdAt} ) + + + UPDATE gao_recycle_exchange_rule + SET recycle_item_id=#{recycleItemId}, recycle_quantity=#{recycleQuantity}, status=#{status}, + sort=#{sort}, remark=#{remark}, updated_at=#{updatedAt} + WHERE store_id=#{storeId} AND id=#{id} + + diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleItemMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleItemMapper.xml new file mode 100644 index 0000000..40b95f4 --- /dev/null +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleItemMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + INSERT INTO gao_recycle_item (id, store_id, name, unit_name, allow_decimal_quantity, status, remark, + created_at) + VALUES (#{id}, #{storeId} , #{name} , #{unitName} , #{allowDecimalQuantity} , #{status} , #{remark} , + #{createdAt} ) + + + UPDATE gao_recycle_item + SET name=#{name}, unit_name=#{unitName}, allow_decimal_quantity=#{allowDecimalQuantity}, + status=#{status}, remark=#{remark}, updated_at=#{updatedAt} + WHERE store_id=#{storeId} AND id=#{id} + + diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleLedgerMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleLedgerMapper.xml index 93bcfff..0d6dade 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoRecycleLedgerMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleLedgerMapper.xml @@ -1,20 +1,24 @@ - - + SELECT COUNT(1) FROM gao_recycle_ledger WHERE + + + - SELECT customer_id,recycle_item_id,biz_type,biz_id,balance_delta,reserved_delta,reason FROM gao_recycle_ledger WHERE store_id=#{store} AND request_no=#{request} FOR UPDATE diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleProductYieldMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleProductYieldMapper.xml new file mode 100644 index 0000000..3e05ca2 --- /dev/null +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleProductYieldMapper.xml @@ -0,0 +1,43 @@ + + + + + + INSERT INTO gao_recycle_product_yield (id,store_id,sku_id,recycle_item_id,quantity_per_base,created_at) + VALUES (#{id},#{store},#{sku},#{item},#{quantity},#{now}) ON DUPLICATE KEY UPDATE + quantity_per_base=VALUES(quantity_per_base),updated_at=VALUES(created_at),deleted_at=NULL + + + UPDATE gao_recycle_product_yield + SET deleted_at=#{now}, updated_at=#{now} + WHERE store_id=#{store} AND sku_id=#{sku} AND recycle_item_id=#{item} AND deleted_at IS NULL + + + + + diff --git a/src/main/resources/mapper/timi-server/gao/GaoRecycleStatMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoRecycleStatMapper.xml index a383381..ec91525 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoRecycleStatMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoRecycleStatMapper.xml @@ -1,7 +1,7 @@ - SELECT t.recycle_item_id AS recycleItemId, t.recycle_name AS recycleName, t.recycle_unit AS recycleUnit, SUM(t.received) AS receivedQuantity, SUM(t.returned) AS returnedQuantity, SUM(t.received - t.returned) AS netQuantity @@ -16,7 +16,7 @@ ) t GROUP BY t.recycle_item_id, t.recycle_name, t.recycle_unit - SELECT t.sku_id AS skuId, t.sku_unit_id AS skuUnitId, t.product_name AS productName, t.unit_name AS unit, SUM(t.created) AS createdQuantity, SUM(t.verified) AS verifiedQuantity, SUM(t.revoked) AS revokedQuantity diff --git a/src/main/resources/mapper/timi-server/gao/GaoSalesOrderChartMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoSalesOrderChartMapper.xml index a9a1e68..6965da9 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoSalesOrderChartMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoSalesOrderChartMapper.xml @@ -17,7 +17,7 @@ AND o.`status` <> 'CANCELLED' - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(o.`purchased_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, COUNT(1) AS `orderCount`, @@ -33,7 +33,7 @@ ORDER BY `dateValue` ASC - SELECT o.`order_type` AS `orderType`, COUNT(1) AS `orderCount`, @@ -48,7 +48,7 @@ ORDER BY o.`order_type` ASC - SELECT o.`payment_status` AS `paymentStatus`, COUNT(1) AS `orderCount`, @@ -64,7 +64,7 @@ ORDER BY o.`payment_status` ASC - SELECT o.`customer_id` AS `customerId`, c.`code` AS `customerCode`, @@ -83,7 +83,7 @@ LIMIT #{topN} - SELECT i.`product_id_snapshot` AS `productId`, MAX(i.`product_name_snapshot`) AS `productName`, @@ -119,7 +119,7 @@ LIMIT #{topN} - SELECT i.`sku_id` AS `skuId`, MAX(i.`sku_code_snapshot`) AS `skuCode`, @@ -151,7 +151,7 @@ LIMIT #{topN} - SELECT o.`status` AS `status`, COUNT(1) AS `orderCount`, @@ -165,7 +165,7 @@ ORDER BY o.`status` ASC - SELECT COUNT(1) AS `orderCount`, COALESCE(SUM(o.`sale_amount`), 0) AS `saleAmount`, @@ -179,7 +179,7 @@ - WITH `daily_stat` AS ( SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(r.`effective_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, @@ -204,7 +204,7 @@ ORDER BY `dateValue` ASC - SELECT CAST(DATE_FORMAT(FROM_UNIXTIME(o.`purchased_at` / 1000), '%Y%m%d') AS UNSIGNED) AS `dateValue`, COUNT(1) AS `orderCount`, @@ -230,7 +230,7 @@ AND o.`purchased_at` <= #{endAt} - WITH `ranked_order` AS ( SELECT o.`customer_id`, @@ -251,7 +251,7 @@ ORDER BY `dateValue` ASC - WITH `ranked_order` AS ( SELECT o.`customer_id`, diff --git a/src/main/resources/mapper/timi-server/gao/GaoSalesOrderMapper.xml b/src/main/resources/mapper/timi-server/gao/GaoSalesOrderMapper.xml index 8356515..664306e 100644 --- a/src/main/resources/mapper/timi-server/gao/GaoSalesOrderMapper.xml +++ b/src/main/resources/mapper/timi-server/gao/GaoSalesOrderMapper.xml @@ -102,7 +102,7 @@ ORDER BY o.`purchased_at` DESC, o.`created_at` DESC LIMIT #{offset}, #{limit} - SELECT o.`id` AS `salesOrderId`, o.`order_no` AS `orderNo`, o.`order_type` AS `orderType`, o.`payment_status` AS `paymentStatus`, o.`recycle_required_quantity` AS `recycleRequiredQuantity`, @@ -142,7 +142,7 @@ ORDER BY o.`purchased_at` ASC, o.`created_at` ASC, o.`id` ASC, i.`sort` ASC, i.`created_at` ASC, i.`id` ASC - SELECT COUNT(1) AS `orderCount`, COALESCE(SUM(o.`sale_amount`), 0) AS `saleAmount`, @@ -189,7 +189,7 @@ LEFT JOIN `gao_customer` c ON c.`id` = o.`customer_id` WHERE - SELECT o.`customer_id`, c.`code` AS `customer_code`, c.`name` AS `customer_name`, COUNT(DISTINCT o.`id`) AS `order_count` FROM `gao_sales_order_item` i JOIN `gao_sales_order` o ON o.`id` = i.`sales_order_id` @@ -199,7 +199,7 @@ ORDER BY c.`name` ASC, c.`code` ASC, o.`customer_id` ASC LIMIT #{offset}, #{limit} - SELECT i.`id`, i.`sales_order_id`, o.`customer_id`, c.`code` AS `customer_code`, c.`name` AS `customer_name`, o.`order_no`, o.`order_type`, o.`status` AS `order_status`, o.`purchased_at`, i.`item_type`, i.`gifted`, i.`sku_id`, i.`sku_unit_id`, i.`product_name_snapshot`, i.`product_id_snapshot`,