Browse Source

首次提交

Yangzw 2 months ago
parent
commit
5fef0243ae
100 changed files with 695 additions and 2115 deletions
  1. 8 6
      feifan-module-distri/feifan-module-distri-api/src/main/java/cn/newfeifan/mall/module/distri/enums/IntegralEnum.java
  2. 24 0
      feifan-module-distri/feifan-module-distri-api/src/main/java/cn/newfeifan/mall/module/distri/enums/IntegralTypeEnum.java
  3. 0 48
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/consumptionchangelog/vo/ConsumptionChangeLogPageReqVO.java
  4. 0 59
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/consumptionchangelog/vo/ConsumptionChangeLogRespVO.java
  5. 0 43
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/consumptionchangelog/vo/ConsumptionChangeLogSaveReqVO.java
  6. 0 12
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/excelvo/DailyBillExcelRespVO.java
  7. 0 19
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/vo/DailyBillPageReqVO.java
  8. 0 24
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/vo/DailyBillRespVO.java
  9. 0 23
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/vo/DailyBillSaveReqVO.java
  10. 61 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/integralchangelog/vo/IntegralChangeLogPageReqVO.java
  11. 74 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/integralchangelog/vo/IntegralChangeLogRespVO.java
  12. 57 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/integralchangelog/vo/IntegralChangeLogSaveReqVO.java
  13. 0 17
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ptdailybill/vo/PtDailyBillPageReqVO.java
  14. 0 24
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ptdailybill/vo/PtDailyBillRespVO.java
  15. 0 24
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ptdailybill/vo/PtDailyBillSaveReqVO.java
  16. 0 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/convert/dailybill/DailyBillConvert.java
  17. 0 64
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/consumptionchangelog/ConsumptionChangeLogDO.java
  18. 5 27
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/dailybill/DailyBillDO.java
  19. 16 18
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/integral/IntegralDO.java
  20. 82 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/integralchangelog/IntegralChangeLogDO.java
  21. 2 29
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/ptdailybill/PtDailyBillDO.java
  22. 0 28
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/consumptionchangelog/ConsumptionChangeLogMapper.java
  23. 0 2
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/dailybill/DailyBillMapper.java
  24. 26 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/integralchangelog/IntegralChangeLogMapper.java
  25. 0 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/ptdailybill/PtDailyBillMapper.java
  26. 0 56
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/consumptionchangelog/ConsumptionChangeLogService.java
  27. 0 87
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/consumptionchangelog/ConsumptionChangeLogServiceImpl.java
  28. 0 9
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/dailybill/DailyBillServiceImpl.java
  29. 10 12
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/dailybill/dto/OrderDTO.java
  30. 11 29
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integral/IntegralService.java
  31. 73 116
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integral/IntegralServiceImpl.java
  32. 26 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integralchangelog/IntegralChangeLogService.java
  33. 39 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integralchangelog/IntegralChangeLogServiceImpl.java
  34. 9 9
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/usertopupconsumptionpointsorder/UserTopUpConsumptionPointsOrderServiceImpl.java
  35. 0 13
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/skuapply/vo/SkuApplyPageReqVO.java
  36. 0 16
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/skuapply/vo/SkuApplyRespVO.java
  37. 0 14
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/skuapply/vo/SkuApplySaveReqVO.java
  38. 0 12
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSkuRespVO.java
  39. 0 12
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSkuSaveReqVO.java
  40. 1 9
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java
  41. 3 24
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuRespVO.java
  42. 2 23
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuSaveReqVO.java
  43. 0 8
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuSimpleRespVO.java
  44. 2 17
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spuapply/vo/SpuApplyPageReqVO.java
  45. 3 23
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spuapply/vo/SpuApplyRespVO.java
  46. 2 23
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spuapply/vo/SpuApplySaveReqVO.java
  47. 1 1
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/convert/comment/ProductCommentConvert.java
  48. 0 19
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/sku/ProductSkuDO.java
  49. 0 16
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/skuapply/SkuApplyDO.java
  50. 2 32
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/spu/ProductSpuDO.java
  51. 2 22
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/spuapply/SpuApplyDO.java
  52. 0 4
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/mysql/skuapply/SkuApplyMapper.java
  53. 1 6
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/mysql/spuapply/SpuApplyMapper.java
  54. 1 2
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/sku/ProductSkuService.java
  55. 4 12
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/sku/ProductSkuServiceImpl.java
  56. 1 2
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/skuapply/SkuApplyService.java
  57. 4 11
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/skuapply/SkuApplyServiceImpl.java
  58. 24 28
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spu/ProductSpuServiceImpl.java
  59. 20 34
      feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spuapply/SpuApplyServiceImpl.java
  60. 1 1
      feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/controller/admin/coupon/CouponController.java
  61. 2 2
      feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/convert/bargain/BargainHelpConvert.java
  62. 2 2
      feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/convert/bargain/BargainRecordConvert.java
  63. 1 1
      feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/convert/combination/CombinationActivityConvert.java
  64. 5 10
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/aftersale/vo/AfterSaleBaseVO.java
  65. 2 5
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/aftersale/vo/AfterSalePageReqVO.java
  66. 2 2
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/base/member/user/MemberUserRespVO.java
  67. 3 24
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/TradeOrderController.java
  68. 2 5
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/TradeOrderDetailController.java
  69. 4 44
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderBaseVO.java
  70. 0 40
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderDetailRespVO.java
  71. 1 4
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderItemBaseVO.java
  72. 0 3
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderPageItemRespVO.java
  73. 0 8
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/app/order/AppTradeOrderController.java
  74. 0 1
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/aftersale/AfterSaleConvert.java
  75. 2 4
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/brokerage/BrokerageRecordConvert.java
  76. 2 2
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/brokerage/BrokerageUserConvert.java
  77. 1 1
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/brokerage/BrokerageWithdrawConvert.java
  78. 4 19
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/order/TradeOrderConvert.java
  79. 5 13
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/dataobject/aftersale/AfterSaleDO.java
  80. 4 152
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/dataobject/order/TradeOrderDO.java
  81. 0 62
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/dataobject/order/TradeOrderItemDO.java
  82. 0 22
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/mysql/order/TradeOrderMapper.java
  83. 1 1
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/mq/consumer/order/OrderConsumer.java
  84. 25 56
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/aftersale/AfterSaleServiceImpl.java
  85. 1 1
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/brokerage/BrokerageUserServiceImpl.java
  86. 0 22
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderQueryService.java
  87. 0 18
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderQueryServiceImpl.java
  88. 0 30
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderUpdateService.java
  89. 19 235
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderUpdateServiceImpl.java
  90. 0 8
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeBargainOrderHandler.java
  91. 0 52
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeBrokerageOrderHandler.java
  92. 0 17
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeCombinationOrderHandler.java
  93. 2 11
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeCouponOrderHandler.java
  94. 4 25
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeMemberPointOrderHandler.java
  95. 0 6
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeSeckillOrderHandler.java
  96. 1 1
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/price/calculator/TradePriceCalculatorHelper.java
  97. 0 28
      feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/price/calculator/TradeSeckillActivityPriceCalculator.java
  98. 1 1
      feifan-module-mall/feifan-module-trade-biz/src/main/resources/mapper/order/BrokerageUserMapper.xml
  99. 1 1
      feifan-module-member/feifan-module-member-api/src/main/java/cn/newfeifan/mall/module/member/api/user/dto/MemberUserRespDTO.java
  100. 1 1
      feifan-module-member/feifan-module-member-biz/src/main/java/cn/newfeifan/mall/module/member/controller/admin/point/vo/recrod/MemberPointRecordRespVO.java

+ 8 - 6
feifan-module-distri/feifan-module-distri-api/src/main/java/cn/newfeifan/mall/module/distri/enums/ConsumptionEnum.java → feifan-module-distri/feifan-module-distri-api/src/main/java/cn/newfeifan/mall/module/distri/enums/IntegralEnum.java

@@ -5,25 +5,27 @@ import lombok.Getter;
 
 @Getter
 @AllArgsConstructor
-public enum ConsumptionEnum {
-
+public enum IntegralEnum {
     PT_TOP_TUP(1,"平台充值"),
-    COMMISSION_TRANSITION(2,"佣金转化为消费分"),
-    CONSUMPTION_TRANSFER(3,"消费分转出"),
-    CONSUMPTION_RECIPIENT(4,"消费分转入"),
+    RED_INTEGRAL_TRANSITION_GREEN_INTEGRAL(2,"红积分转换成绿积分"),
+    YELLOW_INTEGRAL_TRANSITION_RED_INTEGRAL(3,"黄积分转换成红积分"),
+    INTEGRAL_TRANSFER(4,"积分转出"),
+    INTEGRAL_RECIPIENT(5,"积分转入"),
     COMMISSION_WITHDRAWAL(5,"佣金提现"),
     PAY_ORDER(6,"购物支付"),
     REFUND_ORDER(7,"退回退款返回"),
     TOP_UP_GET(8,"充值获得"),
     CANCEL_ORDER_BACK_CONSUMPTION_POINTS(9,"手动取消订单退回消费分"),
     ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL(10,"支付超时退回消费分"),
+    RECOMMENDED_PERSON_QUOTA(11, "直推奖获得"),           //直推奖获得可用积分
+    ORDER_CANCEL_BY_USER_REFUND_INTEGRAL(12,"手动取消支付返回"),
     ;
 
     private final Integer type;
     private final String name;
 
     public static String getName(Integer type){
-        for (ConsumptionEnum value : ConsumptionEnum.values()) {
+        for (IntegralEnum value : IntegralEnum.values()) {
             if(value.getType().equals(type)){
                 return value.getName();
             }

+ 24 - 0
feifan-module-distri/feifan-module-distri-api/src/main/java/cn/newfeifan/mall/module/distri/enums/IntegralTypeEnum.java

@@ -0,0 +1,24 @@
+package cn.newfeifan.mall.module.distri.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum IntegralTypeEnum {
+    RED_INTEGRAL(1, "红色积分"),
+    YELLOW_INTEGRAL(2, "黄色积分"),
+    GREEN_INTEGRAL(3, "绿色积分");
+
+    private final Integer type;
+    private final String name;
+
+    public static IntegralTypeEnum getIntegralTypeEnumByType(int status) {
+        for (IntegralTypeEnum integralTypeEnum : IntegralTypeEnum.values()) {
+            if (integralTypeEnum.getType() == status) {
+                return integralTypeEnum;
+            }
+        }
+        return null;
+    }
+}

+ 0 - 48
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/consumptionchangelog/vo/ConsumptionChangeLogPageReqVO.java

@@ -1,48 +0,0 @@
-package cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo;
-
-import cn.newfeifan.mall.framework.common.pojo.PageParam;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.ToString;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-
-import static cn.newfeifan.mall.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
-
-@Schema(description = "管理后台 - 平台消费分变动记录分页 Request VO")
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ToString(callSuper = true)
-public class ConsumptionChangeLogPageReqVO extends PageParam {
-
-    @Schema(description = "用户ID", example = "10871")
-    private Long userId;
-
-    @Schema(description = "变动的消费分")
-    private Long consumptionPoints;
-
-    @Schema(description = "变动后消费分")
-    private Long afterConsumptionPoints;
-
-    @Schema(description = "消费分变动类型", example = "2")
-    private Integer consumptionStatus;
-
-    @Schema(description = "创建时间")
-    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
-    private LocalDateTime[] createTime;
-
-    @Schema(description = "实际消费分")
-    private Long practicalConsumptionPoints;
-
-    @Schema(description = "消费分产生对象", example = "23323")
-    private Long generateUserId;
-
-    @Schema(description = "订单Id", example = "18715")
-    private Long orderId;
-
-    @Schema(description = "订单编号")
-    private String orderNo;
-
-}

+ 0 - 59
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/consumptionchangelog/vo/ConsumptionChangeLogRespVO.java

@@ -1,59 +0,0 @@
-package cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo;
-
-import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
-import com.alibaba.excel.annotation.ExcelProperty;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-@Schema(description = "管理后台 - 平台消费分变动记录 Response VO")
-@Data
-@ExcelIgnoreUnannotated
-public class ConsumptionChangeLogRespVO {
-
-    @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7160")
-    @ExcelProperty("日志编号")
-    private Long id;
-
-    @Schema(description = "用户ID", example = "10871")
-    @ExcelProperty("用户ID")
-    private Long userId;
-
-    @Schema(description = "变动的消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("变动的消费分")
-    private Long consumptionPoints;
-
-    @Schema(description = "变动后消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("变动后消费分")
-    private Long afterConsumptionPoints;
-
-    @Schema(description = "消费分变动类型", example = "2")
-    @ExcelProperty("消费分变动类型")
-    private Integer consumptionStatus;
-
-    @Schema(description = "类型名称")
-    private String consumptionStatusName;
-
-    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("创建时间")
-    private LocalDateTime createTime;
-
-    @Schema(description = "实际消费分")
-    @ExcelProperty("实际消费分")
-    private Long practicalConsumptionPoints;
-
-    @Schema(description = "消费分产生对象", example = "23323")
-    private Long generateUserId;
-
-    private String generateUserName;
-
-    @Schema(description = "订单Id", example = "18715")
-    @ExcelProperty("订单Id")
-    private Long orderId;
-
-    @Schema(description = "订单编号")
-    @ExcelProperty("订单编号")
-    private String orderNo;
-
-}

+ 0 - 43
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/consumptionchangelog/vo/ConsumptionChangeLogSaveReqVO.java

@@ -1,43 +0,0 @@
-package cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Builder;
-import lombok.Data;
-
-import javax.validation.constraints.NotNull;
-
-@Schema(description = "管理后台 - 平台消费分变动记录新增/修改 Request VO")
-@Data
-@Builder
-public class ConsumptionChangeLogSaveReqVO {
-
-    @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7160")
-    private Long id;
-
-    @Schema(description = "用户ID", example = "10871")
-    private Long userId;
-
-    @Schema(description = "变动的消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "变动的消费分不能为空")
-    private Long consumptionPoints;
-
-    @Schema(description = "变动后消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "变动后消费分不能为空")
-    private Long afterConsumptionPoints;
-
-    @Schema(description = "消费分变动类型", example = "2")
-    private Integer consumptionStatus;
-
-    @Schema(description = "实际消费分")
-    private Long practicalConsumptionPoints;
-
-    @Schema(description = "消费分产生对象", example = "23323")
-    private Long generateUserId;
-
-    @Schema(description = "订单Id", example = "18715")
-    private Long orderId;
-
-    @Schema(description = "订单编号")
-    private String orderNo;
-
-}

+ 0 - 12
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/excelvo/DailyBillExcelRespVO.java

@@ -15,18 +15,6 @@ public class DailyBillExcelRespVO {
     @ExcelProperty("账单编号")
     private Long id;
 
-    @Schema(description = "金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "30486")
-    @ExcelProperty("金额")
-    private Double price;
-
-    @Schema(description = "确收金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "29815")
-    @ExcelProperty("确收金额")
-    private Double receivedPrice;
-
-    @Schema(description = "退款金额, 单位: 分", requiredMode = Schema.RequiredMode.REQUIRED, example = "11962")
-    @ExcelProperty("退款金额")
-    private Double refundPrice;
-
     @Schema(description = "积分", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("积分")
     private Double integral;

+ 0 - 19
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/vo/DailyBillPageReqVO.java

@@ -18,12 +18,6 @@ import static cn.newfeifan.mall.framework.common.util.date.DateUtils.FORMAT_YEAR
 @ToString(callSuper = true)
 public class DailyBillPageReqVO extends PageParam {
 
-    @Schema(description = "金额,单位:分", example = "30486")
-    private Long price;
-
-    @Schema(description = "确收金额,单位:分", example = "29815")
-    private Long receivedPrice;
-
     @Schema(description = "订单数,默认为0", example = "27164")
     private Long orderCount;
 
@@ -40,9 +34,6 @@ public class DailyBillPageReqVO extends PageParam {
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 
-    @Schema(description = "退款金额, 单位: 分", example = "11962")
-    private Long refundPrice;
-
     @Schema(description = "积分")
     private Long integral;
 
@@ -55,14 +46,4 @@ public class DailyBillPageReqVO extends PageParam {
     @Schema(description = "订单所属日期")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDate[] orderCalcTime;
-
-    @Schema(description = "消费分")
-    private Long consumptionPoints;
-
-    @Schema(description = "确收消费分")
-    private Long receivedConsumptionPoints;
-
-    @Schema(description = "退款消费分")
-    private Long refundConsumptionPoints;
-
 }

+ 0 - 24
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/vo/DailyBillRespVO.java

@@ -16,14 +16,6 @@ public class DailyBillRespVO {
     @ExcelProperty("账单编号")
     private Long id;
 
-    @Schema(description = "金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "30486")
-    @ExcelProperty("金额,单位:分")
-    private Long price;
-
-    @Schema(description = "确收金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "29815")
-    @ExcelProperty("确收金额,单位:分")
-    private Long receivedPrice;
-
     @Schema(description = "订单数,默认为0", requiredMode = Schema.RequiredMode.REQUIRED, example = "27164")
     @ExcelProperty("订单数,默认为0")
     private Long orderCount;
@@ -52,10 +44,6 @@ public class DailyBillRespVO {
     @ExcelProperty("创建时间")
     private LocalDateTime createTime;
 
-    @Schema(description = "退款金额, 单位: 分", requiredMode = Schema.RequiredMode.REQUIRED, example = "11962")
-    @ExcelProperty("退款金额, 单位: 分")
-    private Long refundPrice;
-
     @Schema(description = "积分", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("积分")
     private Long integral;
@@ -72,18 +60,6 @@ public class DailyBillRespVO {
     @ExcelProperty("订单所属日期")
     private LocalDate orderCalcTime;
 
-    @Schema(description = "消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("消费分")
-    private Long consumptionPoints;
-
-    @Schema(description = "确收消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("确收消费分")
-    private Long receivedConsumptionPoints;
-
-    @Schema(description = "退款消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("退款消费分")
-    private Long refundConsumptionPoints;
-
     public String getOrderCalcTime() {
         return orderCalcTime.toString();
     }

+ 0 - 23
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/dailybill/vo/DailyBillSaveReqVO.java

@@ -14,14 +14,6 @@ public class DailyBillSaveReqVO {
     @Schema(description = "账单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "27497")
     private Long id;
 
-    @Schema(description = "金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "30486")
-    @NotNull(message = "金额,单位:分不能为空")
-    private Long price;
-
-    @Schema(description = "确收金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "29815")
-    @NotNull(message = "确收金额,单位:分不能为空")
-    private Long receivedPrice;
-
     @Schema(description = "订单数,默认为0", requiredMode = Schema.RequiredMode.REQUIRED, example = "27164")
     @NotNull(message = "订单数,默认为0不能为空")
     private Long orderCount;
@@ -36,10 +28,6 @@ public class DailyBillSaveReqVO {
     @NotEmpty(message = "订单ID列表,文本类型不能为空")
     private String orderIds;
 
-    @Schema(description = "退款金额, 单位: 分", requiredMode = Schema.RequiredMode.REQUIRED, example = "11962")
-    @NotNull(message = "退款金额, 单位: 分不能为空")
-    private Long refundPrice;
-
     @Schema(description = "积分", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotNull(message = "积分不能为空")
     private Long integral;
@@ -56,15 +44,4 @@ public class DailyBillSaveReqVO {
     @NotNull(message = "订单所属日期不能为空")
     private LocalDate orderCalcTime;
 
-    @Schema(description = "消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "消费分不能为空")
-    private Long consumptionPoints;
-
-    @Schema(description = "确收消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "确收消费分不能为空")
-    private Long receivedConsumptionPoints;
-
-    @Schema(description = "退款消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "退款消费分不能为空")
-    private Long refundConsumptionPoints;
 }

+ 61 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/integralchangelog/vo/IntegralChangeLogPageReqVO.java

@@ -0,0 +1,61 @@
+package cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo;
+
+import lombok.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import cn.newfeifan.mall.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static cn.newfeifan.mall.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 平台积分变动记录分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class IntegralChangeLogPageReqVO extends PageParam {
+
+    @Schema(description = "用户ID", example = "19315")
+    private Long userId;
+
+    @Schema(description = "积分类型", example = "1")
+    private Integer integralType;
+
+    @Schema(description = "创建时间")
+    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+    private LocalDateTime[] createTime;
+
+    @Schema(description = "订单Id", example = "11076")
+    private Long orderId;
+
+    @Schema(description = "订单编号")
+    private String orderNo;
+
+    @Schema(description = "变动的积分")
+    private Long integralPoints;
+
+    @Schema(description = "变动后积分")
+    private Long afterIntegralPoints;
+
+    @Schema(description = "实际积分")
+    private Long practicalIntegralPoints;
+
+    @Schema(description = "变动峰值")
+    private Long maxAvailablePointsAmount;
+
+    @Schema(description = "变动后峰值")
+    private Long afterMaxAvailablePointsAmount;
+
+    @Schema(description = "超出团队奖")
+    private Long accumulatedQuotaAmount;
+
+    @Schema(description = "超出直推奖")
+    private Long ancestorQuotaAmount;
+
+    @Schema(description = "积分变动类型", example = "2")
+    private Integer integralStatus;
+
+    @Schema(description = "积分产生对象", example = "4055")
+    private Long generateUserId;
+
+
+}

+ 74 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/integralchangelog/vo/IntegralChangeLogRespVO.java

@@ -0,0 +1,74 @@
+package cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.time.LocalDateTime;
+import com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - 平台积分变动记录 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class IntegralChangeLogRespVO {
+
+    @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "306")
+    @ExcelProperty("日志编号")
+    private Long id;
+
+    @Schema(description = "用户ID", example = "19315")
+    @ExcelProperty("用户ID")
+    private Long userId;
+
+    @Schema(description = "积分类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    @ExcelProperty("积分类型")
+    private Integer integralType;
+
+    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("创建时间")
+    private LocalDateTime createTime;
+
+    @Schema(description = "订单Id", example = "11076")
+    @ExcelProperty("订单Id")
+    private Long orderId;
+
+    @Schema(description = "订单编号")
+    @ExcelProperty("订单编号")
+    private String orderNo;
+
+    @Schema(description = "变动的积分", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("变动的积分")
+    private Long integralPoints;
+
+    @Schema(description = "变动后积分", requiredMode = Schema.RequiredMode.REQUIRED)
+    @ExcelProperty("变动后积分")
+    private Long afterIntegralPoints;
+
+    @Schema(description = "实际积分")
+    @ExcelProperty("实际积分")
+    private Long practicalIntegralPoints;
+
+    @Schema(description = "变动峰值")
+    @ExcelProperty("变动峰值")
+    private Long maxAvailablePointsAmount;
+
+    @Schema(description = "变动后峰值")
+    @ExcelProperty("变动后峰值")
+    private Long afterMaxAvailablePointsAmount;
+
+    @Schema(description = "超出团队奖")
+    @ExcelProperty("超出团队奖")
+    private Long accumulatedQuotaAmount;
+
+    @Schema(description = "超出直推奖")
+    @ExcelProperty("超出直推奖")
+    private Long ancestorQuotaAmount;
+
+    @Schema(description = "积分变动类型", example = "2")
+    @ExcelProperty("积分变动类型")
+    private Integer integralStatus;
+
+    @Schema(description = "积分产生对象", example = "4055")
+    @ExcelProperty("积分产生对象")
+    private Long generateUserId;
+
+    private String generateUserName;
+}

+ 57 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/integralchangelog/vo/IntegralChangeLogSaveReqVO.java

@@ -0,0 +1,57 @@
+package cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import javax.validation.constraints.*;
+
+@Schema(description = "管理后台 - 平台积分变动记录新增/修改 Request VO")
+@Data
+@Builder
+public class IntegralChangeLogSaveReqVO {
+
+    @Schema(description = "日志编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "306")
+    private Long id;
+
+    @Schema(description = "用户ID", example = "19315")
+    private Long userId;
+
+    @Schema(description = "积分类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    @NotNull(message = "积分类型不能为空")
+    private Integer integralType;
+
+    @Schema(description = "订单Id", example = "11076")
+    private Long orderId;
+
+    @Schema(description = "订单编号")
+    private String orderNo;
+
+    @Schema(description = "变动的积分", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "变动的积分不能为空")
+    private Long integralPoints;
+
+    @Schema(description = "变动后积分", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "变动后积分不能为空")
+    private Long afterIntegralPoints;
+
+    @Schema(description = "实际积分")
+    private Long practicalIntegralPoints;
+
+    @Schema(description = "变动峰值")
+    private Long maxAvailablePointsAmount;
+
+    @Schema(description = "变动后峰值")
+    private Long afterMaxAvailablePointsAmount;
+
+    @Schema(description = "超出团队奖")
+    private Long accumulatedQuotaAmount;
+
+    @Schema(description = "超出直推奖")
+    private Long ancestorQuotaAmount;
+
+    @Schema(description = "积分变动类型", example = "2")
+    private Integer integralStatus;
+
+    @Schema(description = "积分产生对象", example = "4055")
+    private Long generateUserId;
+
+}

+ 0 - 17
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ptdailybill/vo/PtDailyBillPageReqVO.java

@@ -18,18 +18,9 @@ import static cn.newfeifan.mall.framework.common.util.date.DateUtils.FORMAT_YEAR
 @ToString(callSuper = true)
 public class PtDailyBillPageReqVO extends PageParam {
 
-    @Schema(description = "金额,单位:分", example = "24178")
-    private Long price;
-
-    @Schema(description = "确收金额,单位:分", example = "4933")
-    private Long receivedPrice;
-
     @Schema(description = "订单数,默认为0", example = "24153")
     private Long orderCount;
 
-    @Schema(description = "退款金额, 单位: 分", example = "25468")
-    private Long refundPrice;
-
     @Schema(description = "积分")
     private Long integral;
 
@@ -50,13 +41,5 @@ public class PtDailyBillPageReqVO extends PageParam {
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 
-    @Schema(description = "消费分")
-    private Long consumptionPoints;
-
-    @Schema(description = "确收消费分")
-    private Long receivedConsumptionPoints;
-
-    @Schema(description = "退款消费分")
-    private Long refundConsumptionPoints;
 
 }

+ 0 - 24
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ptdailybill/vo/PtDailyBillRespVO.java

@@ -17,22 +17,10 @@ public class PtDailyBillRespVO {
     @ExcelProperty("账单编号")
     private Long id;
 
-    @Schema(description = "金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "24178")
-    @ExcelProperty("金额,单位:分")
-    private Long price;
-
-    @Schema(description = "确收金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "4933")
-    @ExcelProperty("确收金额,单位:分")
-    private Long receivedPrice;
-
     @Schema(description = "订单数,默认为0", requiredMode = Schema.RequiredMode.REQUIRED, example = "24153")
     @ExcelProperty("订单数,默认为0")
     private Long orderCount;
 
-    @Schema(description = "退款金额, 单位: 分", requiredMode = Schema.RequiredMode.REQUIRED, example = "25468")
-    @ExcelProperty("退款金额, 单位: 分")
-    private Long refundPrice;
-
     @Schema(description = "积分", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("积分")
     private Long integral;
@@ -57,18 +45,6 @@ public class PtDailyBillRespVO {
     @ExcelProperty("创建时间")
     private LocalDateTime createTime;
 
-    @Schema(description = "消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("消费分")
-    private Long consumptionPoints;
-
-    @Schema(description = "确收消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("确收消费分")
-    private Long receivedConsumptionPoints;
-
-    @Schema(description = "退款消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("退款消费分")
-    private Long refundConsumptionPoints;
-
     public String getOrderCalcTime() {
         return orderCalcTime.toString();
     }

+ 0 - 24
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ptdailybill/vo/PtDailyBillSaveReqVO.java

@@ -14,22 +14,10 @@ public class PtDailyBillSaveReqVO {
     @Schema(description = "账单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4121")
     private Long id;
 
-    @Schema(description = "金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "24178")
-    @NotNull(message = "金额,单位:分不能为空")
-    private Long price;
-
-    @Schema(description = "确收金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "4933")
-    @NotNull(message = "确收金额,单位:分不能为空")
-    private Long receivedPrice;
-
     @Schema(description = "订单数,默认为0", requiredMode = Schema.RequiredMode.REQUIRED, example = "24153")
     @NotNull(message = "订单数,默认为0不能为空")
     private Long orderCount;
 
-    @Schema(description = "退款金额, 单位: 分", requiredMode = Schema.RequiredMode.REQUIRED, example = "25468")
-    @NotNull(message = "退款金额, 单位: 分不能为空")
-    private Long refundPrice;
-
     @Schema(description = "积分", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotNull(message = "积分不能为空")
     private Long integral;
@@ -50,16 +38,4 @@ public class PtDailyBillSaveReqVO {
     @NotEmpty(message = "订单ID列表,文本类型不能为空")
     private String orderIds;
 
-    @Schema(description = "消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "消费分不能为空")
-    private Long consumptionPoints;
-
-    @Schema(description = "确收消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "确收消费分不能为空")
-    private Long receivedConsumptionPoints;
-
-    @Schema(description = "退款消费分", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "退款消费分不能为空")
-    private Long refundConsumptionPoints;
-
 }

+ 0 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/convert/dailybill/DailyBillConvert.java

@@ -16,9 +16,6 @@ public interface DailyBillConvert {
     default List<DailyBillExcelRespVO> convertList(List<DailyBillRespVO> list) {
         List<DailyBillExcelRespVO> respVOList = BeanUtils.toBean(list, DailyBillExcelRespVO.class);
         for (DailyBillExcelRespVO respVO : respVOList) {
-            respVO.setPrice(respVO.getPrice() / ONE_HUNDRED);
-            respVO.setReceivedPrice(respVO.getReceivedPrice() / ONE_HUNDRED);
-            respVO.setRefundPrice(respVO.getRefundPrice() / ONE_HUNDRED);
             respVO.setIntegral(respVO.getIntegral() / MILLION);
             respVO.setReceivedIntegral(respVO.getReceivedIntegral() / MILLION);
             respVO.setRefundIntegral(respVO.getRefundIntegral() / MILLION);

+ 0 - 64
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/consumptionchangelog/ConsumptionChangeLogDO.java

@@ -1,64 +0,0 @@
-package cn.newfeifan.mall.module.distri.dal.dataobject.consumptionchangelog;
-
-import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.*;
-
-/**
- * 平台消费分变动记录 DO
- *
- * @author 非繁人
- */
-@TableName("distri_consumption_change_log")
-@KeySequence("distri_consumption_change_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ToString(callSuper = true)
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class ConsumptionChangeLogDO extends BaseDO {
-
-    /**
-     * 日志编号
-     */
-    @TableId
-    private Long id;
-    /**
-     * 用户ID
-     */
-    private Long userId;
-    /**
-     * 变动的消费分
-     */
-    private Long consumptionPoints;
-    /**
-     * 变动后消费分
-     */
-    private Long afterConsumptionPoints;
-    /**
-     * 消费分变动类型
-     */
-    private Integer consumptionStatus;
-    /**
-     * 实际消费分
-     */
-    private Long practicalConsumptionPoints;
-
-    /**
-     * 消费分产生对象
-     */
-    private Long generateUserId;
-    /**
-     * 订单Id
-     */
-    private Long orderId;
-    /**
-     * 订单编号
-     */
-    private String orderNo;
-
-
-}

+ 5 - 27
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/dailybill/DailyBillDO.java

@@ -1,13 +1,12 @@
 package cn.newfeifan.mall.module.distri.dal.dataobject.dailybill;
 
-import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.*;
 
 import java.time.LocalDate;
 
+import com.baomidou.mybatisplus.annotation.*;
+import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
+
 /**
  * 每日账单 DO
  *
@@ -28,14 +27,6 @@ public class DailyBillDO extends BaseDO {
      */
     @TableId
     private Long id;
-    /**
-     * 金额,单位:分
-     */
-    private Long price;
-    /**
-     * 确收金额,单位:分
-     */
-    private Long receivedPrice;
     /**
      * 订单数,默认为0
      */
@@ -52,10 +43,6 @@ public class DailyBillDO extends BaseDO {
      * 订单ID列表,文本类型
      */
     private String orderIds;
-    /**
-     * 退款金额, 单位: 分
-     */
-    private Long refundPrice;
     /**
      * 积分
      */
@@ -72,18 +59,9 @@ public class DailyBillDO extends BaseDO {
      * 订单所属日期
      */
     private LocalDate orderCalcTime;
-
-    /**
-     * 消费分
-     */
-    private Long consumptionPoints;
-    /**
-     * 确收消费分
-     */
-    private Long receivedConsumptionPoints;
     /**
-     * 退款消费分
+     * 平台每日账单表id
      */
-    private Long refundConsumptionPoints;
+    private Long ptDailyBillId;
 
 }

+ 16 - 18
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/integral/IntegralDO.java

@@ -29,25 +29,18 @@ public class IntegralDO extends BaseDO {
      */
     private Long userId;
     /**
-     * 用户类型
+     * 当前红积分
      */
-    private Long categoryId;
-    /**
-     * 用户名称
-     */
-    private String name;
-    /**
-     * 用户昵称
-     */
-    private String nickName;
-    /**
-     * 当前积分
-     */
-    private Long currentQuota;
+    private Long redCurrentQuota;
     /**
      * 冻结积分
      */
     private Long freezeQuota;
+
+    private Long highQuota;
+
+    private String userName;
+
     /**
      * 合赢奖累计获取积分
      */
@@ -56,14 +49,11 @@ public class IntegralDO extends BaseDO {
      * 直推奖累计获取积分
      */
     private Long ancestorQuota;
-    /**
-     * 最高可获取积分
-     */
-    private Long highQuota;
     /**
      * 冻结的最高可获取积分
      */
     private Long freezeHighQuota;
+
     /**
      * 累计获取的峰值
      */
@@ -73,4 +63,12 @@ public class IntegralDO extends BaseDO {
      * 当前消费分
      */
     private Long consumptionPoints;
+    /**
+     * 当前黄积分
+     */
+    private Long yellowCurrentQuota;
+    /**
+     * 当前绿积分
+     */
+    private Long greenCurrentQuota;
 }

+ 82 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/integralchangelog/IntegralChangeLogDO.java

@@ -0,0 +1,82 @@
+package cn.newfeifan.mall.module.distri.dal.dataobject.integralchangelog;
+
+import lombok.*;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * 平台消费分变动记录 DO
+ *
+ * @author 非繁人
+ */
+@TableName("distri_integral_change_log")
+@KeySequence("distri_integral_change_log") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class IntegralChangeLogDO extends BaseDO {
+
+
+    /**
+     * 日志编号
+     */
+    @TableId
+    private Long id;
+    /**
+     * 用户ID
+     */
+    private Long userId;
+    /**
+     * 积分类型
+     */
+    private Integer integralType;
+    /**
+     * 订单Id
+     */
+    private Long orderId;
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+    /**
+     * 变动的积分
+     */
+    private Long integralPoints;
+    /**
+     * 变动后积分
+     */
+    private Long afterIntegralPoints;
+    /**
+     * 实际积分
+     */
+    private Long practicalIntegralPoints;
+    /**
+     * 变动峰值
+     */
+    private Long maxAvailablePointsAmount;
+    /**
+     * 变动后峰值
+     */
+    private Long afterMaxAvailablePointsAmount;
+    /**
+     * 超出团队奖
+     */
+    private Long accumulatedQuotaAmount;
+    /**
+     * 超出直推奖
+     */
+    private Long ancestorQuotaAmount;
+    /**
+     * 积分变动类型
+     */
+    private Integer integralStatus;
+    /**
+     * 积分产生对象
+     */
+    private Long generateUserId;
+
+
+}

+ 2 - 29
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/ptdailybill/PtDailyBillDO.java

@@ -1,12 +1,10 @@
 package cn.newfeifan.mall.module.distri.dal.dataobject.ptdailybill;
 
-import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
-import com.baomidou.mybatisplus.annotation.KeySequence;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.*;
 
 import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
 
 /**
  * 平台每日账单统计 DO
@@ -28,22 +26,10 @@ public class PtDailyBillDO extends BaseDO {
      */
     @TableId
     private Long id;
-    /**
-     * 金额,单位:分
-     */
-    private Long price;
-    /**
-     * 确收金额,单位:分
-     */
-    private Long receivedPrice;
     /**
      * 订单数,默认为0
      */
     private Long orderCount;
-    /**
-     * 退款金额, 单位: 分
-     */
-    private Long refundPrice;
     /**
      * 积分
      */
@@ -65,17 +51,4 @@ public class PtDailyBillDO extends BaseDO {
      */
     private String orderIds;
 
-    /**
-     * 消费分
-     */
-    private Long consumptionPoints;
-    /**
-     * 确收消费分
-     */
-    private Long receivedConsumptionPoints;
-    /**
-     * 退款消费分
-     */
-    private Long refundConsumptionPoints;
-
 }

+ 0 - 28
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/consumptionchangelog/ConsumptionChangeLogMapper.java

@@ -1,28 +0,0 @@
-package cn.newfeifan.mall.module.distri.dal.mysql.consumptionchangelog;
-
-import cn.newfeifan.mall.framework.common.pojo.PageResult;
-import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
-import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogPageReqVO;
-import cn.newfeifan.mall.module.distri.dal.dataobject.consumptionchangelog.ConsumptionChangeLogDO;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * 平台消费分变动记录 Mapper
- *
- * @author 非繁人
- */
-@Mapper
-public interface ConsumptionChangeLogMapper extends BaseMapperX<ConsumptionChangeLogDO> {
-
-    default PageResult<ConsumptionChangeLogDO> selectPage(ConsumptionChangeLogPageReqVO reqVO) {
-        return selectPage(reqVO, new LambdaQueryWrapperX<ConsumptionChangeLogDO>()
-                .eqIfPresent(ConsumptionChangeLogDO::getUserId, reqVO.getUserId())
-                .eqIfPresent(ConsumptionChangeLogDO::getConsumptionPoints, reqVO.getConsumptionPoints())
-                .eqIfPresent(ConsumptionChangeLogDO::getAfterConsumptionPoints, reqVO.getAfterConsumptionPoints())
-                .eqIfPresent(ConsumptionChangeLogDO::getConsumptionStatus, reqVO.getConsumptionStatus())
-                .betweenIfPresent(ConsumptionChangeLogDO::getCreateTime, reqVO.getCreateTime())
-                .orderByDesc(ConsumptionChangeLogDO::getId));
-    }
-
-}

+ 0 - 2
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/dailybill/DailyBillMapper.java

@@ -22,8 +22,6 @@ public interface DailyBillMapper extends BaseMapperX<DailyBillDO> {
 
     default PageResult<DailyBillDO> selectPage(DailyBillPageReqVO reqVO) {
         return selectPage(reqVO, new LambdaQueryWrapperX<DailyBillDO>()
-                .eqIfPresent(DailyBillDO::getPrice, reqVO.getPrice())
-                .eqIfPresent(DailyBillDO::getReceivedPrice, reqVO.getReceivedPrice())
                 .eqIfPresent(DailyBillDO::getOrderCount, reqVO.getOrderCount())
                 .eqIfPresent(DailyBillDO::getShopId, reqVO.getShopId())
                 .eqIfPresent(DailyBillDO::getMerchantId, reqVO.getMerchantId())

+ 26 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/integralchangelog/IntegralChangeLogMapper.java

@@ -0,0 +1,26 @@
+package cn.newfeifan.mall.module.distri.dal.mysql.integralchangelog;
+
+import cn.newfeifan.mall.framework.common.pojo.PageResult;
+import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
+import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo.IntegralChangeLogPageReqVO;
+import cn.newfeifan.mall.module.distri.dal.dataobject.integralchangelog.IntegralChangeLogDO;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 平台消费分变动记录 Mapper
+ *
+ * @author 非繁人
+ */
+@Mapper
+public interface IntegralChangeLogMapper extends BaseMapperX<IntegralChangeLogDO> {
+
+    default PageResult<IntegralChangeLogDO> selectPage(IntegralChangeLogPageReqVO reqVO) {
+        return selectPage(reqVO, new LambdaQueryWrapperX<IntegralChangeLogDO>()
+                .eqIfPresent(IntegralChangeLogDO::getUserId, reqVO.getUserId())
+                .eqIfPresent(IntegralChangeLogDO::getIntegralType, reqVO.getIntegralType())
+                .betweenIfPresent(IntegralChangeLogDO::getCreateTime, reqVO.getCreateTime())
+                .orderByDesc(IntegralChangeLogDO::getId));
+    }
+
+}

+ 0 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/ptdailybill/PtDailyBillMapper.java

@@ -18,10 +18,7 @@ public interface PtDailyBillMapper extends BaseMapperX<PtDailyBillDO> {
 
     default PageResult<PtDailyBillDO> selectPage(PtDailyBillPageReqVO reqVO) {
         return selectPage(reqVO, new LambdaQueryWrapperX<PtDailyBillDO>()
-                .eqIfPresent(PtDailyBillDO::getPrice, reqVO.getPrice())
-                .eqIfPresent(PtDailyBillDO::getReceivedPrice, reqVO.getReceivedPrice())
                 .eqIfPresent(PtDailyBillDO::getOrderCount, reqVO.getOrderCount())
-                .eqIfPresent(PtDailyBillDO::getRefundPrice, reqVO.getRefundPrice())
                 .eqIfPresent(PtDailyBillDO::getIntegral, reqVO.getIntegral())
                 .eqIfPresent(PtDailyBillDO::getReceivedIntegral, reqVO.getReceivedIntegral())
                 .eqIfPresent(PtDailyBillDO::getRefundIntegral, reqVO.getRefundIntegral())

+ 0 - 56
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/consumptionchangelog/ConsumptionChangeLogService.java

@@ -1,56 +0,0 @@
-package cn.newfeifan.mall.module.distri.service.consumptionchangelog;
-
-import cn.newfeifan.mall.framework.common.pojo.PageResult;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogPageReqVO;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogRespVO;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogSaveReqVO;
-import cn.newfeifan.mall.module.distri.dal.dataobject.consumptionchangelog.ConsumptionChangeLogDO;
-
-import javax.validation.Valid;
-
-/**
- * 平台消费分变动记录 Service 接口
- *
- * @author 非繁人
- */
-public interface ConsumptionChangeLogService {
-
-    /**
-     * 创建平台消费分变动记录
-     *
-     * @param createReqVO 创建信息
-     * @return 编号
-     */
-    Long createConsumptionChangeLog(@Valid ConsumptionChangeLogSaveReqVO createReqVO);
-
-    /**
-     * 更新平台消费分变动记录
-     *
-     * @param updateReqVO 更新信息
-     */
-    void updateConsumptionChangeLog(@Valid ConsumptionChangeLogSaveReqVO updateReqVO);
-
-    /**
-     * 删除平台消费分变动记录
-     *
-     * @param id 编号
-     */
-    void deleteConsumptionChangeLog(Long id);
-
-    /**
-     * 获得平台消费分变动记录
-     *
-     * @param id 编号
-     * @return 平台消费分变动记录
-     */
-    ConsumptionChangeLogDO getConsumptionChangeLog(Long id);
-
-    /**
-     * 获得平台消费分变动记录分页
-     *
-     * @param pageReqVO 分页查询
-     * @return 平台消费分变动记录分页
-     */
-    PageResult<ConsumptionChangeLogRespVO> getConsumptionChangeLogPage(ConsumptionChangeLogPageReqVO pageReqVO);
-
-}

+ 0 - 87
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/consumptionchangelog/ConsumptionChangeLogServiceImpl.java

@@ -1,87 +0,0 @@
-package cn.newfeifan.mall.module.distri.service.consumptionchangelog;
-
-import cn.newfeifan.mall.framework.common.pojo.PageResult;
-import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogPageReqVO;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogRespVO;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogSaveReqVO;
-import cn.newfeifan.mall.module.distri.dal.dataobject.consumptionchangelog.ConsumptionChangeLogDO;
-import cn.newfeifan.mall.module.distri.dal.mysql.consumptionchangelog.ConsumptionChangeLogMapper;
-import cn.newfeifan.mall.module.distri.enums.ConsumptionEnum;
-import cn.newfeifan.mall.module.member.dal.dataobject.user.MemberUserDO;
-import cn.newfeifan.mall.module.member.service.user.MemberUserService;
-import org.springframework.stereotype.Service;
-import org.springframework.validation.annotation.Validated;
-
-import javax.annotation.Resource;
-
-import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
-import static cn.newfeifan.mall.module.distri.enums.ErrorCodeConstants.CONSUMPTION_CHANGE_LOG_NOT_EXISTS;
-
-/**
- * 平台消费分变动记录 Service 实现类
- *
- * @author 非繁人
- */
-@Service
-@Validated
-public class ConsumptionChangeLogServiceImpl implements ConsumptionChangeLogService {
-
-    @Resource
-    private ConsumptionChangeLogMapper consumptionChangeLogMapper;
-
-    @Resource
-    private MemberUserService memberUserService;
-
-    @Override
-    public Long createConsumptionChangeLog(ConsumptionChangeLogSaveReqVO createReqVO) {
-        // 插入
-        ConsumptionChangeLogDO consumptionChangeLog = BeanUtils.toBean(createReqVO, ConsumptionChangeLogDO.class);
-        consumptionChangeLogMapper.insert(consumptionChangeLog);
-        // 返回
-        return consumptionChangeLog.getId();
-    }
-
-    @Override
-    public void updateConsumptionChangeLog(ConsumptionChangeLogSaveReqVO updateReqVO) {
-        // 校验存在
-        validateConsumptionChangeLogExists(updateReqVO.getId());
-        // 更新
-        ConsumptionChangeLogDO updateObj = BeanUtils.toBean(updateReqVO, ConsumptionChangeLogDO.class);
-        consumptionChangeLogMapper.updateById(updateObj);
-    }
-
-    @Override
-    public void deleteConsumptionChangeLog(Long id) {
-        // 校验存在
-        validateConsumptionChangeLogExists(id);
-        // 删除
-        consumptionChangeLogMapper.deleteById(id);
-    }
-
-    private void validateConsumptionChangeLogExists(Long id) {
-        if (consumptionChangeLogMapper.selectById(id) == null) {
-            throw exception(CONSUMPTION_CHANGE_LOG_NOT_EXISTS);
-        }
-    }
-
-    @Override
-    public ConsumptionChangeLogDO getConsumptionChangeLog(Long id) {
-        return consumptionChangeLogMapper.selectById(id);
-    }
-
-    @Override
-    public PageResult<ConsumptionChangeLogRespVO> getConsumptionChangeLogPage(ConsumptionChangeLogPageReqVO pageReqVO) {
-        PageResult<ConsumptionChangeLogRespVO> bean = BeanUtils.toBean(consumptionChangeLogMapper.selectPage(pageReqVO), ConsumptionChangeLogRespVO.class);
-
-        for (ConsumptionChangeLogRespVO consumptionChangeLogRespVO : bean.getList()) {
-            consumptionChangeLogRespVO.setConsumptionStatusName(ConsumptionEnum.getName(consumptionChangeLogRespVO.getConsumptionStatus()));
-            if(consumptionChangeLogRespVO.getGenerateUserId() != null){
-                MemberUserDO user = memberUserService.getUser(consumptionChangeLogRespVO.getGenerateUserId());
-                consumptionChangeLogRespVO.setGenerateUserName(user.getUsername());
-            }
-        }
-        return bean;
-    }
-
-}

+ 0 - 9
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/dailybill/DailyBillServiceImpl.java

@@ -114,12 +114,6 @@ public class DailyBillServiceImpl implements DailyBillService {
                 // 计算分组结果,并按订单创建时间倒序输出每个日期的订单
                 ordersByDate.forEach((date, orderList) -> {
 
-                    Long price = orderList.stream()
-                            .mapToLong(OrderDTO::getPayPrice)
-                            .sum();
-                    Long refundPrice = orderList.stream()
-                            .mapToLong(OrderDTO::getRefundPrice)
-                            .sum();
                     Long integral = orderList.stream()
                             .mapToLong(OrderDTO::getPayIntegral)
                             .sum();
@@ -129,9 +123,6 @@ public class DailyBillServiceImpl implements DailyBillService {
                             .sum();
 
                     DailyBillDO dailyBillDO = DailyBillDO.builder()
-                            .price(price)
-                            .refundPrice(refundPrice)
-                            .receivedIntegral(price - refundPrice)
                             .integral(integral)
                             .refundIntegral(refundIntegral)
                             .receivedIntegral(integral - refundIntegral)

+ 10 - 12
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/dailybill/dto/OrderDTO.java

@@ -17,6 +17,12 @@ public class OrderDTO extends BaseDO {
      * 例如说,1146347329394184195
      */
     private String no;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
     /**
      * 购买的商品数量
      */
@@ -33,19 +39,11 @@ public class OrderDTO extends BaseDO {
      */
     private Integer deliveryPrice;
 
-    /**
-     * 应付金额(总),单位:分
-     */
-    private Integer payPrice;
     // ========== 售后基本信息 ==========
     /**
      * 售后状态
      */
     private Integer refundStatus;
-    /**
-     * 退款金额,单位:分
-     */
-    private Integer refundPrice;
     /**
      * 支付积分
      */
@@ -54,10 +52,10 @@ public class OrderDTO extends BaseDO {
      * 退还的使用的积分
      */
     private Long refundIntegral;
-    /**
-     * 实付人民币,单位:分
-     */
-    private Integer payRmb;
+
+    private Long shopId;
+
+    private Long merchantId;
 
     private List<OrderItemDTO> items;
 }

+ 11 - 29
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integral/IntegralService.java

@@ -3,7 +3,7 @@ package cn.newfeifan.mall.module.distri.service.integral;
 import cn.newfeifan.mall.module.distri.controller.admin.integral.vo.IntegralSaveReqVO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.integral.IntegralDO;
 import cn.newfeifan.mall.module.distri.enums.CaclEnum;
-import cn.newfeifan.mall.module.distri.enums.ConsumptionEnum;
+import cn.newfeifan.mall.module.distri.enums.IntegralEnum;
 
 import javax.validation.Valid;
 
@@ -63,15 +63,17 @@ public interface IntegralService {
     /**
      * 修改用户积分
      *
-     * @param userId       要修改积分的用户
-     * @param caclEnum     导致积分变化的事件类型枚举
-     * @param amount       用户积分变化金额,可为负数
-     * @param freezeAmount 用户冻结积分变化金额,可为负数
+     * @param generateUserId 要修改积分的用户
+     * @param userId         要修改积分的用户
+     * @param integralEnum       导致积分变化的事件类型枚举
+     * @param amount         用户可用积分变化金额,可为负数
      */
-    Boolean updateUserIntegral(Long generateUserId,//导致产生积分变动的用户ID
-                            Long userId, CaclEnum caclEnum, Long amount, Long freezeAmount,
-                            Long tradeOrderId,
-                            String orderNum
+    void updateUserIntegral(Long generateUserId,//导致产生积分变动的用户ID
+                               Long userId, IntegralEnum integralEnum, Long amount,
+                               Long tradeOrderId,
+                               String orderNum,
+                               Integer integralType,
+                               Long highQuota
                                );
 
     /**
@@ -106,26 +108,6 @@ public interface IntegralService {
      */
     void updateIntegralFreezeHighQuota(Long generateUserId, Long userId, CaclEnum caclEnum, Long totalFreezeHighQuota, Long tradeOrderId, String orderNum);
 
-    /**
-     * 修改用户消费积分
-     * @param generateUserId 用户
-     * @param userId 用户
-     * @param payConsumptionPoints 消费分
-     * @param tradeOrderId  订单id
-     * @param tradeOrderNum 订单编号
-     */
-    void updateUserConsumptionPoints(Long generateUserId, Long userId, Long payConsumptionPoints, Long tradeOrderId, String tradeOrderNum);
-
-    /**
-     * 修改用户消费积分
-     * @param userId 用户id
-     * @param consumptionEnum 类型
-     * @param consumptionPoints 消费分
-     * @param orderId 订单id
-     * @param orderNum 订单号
-     */
-    void updateUserConsumptionPoints(Long userId, ConsumptionEnum consumptionEnum, Long consumptionPoints, Long orderId, String orderNum);
-
     /**
      * 根据用户ID查询是否有钱包
      * @param descendant 用户id

+ 73 - 116
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integral/IntegralServiceImpl.java

@@ -1,16 +1,18 @@
 package cn.newfeifan.mall.module.distri.service.integral;
 
 import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogSaveReqVO;
+import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
 import cn.newfeifan.mall.module.distri.controller.admin.integral.vo.IntegralSaveReqVO;
+import cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo.IntegralChangeLogSaveReqVO;
 import cn.newfeifan.mall.module.distri.controller.admin.ptprofitlog.vo.PtProfitLogSaveReqVO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.integral.IntegralDO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.orderpercentage.OrderPercentageDO;
 import cn.newfeifan.mall.module.distri.dal.mysql.integral.IntegralMapper;
 import cn.newfeifan.mall.module.distri.dal.mysql.ptprofit.PtProfitMapper;
 import cn.newfeifan.mall.module.distri.enums.CaclEnum;
-import cn.newfeifan.mall.module.distri.enums.ConsumptionEnum;
-import cn.newfeifan.mall.module.distri.service.consumptionchangelog.ConsumptionChangeLogService;
+import cn.newfeifan.mall.module.distri.enums.IntegralEnum;
+import cn.newfeifan.mall.module.distri.enums.IntegralTypeEnum;
+import cn.newfeifan.mall.module.distri.service.integralchangelog.IntegralChangeLogService;
 import cn.newfeifan.mall.module.distri.service.orderpercentage.OrderPercentageService;
 import cn.newfeifan.mall.module.distri.service.ptprofitlog.PtProfitLogService;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -18,7 +20,6 @@ import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 
 import javax.annotation.Resource;
-import java.util.Map;
 
 import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static cn.newfeifan.mall.module.distri.enums.ErrorCodeConstants.INTEGRAL_NOT_EXISTS;
@@ -42,73 +43,90 @@ public class IntegralServiceImpl implements IntegralService {
     private OrderPercentageService orderPercentageService;
 
     @Resource
-    private ConsumptionChangeLogService consumptionChangeLogService;
-
-    /**
-     * add by Ben
-     * 修改用户积分
-     *
-     * @param userId       要修改积分的用户
-     * @param caclEnum     导致积分变化的事件类型枚举
-     * @param amount       用户可用积分变化金额,可为负数
-     * @param freezeAmount 用户冻结积分变化金额,可为负数
-     */
+    private IntegralChangeLogService integralChangeLogService;
+
     @Override
-    public Boolean updateUserIntegral(Long generateUserId,//导致产生积分变动的用户ID
-                                   Long userId, CaclEnum caclEnum, Long amount, Long freezeAmount,
-                                   Long tradeOrderId,
-                                   String orderNum
+    public void updateUserIntegral(Long generateUserId,//导致产生积分变动的用户ID
+                                      Long userId, IntegralEnum integralEnum, Long amount,
+                                      Long tradeOrderId,
+                                      String orderNum,
+                                      Integer integralType,
+                                      Long highQuota
     ) {
-        Boolean success = null;
 
-        //修改用户积分钱包的积分
-        int effectRowNum = ptProfitMapper.updateUserIntegral(amount,amount,freezeAmount,freezeAmount,userId);
+        if (amount == null || amount == 0L) return;
 
-        if (effectRowNum==1) {//如果成功修改积分记录
-            success = true;
+        // 用户钱包
+        IntegralDO integralDO = integralMapper.selectOne(new LambdaQueryWrapperX<IntegralDO>().eq(IntegralDO::getUserId, userId));
+        Long afterIntegralPoints = 0L;
 
-            //用户修改后的当前可用的钱包余额
-            Long afterAmount = null;
-            //用户修改后的冻结积分钱包余额
-            Long afterFreezeAmount = null;
+        // 溢出额度
+        Long ancestorQuotaAmount = null;
+        Long getHighQuota = 0L;     // 实得直推奖奖
 
-            //查询用户修改后的积分
-            Map<String, Object> map = ptProfitMapper.selectUserIntegral(userId);
-            Object currentQuotaObj = map.get("current_quota");
-            Object freezeQuotaObj = map.get("freeze_quota");
+        // 校验用户积分是否足够
+        if (integralType.equals(IntegralTypeEnum.RED_INTEGRAL.getType())) {
+            getHighQuota = -amount;
 
-            afterAmount = (Long)currentQuotaObj;
-            afterFreezeAmount = (Long)freezeQuotaObj;
+            // 修改用户积分
+            integralDO.setRedCurrentQuota(integralDO.getRedCurrentQuota() - amount);
+            afterIntegralPoints = integralDO.getRedCurrentQuota();
 
-            if(afterAmount<0||afterFreezeAmount<0){
-                throw new RuntimeException("用户钱包为负数:用户IO为"+userId+"的用户可用钱包为"+afterAmount+",冻结钱包为"+afterFreezeAmount);
+            if (highQuota != null) {
+                // 增加峰值
+                integralDO.setHighQuota(integralDO.getHighQuota() + highQuota);     //剩余峰值
+                integralDO.setHighQuotaTotal(integralDO.getHighQuotaTotal() + highQuota);      //累计峰值
             }
-
-            //记录用户的积分变动日志
-            ptProfitLogService.addMessage(generateUserId,//导致产生积分变动的用户ID
-                    userId, caclEnum, amount, afterAmount,
-                    freezeAmount, afterFreezeAmount,null,tradeOrderId,orderNum);
-
-        }else if(effectRowNum<1){//如果钱包积分不足,不够抵扣
-            success = false;
-        } else if (effectRowNum>1) {
-//            success = false;
-            throw new RuntimeException("用户IO为"+userId+"的用户钱包不只一个!");
+        } else if (integralType.equals(IntegralTypeEnum.GREEN_INTEGRAL.getType())) {
+            getHighQuota = -amount;
+
+            // 修改用户积分
+            integralDO.setGreenCurrentQuota(integralDO.getGreenCurrentQuota() - amount);
+            afterIntegralPoints = integralDO.getGreenCurrentQuota();
+        } else if (integralType.equals(IntegralTypeEnum.YELLOW_INTEGRAL.getType())) {
+            // 峰值小于获得额度
+            if (integralDO.getHighQuota() < amount) {
+                ancestorQuotaAmount = amount - integralDO.getHighQuota();
+                getHighQuota = integralDO.getHighQuota();
+                highQuota = -integralDO.getHighQuota();
+
+                integralDO.setYellowCurrentQuota(integralDO.getYellowCurrentQuota() + integralDO.getHighQuota());
+                integralDO.setHighQuota(0L);
+            } else {
+                getHighQuota = amount;
+                highQuota = -amount;
+                integralDO.setHighQuota(integralDO.getHighQuota() - amount);
+                integralDO.setYellowCurrentQuota(integralDO.getYellowCurrentQuota() + amount);
+            }
+            afterIntegralPoints = integralDO.getYellowCurrentQuota();
         }
 
-        return success;
+        integralMapper.updateById(integralDO);
+
+        amount = integralType.equals(IntegralTypeEnum.RED_INTEGRAL.getType()) ||
+                integralType.equals(IntegralTypeEnum.GREEN_INTEGRAL.getType()) ? -amount : amount;
 
+        // 记录积分变动日志
+        IntegralChangeLogSaveReqVO changeLog = IntegralChangeLogSaveReqVO.builder()
+                .userId(userId)
+                .integralPoints(amount)
+                .afterIntegralPoints(afterIntegralPoints)
+                .practicalIntegralPoints(getHighQuota)
+                .generateUserId(generateUserId)
+                .orderId(tradeOrderId)
+                .orderNo(orderNum)
+                .integralStatus(integralEnum.getType())
+                .maxAvailablePointsAmount(highQuota)
+                .afterMaxAvailablePointsAmount(integralDO.getHighQuota())
+                .ancestorQuotaAmount(ancestorQuotaAmount)
+                .integralType(integralType)
+                .build();
+//        integralChangeLogService.createIntegralChangeLog(changeLog);
     }
 
     @Override
     public void updateUserIntegral(Long userId, CaclEnum caclEnum, Long payIntegral, Long tradeOrderId, String orderNum) {
-        //退还订单支付过期积分
-        IntegralDO integralDO = integralMapper.selectOne(new LambdaQueryWrapper<IntegralDO>().eq(IntegralDO::getUserId, userId));
-        integralDO.setCurrentQuota(integralDO.getCurrentQuota() + payIntegral);
 
-        integralMapper.updateById(integralDO);
-
-        ptProfitLogService.addMessage(userId,userId,caclEnum,payIntegral,integralDO.getCurrentQuota(),0L,0L,null,tradeOrderId,orderNum);
     }
 
     @Override
@@ -136,44 +154,6 @@ public class IntegralServiceImpl implements IntegralService {
         ptProfitLogService.createPtProfitLog(profitLogSaveReqVO);
     }
 
-    @Override
-    public void updateUserConsumptionPoints(Long generateUserId, Long userId, Long payConsumptionPoints, Long tradeOrderId, String tradeOrderNum) {
-        // 获取用户钱包,然后退回消费分
-        IntegralDO integralDO = integralMapper.selectOne(IntegralDO::getUserId, userId);
-        integralDO.setConsumptionPoints(integralDO.getConsumptionPoints() + payConsumptionPoints);
-        integralMapper.updateById(integralDO);
-
-        // 记录消费分变动日志
-        consumptionChangeLogService.createConsumptionChangeLog(ConsumptionChangeLogSaveReqVO.builder()
-                        .userId(userId)
-                        .generateUserId(generateUserId)
-                        .consumptionPoints(payConsumptionPoints)
-                        .afterConsumptionPoints(integralDO.getConsumptionPoints())
-                        .consumptionStatus(ConsumptionEnum.REFUND_ORDER.getType())
-                .build());
-
-    }
-
-    @Override
-    public void updateUserConsumptionPoints(Long userId, ConsumptionEnum consumptionEnum, Long consumptionPoints, Long orderId, String orderNum) {
-        IntegralDO integralDO = integralMapper.selectOne(IntegralDO::getUserId, userId);
-
-        // 修改用户消费积分
-        integralDO.setConsumptionPoints(integralDO.getConsumptionPoints() + consumptionPoints);
-        integralMapper.updateById(integralDO);
-
-        consumptionChangeLogService.createConsumptionChangeLog(
-                ConsumptionChangeLogSaveReqVO.builder()
-                        .userId(userId)
-                        .generateUserId(userId)
-                        .consumptionStatus(consumptionEnum.getType())
-                        .consumptionPoints(consumptionPoints)
-                        .afterConsumptionPoints(integralDO.getConsumptionPoints())
-                        .orderId(orderId)
-                        .orderNo(orderNum)
-                        .build());
-    }
-
     @Override
     public IntegralDO selectByUser(Long descendant) {
         return integralMapper.selectOne(new LambdaQueryWrapper<IntegralDO>().eq(IntegralDO::getUserId, descendant));
@@ -191,7 +171,6 @@ public class IntegralServiceImpl implements IntegralService {
     @Override
     public void updateUserIntegralByAmountWithHighQuota(Long orderUserId, Long ancesterUserId, CaclEnum caclEnum, Long ancestorIncreaseIntegral, Long tradeOrderId, String tradeOrderNum) {
         IntegralDO integralDO = integralMapper.selectOne(IntegralDO::getUserId, ancesterUserId);
-        integralDO.setCurrentQuota(integralDO.getCurrentQuota() - ancestorIncreaseIntegral);
         integralDO.setHighQuota(integralDO.getHighQuota() + ancestorIncreaseIntegral);
         integralMapper.updateById(integralDO);
 
@@ -200,7 +179,7 @@ public class IntegralServiceImpl implements IntegralService {
         //记录用户的积分变动日志
         PtProfitLogSaveReqVO profitLogSaveReqVO = PtProfitLogSaveReqVO.builder()
                 .amount(-ancestorIncreaseIntegral)
-                .afterAmount(integralDO.getCurrentQuota())
+                .afterAmount(integralDO.getRedCurrentQuota())
                 .maxAvailablePointsAmount(ancestorIncreaseIntegral)
                 .afterMaxAvailablePointsAmount(integralDO.getHighQuota() + Long.parseLong(orderPercentageDO.getBaseMaxQuota()))     // 系统设置的最大可用积分
                 .userId(ancesterUserId)
@@ -217,26 +196,4 @@ public class IntegralServiceImpl implements IntegralService {
             throw exception(INTEGRAL_NOT_EXISTS);
         }
     }
-
-//
-//    /**
-//     * 修改用户身价
-//     * @param userId 用户ID
-//     * @param socialStatusUpdateEnum 身价变动类别
-//     * @param socialStatusPoint 身价变化值
-//     * @param ObjectId 导致身价变动的对应业务对象ID,如订单ID、收藏记录ID、新注册用户ID等
-//     * @return 升级后的身价名称,如果返回null,表明没升级
-//     */
-//    public String updateUserSocialStatus(Long userId, SocialStatusUpdateEnum socialStatusUpdateEnum, Integer socialStatusPoint,
-//                                   Long ObjectId){
-//        //升级后的身价名称,如果返回null,表明没升级
-//        String newSocialStatusName = null;
-//        //用户身价升了几级
-//        Integer socialStatusUpgradation = 0;
-//
-//        DuserDO duser = duserMapper.selectOne("user_id", userId);
-//        Integer oldSocialStatus = duser.getSocialStatus();//升级前身价等级
-//
-//        return newSocialStatusName;
-//    }
 }

+ 26 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integralchangelog/IntegralChangeLogService.java

@@ -0,0 +1,26 @@
+package cn.newfeifan.mall.module.distri.service.integralchangelog;
+
+import cn.newfeifan.mall.framework.common.pojo.PageResult;
+import cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo.IntegralChangeLogPageReqVO;
+import cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo.IntegralChangeLogRespVO;
+import cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo.IntegralChangeLogSaveReqVO;
+import cn.newfeifan.mall.module.distri.dal.dataobject.integralchangelog.IntegralChangeLogDO;
+
+import javax.validation.Valid;
+
+/**
+ * 平台消费分变动记录 Service 接口
+ *
+ * @author 非繁人
+ */
+public interface IntegralChangeLogService {
+
+    /**
+     * 创建平台消费分变动记录
+     *
+     * @param createReqVO 创建信息
+     * @return 编号
+     */
+    Long createConsumptionChangeLog(@Valid IntegralChangeLogSaveReqVO createReqVO);
+
+}

+ 39 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integralchangelog/IntegralChangeLogServiceImpl.java

@@ -0,0 +1,39 @@
+package cn.newfeifan.mall.module.distri.service.integralchangelog;
+
+import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
+import cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo.IntegralChangeLogSaveReqVO;
+import cn.newfeifan.mall.module.distri.dal.dataobject.integralchangelog.IntegralChangeLogDO;
+import cn.newfeifan.mall.module.distri.dal.mysql.integralchangelog.IntegralChangeLogMapper;
+import cn.newfeifan.mall.module.member.service.user.MemberUserService;
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+
+import javax.annotation.Resource;
+
+import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
+
+/**
+ * 平台消费分变动记录 Service 实现类
+ *
+ * @author 非繁人
+ */
+@Service
+@Validated
+public class IntegralChangeLogServiceImpl implements IntegralChangeLogService {
+
+    @Resource
+    private IntegralChangeLogMapper integralChangeLogMapper;
+
+    @Resource
+    private MemberUserService memberUserService;
+
+    @Override
+    public Long createConsumptionChangeLog(IntegralChangeLogSaveReqVO createReqVO) {
+        // 插入
+        IntegralChangeLogDO consumptionChangeLog = BeanUtils.toBean(createReqVO, IntegralChangeLogDO.class);
+        integralChangeLogMapper.insert(consumptionChangeLog);
+        // 返回
+        return consumptionChangeLog.getId();
+    }
+
+}

+ 9 - 9
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/usertopupconsumptionpointsorder/UserTopUpConsumptionPointsOrderServiceImpl.java

@@ -2,14 +2,14 @@ package cn.newfeifan.mall.module.distri.service.usertopupconsumptionpointsorder;
 
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
 import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
-import cn.newfeifan.mall.module.distri.controller.admin.consumptionchangelog.vo.ConsumptionChangeLogSaveReqVO;
+import cn.newfeifan.mall.module.distri.controller.admin.integralchangelog.vo.IntegralChangeLogSaveReqVO;
 import cn.newfeifan.mall.module.distri.controller.admin.integral.vo.IntegralSaveReqVO;
 import cn.newfeifan.mall.module.distri.controller.admin.usertopupconsumptionpointsorder.vo.*;
 import cn.newfeifan.mall.module.distri.dal.dataobject.integral.IntegralDO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.usertopupconsumptionpointsorder.UserTopUpConsumptionPointsOrderDO;
 import cn.newfeifan.mall.module.distri.dal.mysql.usertopupconsumptionpointsorder.UserTopUpConsumptionPointsOrderMapper;
-import cn.newfeifan.mall.module.distri.enums.ConsumptionEnum;
-import cn.newfeifan.mall.module.distri.service.consumptionchangelog.ConsumptionChangeLogService;
+import cn.newfeifan.mall.module.distri.enums.IntegralEnum;
+import cn.newfeifan.mall.module.distri.service.integralchangelog.IntegralChangeLogService;
 import cn.newfeifan.mall.module.distri.service.integral.IntegralService;
 import cn.newfeifan.mall.module.pay.dal.dataobject.order.PayOrderDO;
 import org.springframework.stereotype.Service;
@@ -36,7 +36,7 @@ public class UserTopUpConsumptionPointsOrderServiceImpl implements UserTopUpCons
     @Resource
     private IntegralService integralService;
     @Resource
-    private ConsumptionChangeLogService consumptionChangeLogService;
+    private IntegralChangeLogService integralChangeLogService;
 
     @Override
     public Long createUserTopUpConsumptionPointsOrder(UserTopUpConsumptionPointsOrderSaveReqVO createReqVO) {
@@ -104,12 +104,12 @@ public class UserTopUpConsumptionPointsOrderServiceImpl implements UserTopUpCons
         integralService.updateIntegral(BeanUtils.toBean(integralDO, IntegralSaveReqVO.class));
 
         // 消费分变动日志
-        consumptionChangeLogService.createConsumptionChangeLog(ConsumptionChangeLogSaveReqVO.builder()
+        integralChangeLogService.createConsumptionChangeLog(IntegralChangeLogSaveReqVO.builder()
                 .userId(topUpOrder.getUserId())
-                .consumptionStatus(ConsumptionEnum.TOP_UP_GET.getType())
-                .consumptionPoints(topUpOrder.getPracticalConsumptionPoints())
-                .afterConsumptionPoints(integralDO.getConsumptionPoints())
-                .practicalConsumptionPoints(topUpOrder.getTopUpConsumptionPoints())
+                .integralStatus(IntegralEnum.TOP_UP_GET.getType())
+                .integralPoints(topUpOrder.getPracticalConsumptionPoints())
+                .afterIntegralPoints(integralDO.getConsumptionPoints())
+                .practicalIntegralPoints(topUpOrder.getTopUpConsumptionPoints())
                 .generateUserId(topUpOrder.getUserId())
                 .build());
     }

+ 0 - 13
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/skuapply/vo/SkuApplyPageReqVO.java

@@ -51,12 +51,6 @@ public class SkuApplyPageReqVO extends PageParam {
     @Schema(description = "商品体积,单位:m^3 平米")
     private Double volume;
 
-    @Schema(description = "一级分销的佣金,单位:分", example = "7462")
-    private Integer firstBrokeragePrice;
-
-    @Schema(description = "二级分销的佣金,单位:分", example = "32532")
-    private Integer secondBrokeragePrice;
-
     @Schema(description = "商品销量", example = "7812")
     private Integer salesCount;
 
@@ -70,13 +64,6 @@ public class SkuApplyPageReqVO extends PageParam {
     @Schema(description = "商户id", example = "9994")
     private Long merchantId;
 
-    @Schema(description = "高精度价格", example = "15815")
-    private BigDecimal highPrecisionPrice;
-
     @Schema(description = "结算价,单位: 分", example = "21066")
     private Integer settlementPrice;
-
-    @Schema(description = "高精度结算价", example = "1872")
-    private BigDecimal highPrecisionSettlementPrice;
-
 }

+ 0 - 16
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/skuapply/vo/SkuApplyRespVO.java

@@ -63,14 +63,6 @@ public class SkuApplyRespVO {
     @ExcelProperty("商品体积,单位:m^3 平米")
     private Double volume;
 
-    @Schema(description = "一级分销的佣金,单位:分", example = "7462")
-    @ExcelProperty("一级分销的佣金,单位:分")
-    private Integer firstBrokeragePrice;
-
-    @Schema(description = "二级分销的佣金,单位:分", example = "32532")
-    @ExcelProperty("二级分销的佣金,单位:分")
-    private Integer secondBrokeragePrice;
-
     @Schema(description = "商品销量", example = "7812")
     @ExcelProperty("商品销量")
     private Integer salesCount;
@@ -87,16 +79,8 @@ public class SkuApplyRespVO {
     @ExcelProperty("商户id")
     private Long merchantId;
 
-    @Schema(description = "高精度价格", example = "15815")
-    @ExcelProperty("高精度价格")
-    private BigDecimal highPrecisionPrice;
-
     @Schema(description = "结算价,单位: 分", example = "21066")
     @ExcelProperty("结算价,单位: 分")
     private Integer settlementPrice;
 
-    @Schema(description = "高精度结算价", example = "1872")
-    @ExcelProperty("高精度结算价")
-    private BigDecimal highPrecisionSettlementPrice;
-
 }

+ 0 - 14
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/skuapply/vo/SkuApplySaveReqVO.java

@@ -40,13 +40,6 @@ public class SkuApplySaveReqVO {
     @Schema(description = "商品体积,单位:m^3 平米", example = "2.5")
     private Double volume;
 
-    @Schema(description = "一级分销的佣金,单位:分", example = "199")
-    private Integer firstBrokeragePrice;
-
-    @Schema(description = "二级分销的佣金,单位:分", example = "19")
-    private Integer secondBrokeragePrice;
-
-
     @Schema(description = "推广费, 单位: 分")
     private Integer promotionFee;
 
@@ -82,13 +75,6 @@ public class SkuApplySaveReqVO {
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
 
-    @Schema(description = "高精度价格", example = "9255")
-    private BigDecimal highPrecisionPrice;
-
     @Schema(description = "结算价,单位: 分", example = "19500")
     private Integer settlementPrice;
-
-    @Schema(description = "高精度结算价", example = "19997")
-    private BigDecimal highPrecisionSettlementPrice;
-
 }

+ 0 - 12
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSkuRespVO.java

@@ -40,12 +40,6 @@ public class ProductSkuRespVO {
     @Schema(description = "商品体积,单位:m^3 平米", example = "2.5")
     private Double volume;
 
-    @Schema(description = "一级分销的佣金,单位:分", example = "199")
-    private Integer firstBrokeragePrice;
-
-    @Schema(description = "二级分销的佣金,单位:分", example = "19")
-    private Integer secondBrokeragePrice;
-
     @Schema(description = "属性数组")
     private List<ProductSkuSaveReqVO.Property> properties;
 
@@ -62,13 +56,7 @@ public class ProductSkuRespVO {
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
 
-    @Schema(description = "高精度价格", example = "9255")
-    private BigDecimal highPrecisionPrice;
-
     @Schema(description = "结算价,单位: 分", example = "19500")
     private Integer settlementPrice;
 
-    @Schema(description = "高精度结算价", example = "19997")
-    private BigDecimal highPrecisionSettlementPrice;
-
 }

+ 0 - 12
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSkuSaveReqVO.java

@@ -39,12 +39,6 @@ public class ProductSkuSaveReqVO {
     @Schema(description = "商品体积,单位:m^3 平米", example = "2.5")
     private Double volume;
 
-    @Schema(description = "一级分销的佣金,单位:分", example = "199")
-    private Integer firstBrokeragePrice;
-
-    @Schema(description = "二级分销的佣金,单位:分", example = "19")
-    private Integer secondBrokeragePrice;
-
 
     @Schema(description = "推广费, 单位: 分")
     private Integer promotionFee;
@@ -81,12 +75,6 @@ public class ProductSkuSaveReqVO {
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
 
-    @Schema(description = "高精度价格", example = "9255")
-    private BigDecimal highPrecisionPrice;
-
     @Schema(description = "结算价,单位: 分", example = "19500")
     private Integer settlementPrice;
-
-    @Schema(description = "高精度结算价", example = "19997")
-    private BigDecimal highPrecisionSettlementPrice;
 }

+ 1 - 9
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java

@@ -68,7 +68,6 @@ public class ProductSpuPageReqVO extends PageParam {
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     private LocalDateTime[] createTime;
 
-
     @Schema(description = "推广费, 单位: 分")
     private Integer promotionFee;
 
@@ -78,13 +77,6 @@ public class ProductSpuPageReqVO extends PageParam {
     @Schema(description = "店铺id", example = "20588")
     private Long shopId;
 
-
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
-
-    @Schema(description = "高精度价格", example = "9255")
-    private BigDecimal highPrecisionPrice;
-
-    @Schema(description = "高精度", requiredMode = Schema.RequiredMode.REQUIRED)
-    private Boolean highPrecision;
-}
+}

+ 3 - 24
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuRespVO.java

@@ -42,9 +42,9 @@ public class ProductSpuRespVO {
     @ExcelProperty("商品分类编号")
     private Long categoryId;
 
-    @Schema(description = "商品品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
-    @ExcelProperty("商品品牌编号")
-    private Long brandId;
+    @Schema(description = "商品分区编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    @ExcelProperty("商品分区编号")
+    private Long areaId;
 
     @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.zhongxing.cn/xx.png")
     @ExcelProperty("商品封面图")
@@ -100,16 +100,6 @@ public class ProductSpuRespVO {
     @ExcelProperty("物流配置模板编号")
     private Long deliveryTemplateId;
 
-    // ========== 营销相关字段 =========
-
-    @Schema(description = "赠送积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
-    @ExcelProperty("赠送积分")
-    private Integer giveIntegral;
-
-    @Schema(description = "分销类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
-    @ExcelProperty("分销类型")
-    private Boolean subCommissionType;
-
     // ========== 统计相关字段 =========
 
     @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2000")
@@ -137,15 +127,4 @@ public class ProductSpuRespVO {
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
 
-    @Schema(description = "商品支付类别")
-    private Integer spuPayType;
-
-
-    @Schema(description = "高精度", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("高精度")
-    private Boolean highPrecision;
-
-    @Schema(description = "高精度价格", example = "9255")
-    @ExcelProperty("高精度价格")
-    private BigDecimal highPrecisionPrice;
 }

+ 2 - 23
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuSaveReqVO.java

@@ -36,8 +36,8 @@ public class ProductSpuSaveReqVO {
     @NotNull(message = "商品分类不能为空")
     private Long categoryId;
 
-    @Schema(description = "商品品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
-    private Long brandId;
+    @Schema(description = "商品分区编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    private Long areaId;
 
     @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.zhongxing.cn/xx.png")
     @NotEmpty(message = "商品封面图不能为空")
@@ -66,16 +66,6 @@ public class ProductSpuSaveReqVO {
     @Schema(description = "物流配置模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
     private Long deliveryTemplateId;
 
-    // ========== 营销相关字段 =========
-
-    @Schema(description = "赠送积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
-    @NotNull(message = "商品赠送积分不能为空")
-    private Integer giveIntegral;
-
-    @Schema(description = "分销类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
-    @NotNull(message = "商品分销类型不能为空")
-    private Boolean subCommissionType;
-
     // ========== 统计相关字段 =========
 
     @Schema(description = "虚拟销量", example = "66")
@@ -106,17 +96,6 @@ public class ProductSpuSaveReqVO {
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
 
-    @Schema(description = "商品支付类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
-    @NotNull(message = "商品支付类别不能为空")
-    private Integer spuPayType;
-
-    @Schema(description = "高精度价格", example = "9255")
-    private BigDecimal highPrecisionPrice;
-
-    @Schema(description = "高精度", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "高精度不能为空")
-    private Boolean highPrecision;
-
     @Schema(description = "商品申请id", example = "26655")
     private Long spuApplyId;
 }

+ 0 - 8
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spu/vo/ProductSpuSimpleRespVO.java

@@ -45,12 +45,4 @@ public class ProductSpuSimpleRespVO {
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
 
-    @Schema(description = "商品支付类别", example = "2")
-    private Integer spuPayType;
-
-    @Schema(description = "高精度")
-    private Boolean highPrecision;
-
-    @Schema(description = "高精度价格", example = "9255")
-    private BigDecimal highPrecisionPrice;
 }

+ 2 - 17
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spuapply/vo/SpuApplyPageReqVO.java

@@ -36,8 +36,8 @@ public class SpuApplyPageReqVO extends PageParam {
     @Schema(description = "商品分类编号", example = "1734")
     private Long categoryId;
 
-    @Schema(description = "商品品牌编号", example = "4607")
-    private Integer brandId;
+    @Schema(description = "商品分区编号", example = "4607")
+    private Integer areaId;
 
     @Schema(description = "商品封面图", example = "https://www.zhongxing.cn")
     private String picUrl;
@@ -72,12 +72,6 @@ public class SpuApplyPageReqVO extends PageParam {
     @Schema(description = "物流配置模板编号", example = "3169")
     private Long deliveryTemplateId;
 
-    @Schema(description = "赠送积分")
-    private Integer giveIntegral;
-
-    @Schema(description = "分销类型", example = "1")
-    private Boolean subCommissionType;
-
     @Schema(description = "商品销量", example = "231")
     private Integer salesCount;
 
@@ -103,15 +97,6 @@ public class SpuApplyPageReqVO extends PageParam {
     @Schema(description = "推广费, 单位: 分,值为sku中最大的推广费")
     private Integer promotionFee;
 
-    @Schema(description = "商品支付类别(1 rmb 2积分)", example = "1")
-    private Integer spuPayType;
-
-    @Schema(description = "高精度")
-    private Boolean highPrecision;
-
-    @Schema(description = "高精度价格", example = "23692")
-    private BigDecimal highPrecisionPrice;
-
     @Schema(description = "申请用户id", example = "22602")
     private Long applyMemberUserId;
 

+ 3 - 23
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spuapply/vo/SpuApplyRespVO.java

@@ -41,9 +41,9 @@ public class SpuApplyRespVO {
     @ExcelProperty("商品分类编号")
     private Long categoryId;
 
-    @Schema(description = "商品品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
-    @ExcelProperty("商品品牌编号")
-    private Long brandId;
+    @Schema(description = "商品分区编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    @ExcelProperty("商品分区编号")
+    private Long areaId;
 
     @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.zhongxing.cn/xx.png")
     @ExcelProperty("商品封面图")
@@ -99,16 +99,6 @@ public class SpuApplyRespVO {
     @ExcelProperty("物流配置模板编号")
     private Long deliveryTemplateId;
 
-    // ========== 营销相关字段 =========
-
-    @Schema(description = "赠送积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
-    @ExcelProperty("赠送积分")
-    private Integer giveIntegral;
-
-    @Schema(description = "分销类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
-    @ExcelProperty("分销类型")
-    private Boolean subCommissionType;
-
     // ========== 统计相关字段 =========
 
     @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2000")
@@ -137,16 +127,6 @@ public class SpuApplyRespVO {
 
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
-    @Schema(description = "商品支付类别")
-    private Integer spuPayType;
-
-    @Schema(description = "高精度", requiredMode = Schema.RequiredMode.REQUIRED)
-    @ExcelProperty("高精度")
-    private Boolean highPrecision;
-
-    @Schema(description = "高精度价格", example = "9255")
-    @ExcelProperty("高精度价格")
-    private BigDecimal highPrecisionPrice;
 
     @Schema(description = "申请用户id", example = "22602")
     @ExcelProperty("申请用户id")

+ 2 - 23
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/controller/admin/spuapply/vo/SpuApplySaveReqVO.java

@@ -35,8 +35,8 @@ public class SpuApplySaveReqVO {
     @NotNull(message = "商品分类不能为空")
     private Long categoryId;
 
-    @Schema(description = "商品品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
-    private Long brandId;
+    @Schema(description = "商品分区编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    private Long areaId;
 
     @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.zhongxing.cn/xx.png")
     @NotEmpty(message = "商品封面图不能为空")
@@ -65,16 +65,6 @@ public class SpuApplySaveReqVO {
     @Schema(description = "物流配置模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
     private Long deliveryTemplateId;
 
-    // ========== 营销相关字段 =========
-
-    @Schema(description = "赠送积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "111")
-    @NotNull(message = "商品赠送积分不能为空")
-    private Integer giveIntegral;
-
-    @Schema(description = "分销类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
-    @NotNull(message = "商品分销类型不能为空")
-    private Boolean subCommissionType;
-
     // ========== 统计相关字段 =========
 
     @Schema(description = "虚拟销量", example = "66")
@@ -105,15 +95,4 @@ public class SpuApplySaveReqVO {
     @Schema(description = "商户id", example = "8240")
     private Long merchantId;
 
-    @Schema(description = "商品支付类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
-    @NotNull(message = "商品支付类别不能为空")
-    private Integer spuPayType;
-
-    @Schema(description = "高精度价格", example = "9255")
-    private BigDecimal highPrecisionPrice;
-
-    @Schema(description = "高精度", requiredMode = Schema.RequiredMode.REQUIRED)
-    @NotNull(message = "高精度不能为空")
-    private Boolean highPrecision;
-
 }

+ 1 - 1
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/convert/comment/ProductCommentConvert.java

@@ -28,7 +28,7 @@ public interface ProductCommentConvert {
         ProductCommentDO comment = BeanUtils.toBean(createReqDTO, ProductCommentDO.class)
                 .setScores(convertScores(createReqDTO.getDescriptionScores(), createReqDTO.getBenefitScores()));
         if (user != null) {
-            comment.setUserId(user.getId()).setUserNickname(user.getNickname()).setUserAvatar(user.getAvatar());
+            comment.setUserId(user.getId()).setUserNickname(user.getUsername()).setUserAvatar(user.getAvatar());
         }
         if (spu != null) {
             comment.setSpuId(spu.getId()).setSpuName(spu.getName());

+ 0 - 19
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/sku/ProductSkuDO.java

@@ -78,17 +78,6 @@ public class ProductSkuDO extends BaseDO {
      */
     private Double volume;
 
-    /**
-     * 一级分销的佣金,单位:分
-     */
-    private Integer firstBrokeragePrice;
-    /**
-     * 二级分销的佣金,单位:分
-     */
-    private Integer secondBrokeragePrice;
-
-    // ========== 营销相关字段 =========
-
     // ========== 统计相关字段 =========
     /**
      * 商品销量
@@ -109,19 +98,11 @@ public class ProductSkuDO extends BaseDO {
 
     private Long merchantId;
 
-    /**
-     * 高精度价格
-     */
-    private BigDecimal highPrecisionPrice;
 
     /**
      * 结算价,单位: 分
      */
     private Integer settlementPrice;
-    /**
-     * 高精度结算价
-     */
-    private BigDecimal highPrecisionSettlementPrice;
     /**
      * 商品属性
      */

+ 0 - 16
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/skuapply/SkuApplyDO.java

@@ -81,14 +81,6 @@ public class SkuApplyDO extends BaseDO {
      * 商品体积,单位:m^3 平米
      */
     private Double volume;
-    /**
-     * 一级分销的佣金,单位:分
-     */
-    private Integer firstBrokeragePrice;
-    /**
-     * 二级分销的佣金,单位:分
-     */
-    private Integer secondBrokeragePrice;
     /**
      * 商品销量
      */
@@ -101,18 +93,10 @@ public class SkuApplyDO extends BaseDO {
      * 商户id
      */
     private Long merchantId;
-    /**
-     * 高精度价格
-     */
-    private BigDecimal highPrecisionPrice;
     /**
      * 结算价,单位: 分
      */
     private Integer settlementPrice;
-    /**
-     * 高精度结算价
-     */
-    private BigDecimal highPrecisionSettlementPrice;
 
     @Data
     @NoArgsConstructor

+ 2 - 32
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/spu/ProductSpuDO.java

@@ -68,10 +68,9 @@ public class ProductSpuDO extends BaseDO {
      */
     private Long categoryId;
     /**
-     * 商品品牌编号
-     * 关联 {@link ProductBrandDO#getId()}
+     * 商品分区编号
      */
-    private Long brandId;
+    private Long areaId;
     /**
      * 商品封面图
      */
@@ -135,21 +134,6 @@ public class ProductSpuDO extends BaseDO {
      */
     private Long deliveryTemplateId;
 
-    // ========== 营销相关字段 =========
-
-    /**
-     * 赠送积分
-     */
-    private Integer giveIntegral;
-
-    // TODO @puhui999:字段估计要改成 brokerageType
-    /**
-     * 分销类型
-     * false - 默认
-     * true - 自行设置
-     */
-    private Boolean subCommissionType;
-
     // ========== 统计相关字段 =========
 
     /**
@@ -182,20 +166,6 @@ public class ProductSpuDO extends BaseDO {
      */
     private Long merchantId;
 
-    /**
-     * 商品支付类别
-     */
-    private Integer spuPayType;
-
-    /**
-     * 高精度
-     */
-    private Boolean highPrecision;
-    /**
-     * 高精度价格
-     */
-    private BigDecimal highPrecisionPrice;
-
     /**
      * 商品申请id
      */

+ 2 - 22
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/dataobject/spuapply/SpuApplyDO.java

@@ -58,9 +58,9 @@ public class SpuApplyDO extends BaseDO {
      */
     private Long categoryId;
     /**
-     * 商品品牌编号
+     * 商品分区编号
      */
-    private Integer brandId;
+    private Integer areaId;
     /**
      * 商品封面图
      */
@@ -108,14 +108,6 @@ public class SpuApplyDO extends BaseDO {
      * 物流配置模板编号
      */
     private Long deliveryTemplateId;
-    /**
-     * 赠送积分
-     */
-    private Integer giveIntegral;
-    /**
-     * 分销类型
-     */
-    private Boolean subCommissionType;
     /**
      * 商品销量
      */
@@ -144,18 +136,6 @@ public class SpuApplyDO extends BaseDO {
      * 推广费, 单位: 分,值为sku中最大的推广费
      */
     private Integer promotionFee;
-    /**
-     * 商品支付类别(1 rmb 2积分)
-     */
-    private Integer spuPayType;
-    /**
-     * 高精度
-     */
-    private Boolean highPrecision;
-    /**
-     * 高精度价格
-     */
-    private BigDecimal highPrecisionPrice;
     /**
      * 申请用户id
      */

+ 0 - 4
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/mysql/skuapply/SkuApplyMapper.java

@@ -31,15 +31,11 @@ public interface SkuApplyMapper extends BaseMapperX<SkuApplyDO> {
                 .eqIfPresent(SkuApplyDO::getStock, reqVO.getStock())
                 .eqIfPresent(SkuApplyDO::getWeight, reqVO.getWeight())
                 .eqIfPresent(SkuApplyDO::getVolume, reqVO.getVolume())
-                .eqIfPresent(SkuApplyDO::getFirstBrokeragePrice, reqVO.getFirstBrokeragePrice())
-                .eqIfPresent(SkuApplyDO::getSecondBrokeragePrice, reqVO.getSecondBrokeragePrice())
                 .eqIfPresent(SkuApplyDO::getSalesCount, reqVO.getSalesCount())
                 .betweenIfPresent(SkuApplyDO::getCreateTime, reqVO.getCreateTime())
                 .eqIfPresent(SkuApplyDO::getShopId, reqVO.getShopId())
                 .eqIfPresent(SkuApplyDO::getMerchantId, reqVO.getMerchantId())
-                .eqIfPresent(SkuApplyDO::getHighPrecisionPrice, reqVO.getHighPrecisionPrice())
                 .eqIfPresent(SkuApplyDO::getSettlementPrice, reqVO.getSettlementPrice())
-                .eqIfPresent(SkuApplyDO::getHighPrecisionSettlementPrice, reqVO.getHighPrecisionSettlementPrice())
                 .orderByDesc(SkuApplyDO::getId));
     }
 

+ 1 - 6
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/dal/mysql/spuapply/SpuApplyMapper.java

@@ -33,7 +33,7 @@ public interface SpuApplyMapper extends BaseMapperX<SpuApplyDO> {
                 .eqIfPresent(SpuApplyDO::getProducerArea, reqVO.getProducerArea())
                 .eqIfPresent(SpuApplyDO::getSpuType, reqVO.getSpuType())
                 .eqIfPresent(SpuApplyDO::getCategoryId, reqVO.getCategoryId())
-                .eqIfPresent(SpuApplyDO::getBrandId, reqVO.getBrandId())
+                .eqIfPresent(SpuApplyDO::getAreaId, reqVO.getAreaId())
                 .eqIfPresent(SpuApplyDO::getPicUrl, reqVO.getPicUrl())
                 .eqIfPresent(SpuApplyDO::getSliderPicUrls, reqVO.getSliderPicUrls())
                 .eqIfPresent(SpuApplyDO::getSort, reqVO.getSort())
@@ -45,8 +45,6 @@ public interface SpuApplyMapper extends BaseMapperX<SpuApplyDO> {
                 .eqIfPresent(SpuApplyDO::getStock, reqVO.getStock())
                 .eqIfPresent(SpuApplyDO::getDeliveryTypes, reqVO.getDeliveryTypes())
                 .eqIfPresent(SpuApplyDO::getDeliveryTemplateId, reqVO.getDeliveryTemplateId())
-                .eqIfPresent(SpuApplyDO::getGiveIntegral, reqVO.getGiveIntegral())
-                .eqIfPresent(SpuApplyDO::getSubCommissionType, reqVO.getSubCommissionType())
                 .eqIfPresent(SpuApplyDO::getSalesCount, reqVO.getSalesCount())
                 .eqIfPresent(SpuApplyDO::getVirtualSalesCount, reqVO.getVirtualSalesCount())
                 .eqIfPresent(SpuApplyDO::getBrowseCount, reqVO.getBrowseCount())
@@ -55,9 +53,6 @@ public interface SpuApplyMapper extends BaseMapperX<SpuApplyDO> {
                 .eqIfPresent(SpuApplyDO::getMerchantId, reqVO.getMerchantId())
                 .eqIfPresent(SpuApplyDO::getHidden, reqVO.getHidden())
                 .eqIfPresent(SpuApplyDO::getPromotionFee, reqVO.getPromotionFee())
-                .eqIfPresent(SpuApplyDO::getSpuPayType, reqVO.getSpuPayType())
-                .eqIfPresent(SpuApplyDO::getHighPrecision, reqVO.getHighPrecision())
-                .eqIfPresent(SpuApplyDO::getHighPrecisionPrice, reqVO.getHighPrecisionPrice())
                 .eqIfPresent(SpuApplyDO::getApplyMemberUserId, reqVO.getApplyMemberUserId())
                 .eqIfPresent(SpuApplyDO::getCheckSystemUserId, reqVO.getCheckSystemUserId())
                 .betweenIfPresent(SpuApplyDO::getCheckTime, reqVO.getCheckTime())

+ 1 - 2
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/sku/ProductSkuService.java

@@ -41,9 +41,8 @@ public interface ProductSkuService {
      * 对 sku 的组合的属性等进行合法性校验
      *
      * @param list          sku组合的集合
-     * @param highPrecision 是否高精度商品
      */
-    void validateSkuList(List<ProductSkuSaveReqVO> list, Boolean specType, Boolean highPrecision);
+    void validateSkuList(List<ProductSkuSaveReqVO> list, Boolean specType);
 
     /**
      * 批量创建 SKU

+ 4 - 12
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/sku/ProductSkuServiceImpl.java

@@ -78,7 +78,7 @@ public class ProductSkuServiceImpl implements ProductSkuService {
     }
 
     @Override
-    public void validateSkuList(List<ProductSkuSaveReqVO> skus, Boolean specType, Boolean highPrecision) {
+    public void validateSkuList(List<ProductSkuSaveReqVO> skus, Boolean specType) {
         // 0、校验skus是否为空
         if (CollUtil.isEmpty(skus)) {
             throw exception(SKU_NOT_EXISTS);
@@ -87,16 +87,8 @@ public class ProductSkuServiceImpl implements ProductSkuService {
         // 校验结算价是否大于成本价
         for (ProductSkuSaveReqVO sku : skus) {
             // 如果是高精度商品
-            if(highPrecision){
-                sku.setSettlementPrice(0);
-                if(sku.getHighPrecisionSettlementPrice().compareTo(sku.getHighPrecisionPrice()) > 0){
-                    throw exception(HIGH_PRECISION_PRICE_NOT_ENOUGH);
-                }
-            }else {
-                sku.setHighPrecisionSettlementPrice(BigDecimal.ZERO);
-                if(sku.getSettlementPrice() > sku.getCostPrice()){
-                    throw exception(HIGH_PRECISION_PRICE_NOT_ENOUGH);
-                }
+            if (sku.getSettlementPrice() > sku.getCostPrice()) {
+                throw exception(HIGH_PRECISION_PRICE_NOT_ENOUGH);
             }
         }
 
@@ -228,7 +220,7 @@ public class ProductSkuServiceImpl implements ProductSkuService {
     @Override
     public Integer getSkuCount(Long key) {
 
-        return   productSkuMapper.getSkuCount(key);
+        return productSkuMapper.getSkuCount(key);
 
     }
 

+ 1 - 2
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/skuapply/SkuApplyService.java

@@ -71,7 +71,6 @@ public interface SkuApplyService {
      * 对 sku 的组合的属性等进行合法性校验
      *
      * @param list          sku组合的集合
-     * @param highPrecision 是否高精度商品
      */
-    void validateSkuList(List<SkuApplySaveReqVO> list, Boolean specType, Boolean highPrecision);
+    void validateSkuList(List<SkuApplySaveReqVO> list, Boolean specType);
 }

+ 4 - 11
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/skuapply/SkuApplyServiceImpl.java

@@ -9,6 +9,7 @@ import cn.newfeifan.mall.module.product.service.property.ProductPropertyService;
 import cn.newfeifan.mall.module.product.service.property.ProductPropertyValueService;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
+
 import javax.annotation.Resource;
 
 import org.springframework.transaction.annotation.Transactional;
@@ -130,7 +131,7 @@ public class SkuApplyServiceImpl implements SkuApplyService {
     }
 
     @Override
-    public void validateSkuList(List<SkuApplySaveReqVO> skus, Boolean specType, Boolean highPrecision) {
+    public void validateSkuList(List<SkuApplySaveReqVO> skus, Boolean specType) {
         // 0、校验skus是否为空
         if (CollUtil.isEmpty(skus)) {
             throw exception(SKU_NOT_EXISTS);
@@ -139,16 +140,8 @@ public class SkuApplyServiceImpl implements SkuApplyService {
         // 校验结算价是否大于成本价
         for (SkuApplySaveReqVO sku : skus) {
             // 如果是高精度商品
-            if(highPrecision){
-                sku.setSettlementPrice(0);
-                if(sku.getHighPrecisionSettlementPrice().compareTo(sku.getHighPrecisionPrice()) > 0){
-                    throw exception(HIGH_PRECISION_PRICE_NOT_ENOUGH);
-                }
-            }else {
-                sku.setHighPrecisionSettlementPrice(BigDecimal.ZERO);
-                if(sku.getSettlementPrice() > sku.getCostPrice()){
-                    throw exception(HIGH_PRECISION_PRICE_NOT_ENOUGH);
-                }
+            if (sku.getSettlementPrice() > sku.getCostPrice()) {
+                throw exception(HIGH_PRECISION_PRICE_NOT_ENOUGH);
             }
         }
 

+ 24 - 28
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spu/ProductSpuServiceImpl.java

@@ -70,7 +70,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
 
         // 校验 SKU
         List<ProductSkuSaveReqVO> skuSaveReqList = createReqVO.getSkus();
-        productSkuService.validateSkuList(skuSaveReqList, createReqVO.getSpecType(), createReqVO.getHighPrecision());
+        productSkuService.validateSkuList(skuSaveReqList, createReqVO.getSpecType());
 
         ProductSpuDO spu = BeanUtils.toBean(createReqVO, ProductSpuDO.class);
         // 初始化 SPU 中 SKU 相关属性
@@ -90,8 +90,8 @@ public class ProductSpuServiceImpl implements ProductSpuService {
             productSkuSaveReqVO.setMerchantId(userShopDetails.getMerId());
 
             Integer skuPromotionFee = productSkuSaveReqVO.getPromotionFee();
-            if(skuPromotionFee>maxPromotionFee)
-                maxPromotionFee=skuPromotionFee;
+            if (skuPromotionFee > maxPromotionFee)
+                maxPromotionFee = skuPromotionFee;
         }
         spu.setPromotionFee(maxPromotionFee);
 
@@ -113,7 +113,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
 //        brandService.validateProductBrand(updateReqVO.getBrandId());
         // 校验SKU
         List<ProductSkuSaveReqVO> skuSaveReqList = updateReqVO.getSkus();
-        productSkuService.validateSkuList(skuSaveReqList, updateReqVO.getSpecType(),updateReqVO.getHighPrecision());
+        productSkuService.validateSkuList(skuSaveReqList, updateReqVO.getSpecType());
 
         // 更新 SPU
         ProductSpuDO updateObj = BeanUtils.toBean(updateReqVO, ProductSpuDO.class);
@@ -127,8 +127,8 @@ public class ProductSpuServiceImpl implements ProductSpuService {
             productSkuSaveReqVO.setMerchantId(updateReqVO.getMerchantId());
 
             Integer skuPromotionFee = productSkuSaveReqVO.getPromotionFee();
-            if(skuPromotionFee>maxPromotionFee)
-                maxPromotionFee=skuPromotionFee;
+            if (skuPromotionFee > maxPromotionFee)
+                maxPromotionFee = skuPromotionFee;
         }
 
         updateObj.setPromotionFee(maxPromotionFee);
@@ -147,17 +147,13 @@ public class ProductSpuServiceImpl implements ProductSpuService {
     private void initSpuFromSkus(ProductSpuDO spu, List<ProductSkuSaveReqVO> skus) {
         // sku 单价最低的商品的价格
         //是否是高精度商品
-        if(!spu.getHighPrecision()){
-            // sku 单价最低的商品的价格
-            spu.setPrice(getMinValue(skus, ProductSkuSaveReqVO::getPrice));
-            // sku 单价最低的商品的市场价格
-            spu.setMarketPrice(getMinValue(skus, ProductSkuSaveReqVO::getMarketPrice));
-            // sku 单价最低的商品的成本价格
-            spu.setCostPrice(getMinValue(skus, ProductSkuSaveReqVO::getCostPrice));
-        }else{
-            // sku 单价最低的商品的价格
-            spu.setHighPrecisionPrice(getMinValue(skus, ProductSkuSaveReqVO::getHighPrecisionPrice));
-        }
+        // sku 单价最低的商品的价格
+        spu.setPrice(getMinValue(skus, ProductSkuSaveReqVO::getPrice));
+        // sku 单价最低的商品的市场价格
+        spu.setMarketPrice(getMinValue(skus, ProductSkuSaveReqVO::getMarketPrice));
+        // sku 单价最低的商品的成本价格
+        spu.setCostPrice(getMinValue(skus, ProductSkuSaveReqVO::getCostPrice));
+
         // skus 库存总数
         spu.setStock(getSumValue(skus, ProductSkuSaveReqVO::getStock, Integer::sum));
         // 若是 spu 已有状态则不处理
@@ -204,7 +200,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
 
     @Override
     public void updateBrowseCount(Long id, int incrCount) {
-        productSpuMapper.updateBrowseCount(id , incrCount);
+        productSpuMapper.updateBrowseCount(id, incrCount);
     }
 
     @Override
@@ -315,23 +311,23 @@ public class ProductSpuServiceImpl implements ProductSpuService {
 
         Map<Integer, Long> counts = Maps.newLinkedHashMapWithExpectedSize(5);
         counts.put(ProductSpuPageReqVO.APPLY_SPU,
-                spuApplyMapper.selectCount(0,pageVO));
+                spuApplyMapper.selectCount(0, pageVO));
 
         // 查询销售中的商品数量
         counts.put(ProductSpuPageReqVO.FOR_SALE,
-                spuApplyMapper.selectCount(SpuApplyDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus(),pageVO));
+                spuApplyMapper.selectCount(SpuApplyDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus(), pageVO));
         // 查询仓库中的商品数量
         counts.put(ProductSpuPageReqVO.IN_WAREHOUSE,
-                spuApplyMapper.selectCount(SpuApplyDO::getStatus, ProductSpuStatusEnum.DISABLE.getStatus(),pageVO));
+                spuApplyMapper.selectCount(SpuApplyDO::getStatus, ProductSpuStatusEnum.DISABLE.getStatus(), pageVO));
         // 查询售空的商品数量
         counts.put(ProductSpuPageReqVO.SOLD_OUT,
-                spuApplyMapper.selectCount(SpuApplyDO::getStock, 0,pageVO));
+                spuApplyMapper.selectCount(SpuApplyDO::getStock, 0, pageVO));
         // 查询触发警戒库存的商品数量
         counts.put(ProductSpuPageReqVO.ALERT_STOCK,
                 spuApplyMapper.selectCount(pageVO));
         // 查询回收站中的商品数量
         counts.put(ProductSpuPageReqVO.RECYCLE_BIN,
-                spuApplyMapper.selectCount(SpuApplyDO::getStatus, ProductSpuStatusEnum.RECYCLE.getStatus(),pageVO));
+                spuApplyMapper.selectCount(SpuApplyDO::getStatus, ProductSpuStatusEnum.RECYCLE.getStatus(), pageVO));
         return counts;
     }
 
@@ -343,19 +339,19 @@ public class ProductSpuServiceImpl implements ProductSpuService {
 
         // 查询销售中的商品数量
         counts.put(ProductSpuPageReqVO.FOR_SALE,
-                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus(), userShopDetails.getMerId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.ENABLE.getStatus(), userShopDetails.getMerId(), userShopDetails.getShopId()));
         // 查询仓库中的商品数量
         counts.put(ProductSpuPageReqVO.IN_WAREHOUSE,
-                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.DISABLE.getStatus(), userShopDetails.getMerId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.DISABLE.getStatus(), userShopDetails.getMerId(), userShopDetails.getShopId()));
         // 查询售空的商品数量
         counts.put(ProductSpuPageReqVO.SOLD_OUT,
-                productSpuMapper.selectCount(ProductSpuDO::getStock, 0, userShopDetails.getMerId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStock, 0, userShopDetails.getMerId(), userShopDetails.getShopId()));
         // 查询触发警戒库存的商品数量
         counts.put(ProductSpuPageReqVO.ALERT_STOCK,
-                productSpuMapper.selectCount(userShopDetails.getMerId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(userShopDetails.getMerId(), userShopDetails.getShopId()));
         // 查询回收站中的商品数量
         counts.put(ProductSpuPageReqVO.RECYCLE_BIN,
-                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.RECYCLE.getStatus(), userShopDetails.getMerId(),userShopDetails.getShopId()));
+                productSpuMapper.selectCount(ProductSpuDO::getStatus, ProductSpuStatusEnum.RECYCLE.getStatus(), userShopDetails.getMerId(), userShopDetails.getShopId()));
         return counts;
     }
 

+ 20 - 34
feifan-module-mall/feifan-module-product-biz/src/main/java/cn/newfeifan/mall/module/product/service/spuapply/SpuApplyServiceImpl.java

@@ -84,7 +84,7 @@ public class SpuApplyServiceImpl implements SpuApplyService {
 
         // 校验 SKU
         List<SkuApplySaveReqVO> skuSaveReqList = createReqVO.getSkus();
-        skuApplyService.validateSkuList(skuSaveReqList, createReqVO.getSpecType(), createReqVO.getHighPrecision());
+        skuApplyService.validateSkuList(skuSaveReqList, createReqVO.getSpecType());
 
         SpuApplyDO spuApply = BeanUtils.toBean(createReqVO, SpuApplyDO.class);
         // 初始化 SPU 中 SKU 相关属性
@@ -103,8 +103,8 @@ public class SpuApplyServiceImpl implements SpuApplyService {
             productSkuSaveReqVO.setMerchantId(userShopDetails.getMerId());
 
             Integer skuPromotionFee = productSkuSaveReqVO.getPromotionFee();
-            if(skuPromotionFee>maxPromotionFee)
-                maxPromotionFee=skuPromotionFee;
+            if (skuPromotionFee > maxPromotionFee)
+                maxPromotionFee = skuPromotionFee;
         }
 
         spuApply.setApplyMemberUserId(getLoginUserId());
@@ -131,17 +131,12 @@ public class SpuApplyServiceImpl implements SpuApplyService {
      */
     private void initSpuFromSkus(SpuApplyDO spu, List<SkuApplySaveReqVO> skus, Boolean isAdd) {
         //是否是高精度商品
-        if (!spu.getHighPrecision()) {
-            // sku 单价最低的商品的价格
-            spu.setPrice(getMinValue(skus, SkuApplySaveReqVO::getPrice));
-            // sku 单价最低的商品的市场价格
-            spu.setMarketPrice(getMinValue(skus, SkuApplySaveReqVO::getMarketPrice));
-            // sku 单价最低的商品的成本价格
-            spu.setCostPrice(getMinValue(skus, SkuApplySaveReqVO::getCostPrice));
-        } else {
-            // sku 单价最低的商品的价格
-            spu.setHighPrecisionPrice(getMinValue(skus, SkuApplySaveReqVO::getHighPrecisionPrice));
-        }
+        // sku 单价最低的商品的价格
+        spu.setPrice(getMinValue(skus, SkuApplySaveReqVO::getPrice));
+        // sku 单价最低的商品的市场价格
+        spu.setMarketPrice(getMinValue(skus, SkuApplySaveReqVO::getMarketPrice));
+        // sku 单价最低的商品的成本价格
+        spu.setCostPrice(getMinValue(skus, SkuApplySaveReqVO::getCostPrice));
 
         // skus 库存总数
         spu.setStock(getSumValue(skus, SkuApplySaveReqVO::getStock, Integer::sum));
@@ -171,7 +166,7 @@ public class SpuApplyServiceImpl implements SpuApplyService {
 //        brandService.validateProductBrand(updateReqVO.getBrandId());
         // 校验SKU
         List<SkuApplySaveReqVO> skuSaveReqList = updateReqVO.getSkus();
-        skuApplyService.validateSkuList(skuSaveReqList, updateReqVO.getSpecType(), updateReqVO.getHighPrecision());
+        skuApplyService.validateSkuList(skuSaveReqList, updateReqVO.getSpecType());
 
         // 更新 SPU
         SpuApplyDO updateObj = BeanUtils.toBean(updateReqVO, SpuApplyDO.class);
@@ -201,7 +196,6 @@ public class SpuApplyServiceImpl implements SpuApplyService {
                 spuApplyDetail.getIntroduction().equals(updateReqVO.getIntroduction()) &&
                 spuApplyDetail.getSliderPicUrls().equals(updateReqVO.getSliderPicUrls()) &&
                 spuApplyDetail.getDescription().equals(updateReqVO.getDescription()) &&
-                spuApplyDetail.getHighPrecision().equals(updateReqVO.getHighPrecision()) &&
                 spuApplyDetail.getSkus().size() == updateReqVO.getSkus().size()
         ) {
             boolean flag = isFlag(updateReqVO, spuApplyDetail);
@@ -223,11 +217,11 @@ public class SpuApplyServiceImpl implements SpuApplyService {
         // 批量更新 SKU
         skuApplyService.updateSkuList(updateObj.getId(), updateReqVO.getSkus());
 
-        // 发送审核短信
-        if (updateObj.getCheckStatus().equals(SpuApplyCheckStatusEnum.WAIT_CHECK.getStatus())) {
-            // 发送短信
-            sendSms(updateReqVO.getName());
-        }
+//        // 发送审核短信
+//        if (updateObj.getCheckStatus().equals(SpuApplyCheckStatusEnum.WAIT_CHECK.getStatus())) {
+//            // 发送短信
+//            sendSms(updateReqVO.getName());
+//        }
 
     }
 
@@ -265,19 +259,11 @@ public class SpuApplyServiceImpl implements SpuApplyService {
     private static boolean isFlag(SpuApplySaveReqVO updateReqVO, SpuApplyRespVO spuApplyDetail) {
         boolean flag = true;
         for (int i = 0; i < spuApplyDetail.getSkus().size(); i++) {
-            // 如果是高精度商品
-            if (updateReqVO.getHighPrecision()) {
-                if (!spuApplyDetail.getSkus().get(i).getHighPrecisionPrice().equals(updateReqVO.getSkus().get(i).getHighPrecisionPrice()) ||
-                        !spuApplyDetail.getSkus().get(i).getHighPrecisionSettlementPrice().equals(updateReqVO.getSkus().get(i).getHighPrecisionSettlementPrice())
-                ) {
-                    flag = false;
-                }
-            } else {
-                if (!spuApplyDetail.getSkus().get(i).getSettlementPrice().equals(updateReqVO.getSkus().get(i).getSettlementPrice()) ||
-                        !spuApplyDetail.getSkus().get(i).getCostPrice().equals(updateReqVO.getSkus().get(i).getCostPrice())
-                ) {
-                    flag = false;
-                }
+            if (!spuApplyDetail.getSkus().get(i).getSettlementPrice().equals(updateReqVO.getSkus().get(i).getSettlementPrice()) ||
+                    !spuApplyDetail.getSkus().get(i).getCostPrice().equals(updateReqVO.getSkus().get(i).getCostPrice())
+            ) {
+                flag = false;
+                break;
             }
         }
         return flag;

+ 1 - 1
feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/controller/admin/coupon/CouponController.java

@@ -59,7 +59,7 @@ public class CouponController {
         // 读取用户信息,进行拼接
         Map<Long, MemberUserRespDTO> userMap = memberUserApi.getUserMap(convertSet(pageResult.getList(), CouponDO::getUserId));
         pageResulVO.getList().forEach(itemRespVO -> MapUtils.findAndThen(userMap, itemRespVO.getUserId(),
-                userRespDTO -> itemRespVO.setNickname(userRespDTO.getNickname())));
+                userRespDTO -> itemRespVO.setNickname(userRespDTO.getUsername())));
         return success(pageResulVO);
     }
 

+ 2 - 2
feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/convert/bargain/BargainHelpConvert.java

@@ -28,7 +28,7 @@ public interface BargainHelpConvert {
         // 拼接数据
         pageResult.getList().forEach(record ->
                 MapUtils.findAndThen(userMap, record.getUserId(),
-                        user -> record.setNickname(user.getNickname()).setAvatar(user.getAvatar())));
+                        user -> record.setNickname(user.getUsername()).setAvatar(user.getAvatar())));
         return pageResult;
     }
     PageResult<BargainHelpRespVO> convertPage(PageResult<BargainHelpDO> page);
@@ -38,7 +38,7 @@ public interface BargainHelpConvert {
         List<AppBargainHelpRespVO> helpVOs = convertList02(helps);
         helpVOs.forEach(help ->
                 MapUtils.findAndThen(userMap, help.getUserId(),
-                        user -> help.setNickname(user.getNickname()).setAvatar(user.getAvatar())));
+                        user -> help.setNickname(user.getUsername()).setAvatar(user.getAvatar())));
         return helpVOs;
     }
     List<AppBargainHelpRespVO> convertList02(List<BargainHelpDO> helps);

+ 2 - 2
feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/convert/bargain/BargainRecordConvert.java

@@ -40,7 +40,7 @@ public interface BargainRecordConvert {
         Map<Long, BargainActivityDO> activityMap = convertMap(activityList, BargainActivityDO::getId);
         pageResult.getList().forEach(record -> {
             MapUtils.findAndThen(userMap, record.getUserId(),
-                    user -> record.setNickname(user.getNickname()).setAvatar(user.getAvatar()));
+                    user -> record.setNickname(user.getUsername()).setAvatar(user.getAvatar()));
             record.setActivity(BargainActivityConvert.INSTANCE.convert(activityMap.get(record.getActivityId())))
                     .setHelpCount(helpCountMap.getOrDefault(record.getId(), 0));
         });
@@ -76,7 +76,7 @@ public interface BargainRecordConvert {
         summary.setSuccessList(CollectionUtils.convertList(successList, record -> {
             AppBargainRecordSummaryRespVO.Record recordVO = new AppBargainRecordSummaryRespVO.Record();
             MapUtils.findAndThen(userMap, record.getUserId(),
-                    user -> recordVO.setNickname(user.getNickname()).setAvatar(user.getAvatar()));
+                    user -> recordVO.setNickname(user.getUsername()).setAvatar(user.getAvatar()));
             MapUtils.findAndThen(activityMap, record.getActivityId(),
                     activity -> recordVO.setActivityName(activity.getName()));
             return recordVO;

+ 1 - 1
feifan-module-mall/feifan-module-promotion-biz/src/main/java/cn/newfeifan/mall/module/promotion/convert/combination/CombinationActivityConvert.java

@@ -121,7 +121,7 @@ public interface CombinationActivityConvert {
                 .setStatus(CombinationRecordStatusEnum.IN_PROGRESS.getStatus()) // 创建后默认状态为进行中
                 .setUserSize(activity.getUserSize()).setUserCount(1) // 默认就是 1 插入后会接着更新一次所有的拼团记录
                 // 用户信息
-                .setNickname(user.getNickname()).setAvatar(user.getAvatar())
+                .setNickname(user.getUsername()).setAvatar(user.getAvatar())
                 // 商品信息
                 .setSpuName(spu.getName()).setPicUrl(sku.getPicUrl());
     }

+ 5 - 10
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/aftersale/vo/AfterSaleBaseVO.java

@@ -90,10 +90,10 @@ public class AfterSaleBaseVO {
 
     @Schema(description = "退款金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "18077")
     @NotNull(message = "退款金额,单位:分不能为空")
-    private Integer refundPrice;
+    private Integer refundIntegral;
 
-    @Schema(description = "支付退款编号", example = "10271")
-    private Long payRefundId;
+    @Schema(description = "退款积分类型")
+    private Integer refundIntegralType;
 
     @Schema(description = "退款时间")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@@ -119,12 +119,7 @@ public class AfterSaleBaseVO {
     @Schema(description = "店铺id", example = "20588")
     private Long shopId;
 
-    @Schema(description = "退还的使用的消费分")
-    private Long refundConsumptionPoints;
+    @Schema(description = "退款总积分")
+    private Long refundIntegralTotal;
 
-    @Schema(description = "退款总金额,单位:分")
-    private Long refundPriceTotal;
-
-    @Schema(description = "退还的使用的积分")
-    private Long refundIntegral;
 }

+ 2 - 5
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/aftersale/vo/AfterSalePageReqVO.java

@@ -58,11 +58,8 @@ public class AfterSalePageReqVO extends PageParam {
     @Schema(description = "用户id", example = "1")
     private Long userId;
 
-    @Schema(description = "退还的使用的消费分")
-    private Long refundConsumptionPoints;
-
-    @Schema(description = "退款总金额,单位:分")
-    private Long refundPriceTotal;
+    @Schema(description = "退款总积分")
+    private Long refundIntegralTotal;
 
     @Schema(description = "退还的使用的积分")
     private Long refundIntegral;

+ 2 - 2
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/base/member/user/MemberUserRespVO.java

@@ -10,8 +10,8 @@ public class MemberUserRespVO {
     @Schema(description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
     private Long id;
 
-    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "非繁源码")
-    private String nickname;
+    @Schema(description = "用户", requiredMode = Schema.RequiredMode.REQUIRED, example = "非繁源码")
+    private String username;
 
     @Schema(description = "用户头像", example = "https://www.zhongxing.cn/xxx.png")
     private String avatar;

+ 3 - 24
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/TradeOrderController.java

@@ -57,6 +57,7 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.stream.Collectors;
 
 import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
 import static cn.newfeifan.mall.framework.common.pojo.CommonResult.success;
@@ -100,8 +101,7 @@ public class TradeOrderController {
         }
 
         // 查询用户信息
-        Set<Long> userIds = CollUtil.unionDistinct(convertList(pageResult.getList(), TradeOrderDO::getUserId),
-                convertList(pageResult.getList(), TradeOrderDO::getBrokerageUserId, Objects::nonNull));
+        Set<Long> userIds = pageResult.getList().stream().map(TradeOrderDO::getUserId).collect(Collectors.toSet());
         Map<Long, MemberUserRespDTO> userMap = memberUserApi.getUserMap(userIds);
         // 查询订单项
         List<TradeOrderItemDO> orderItems = tradeOrderQueryService.getOrderItemListByOrderId(
@@ -159,10 +159,8 @@ public class TradeOrderController {
 
         // 拼接数据
         MemberUserRespDTO user = memberUserApi.getUser(order.getUserId());
-        MemberUserRespDTO brokerageUser = order.getBrokerageUserId() != null ?
-                memberUserApi.getUser(order.getBrokerageUserId()) : null;
         List<TradeOrderLogDO> orderLogs = tradeOrderLogService.getOrderLogListByOrderId(id);
-        TradeOrderDetailRespVO convert = TradeOrderConvert.INSTANCE.convert(order, orderItems, orderLogs, user, brokerageUser);
+        TradeOrderDetailRespVO convert = TradeOrderConvert.INSTANCE.convert(order, orderItems, orderLogs, user, null);
         convert.setSpuType(tradeOrderQueryService.getSpuType(orderItems));
 
         if(convert.getRefundStatus().equals(TradeOrderRefundStatusEnum.ALL.getStatus())){
@@ -280,25 +278,6 @@ public class TradeOrderController {
         return success(true);
     }
 
-    @PutMapping("/pick-up-by-verify-code")
-    @Operation(summary = "订单核销")
-    @Parameter(name = "pickUpVerifyCode", description = "自提核销码")
-    @PreAuthorize("@ss.hasPermission('trade:order:pick-up')")
-    public CommonResult<Boolean> pickUpOrderByVerifyCode(@RequestParam("pickUpVerifyCode") String pickUpVerifyCode) {
-        tradeOrderUpdateService.pickUpOrderByAdmin(pickUpVerifyCode);
-        return success(true);
-    }
-
-    @GetMapping("/get-by-pick-up-verify-code")
-    @Operation(summary = "查询核销码对应的订单")
-    @Parameter(name = "pickUpVerifyCode", description = "自提核销码")
-    @PreAuthorize("@ss.hasPermission('trade:order:query')")
-    public CommonResult<TradeOrderDetailRespVO> getByPickUpVerifyCode(@RequestParam("pickUpVerifyCode") String pickUpVerifyCode) {
-        TradeOrderDO tradeOrder = tradeOrderUpdateService.getByPickUpVerifyCode(pickUpVerifyCode);
-        return success(TradeOrderConvert.INSTANCE.convert2(tradeOrder, null));
-    }
-
-
     @GetMapping("/get-count")
     @Operation(summary = "获得交易订单数量")
     public CommonResult<Map<Integer, Long>> getOrderCount(TradeOrderPageReqVO reqVO) {

+ 2 - 5
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/TradeOrderDetailController.java

@@ -77,10 +77,8 @@ public class TradeOrderDetailController {
 
         // 拼接数据
         MemberUserRespDTO user = memberUserApi.getUser(order.getUserId());
-        MemberUserRespDTO brokerageUser = order.getBrokerageUserId() != null ?
-                memberUserApi.getUser(order.getBrokerageUserId()) : null;
         List<TradeOrderLogDO> orderLogs = tradeOrderLogService.getOrderLogListByOrderId(id);
-        return success(TradeOrderConvert.INSTANCE.convert(order, orderItems, orderLogs, user, brokerageUser));
+        return success(TradeOrderConvert.INSTANCE.convert(order, orderItems, orderLogs, user, null));
     }
 
     @GetMapping("/after_sale")
@@ -150,9 +148,8 @@ public class TradeOrderDetailController {
         PayOrderDO payOrderDO = payOrderService.getOrderByTradeOrderId(id);
         TradeOrderPayVo build = TradeOrderPayVo.builder()
                 .userRemark(order.getUserRemark())
-                .payChannelCode(order.getPayChannelCode())
                 .path("")
-                .payPrice(order.getPayPrice())
+                .payPrice(order.getPayIntegral().intValue())
                 .build();
         if (payOrderDO == null) {
             build.setPayStatus("未支付");

+ 4 - 44
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderBaseVO.java

@@ -58,44 +58,26 @@ public class TradeOrderBaseVO {
 
     // ========== 价格 + 支付基本信息 ==========
 
-    @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
-    private Long payOrderId;
-
     @Schema(description = "是否已支付", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
     private Boolean payStatus;
 
     @Schema(description = "付款时间")
     private LocalDateTime payTime;
 
-    @Schema(description = "支付渠道", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx_lite")
-    private String payChannelCode;
-
     @Schema(description = "商品原价(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
     private Integer totalPrice;
 
-    @Schema(description = "订单优惠(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
-    private Integer discountPrice;
-
     @Schema(description = "运费金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
     private Integer deliveryPrice;
 
-    @Schema(description = "订单调价(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
-    private Integer adjustPrice;
-
-    @Schema(description = "应付金额(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
-    private Integer payPrice;
+    @Schema(description = "应付积分(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
+    private Long payIntegral;
 
     // ========== 收件 + 物流基本信息 ==========
 
     @Schema(description = "配送方式", example = "10")
     private Integer deliveryType;
 
-    @Schema(description = "自提门店", example = "10")
-    private Long pickUpStoreId;
-
-    @Schema(description = "自提核销码", example = "10")
-    private Long pickUpVerifyCode;
-
     @Schema(description = "配送模板编号", example = "1024")
     private Long deliveryTemplateId;
 
@@ -131,23 +113,6 @@ public class TradeOrderBaseVO {
     @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
     private Integer refundPrice;
 
-    // ========== 营销基本信息 ==========
-
-    @Schema(description = "优惠劵编号", example = "1024")
-    private Long couponId;
-
-    @Schema(description = "优惠劵减免金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
-    private Integer couponPrice;
-
-    @Schema(description = "积分抵扣的金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
-    private Integer pointPrice;
-
-    @Schema(description = "VIP 减免金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "888")
-    private Integer vipPrice;
-
-    @Schema(description = "推广人编号", example = "1")
-    private Long brokerageUserId;
-
     @Schema(description = "店铺id", example = "20588")
     private Long shopId;
 
@@ -157,12 +122,7 @@ public class TradeOrderBaseVO {
     @Schema(description = "售后状态", example = "0")
     private Integer refundStatus;
 
-    @Schema(description = "支付积分")
-    private Long payIntegral;
-
-    @Schema(description = "支付的消费分")
-    private Long payConsumptionPoints;
+    @Schema(description = "积分类型")
+    private Integer integralType;
 
-    @Schema(description = "退回的消费分")
-    private Long refundConsumption;
 }

+ 0 - 40
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderDetailRespVO.java

@@ -26,46 +26,6 @@ public class TradeOrderDetailRespVO extends TradeOrderBaseVO {
      */
     private MemberUserRespVO brokerageUser;
 
-
-
-
-    /* *
-
-    *//**
-     * 订单图片- 商品图片
-     *//*
-    private String goodUrl;
-    *//**
-     * 配送类型
-     *//*
-    private String  deliveryType;
-    *//**
-     * 运费
-     *//*
-    private String  deliveryPrice;
-    *//**
-     * 发货公司
-     *//*
-    private String logisticsName;
-
-
-    *//**
-     * 售后信息
-     *//*
-    private AfterSaleBaseVO afterSaleBaseVO;
-
-    *//**
-     * 评价信息
-     *//*
-    private ProductCommentCreateReqDTO productCommentCreateReqDTO;
-
-    *//**
-     * 物流信息
-     *//*
-
-
-
-
     /**
      * 操作日志列表
      */

+ 1 - 4
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderItemBaseVO.java

@@ -43,11 +43,8 @@ public class TradeOrderItemBaseVO {
     @Schema(description = "商品原价(单)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
     private Integer price;
 
-    @Schema(description = "商品优惠(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
-    private Integer discountPrice;
-
     @Schema(description = "商品实付金额(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
-    private Integer payPrice;
+    private Integer payIntegral;
 
     @Schema(description = "子订单分摊金额(总)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
     private Integer orderPartPrice;

+ 0 - 3
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/admin/order/vo/TradeOrderPageItemRespVO.java

@@ -20,9 +20,6 @@ public class TradeOrderPageItemRespVO extends TradeOrderBaseVO {
     @Schema(description = "用户信息", requiredMode = Schema.RequiredMode.REQUIRED)
     private MemberUserRespVO user;
 
-    @Schema(description = "推广人信息")
-    private MemberUserRespVO brokerageUser;
-
     @Schema(description = "管理后台 - 交易订单的分页项的订单项目")
     @Data
     public static class Item extends TradeOrderItemBaseVO {

+ 0 - 8
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/controller/app/order/AppTradeOrderController.java

@@ -61,14 +61,6 @@ public class AppTradeOrderController {
         return success(tradeOrderUpdateService.settlementOrder(getLoginUserId(), settlementReqVO));
     }
 
-    @PostMapping("/create")
-    @Operation(summary = "创建订单")
-    @PreAuthenticated
-    public CommonResult<AppTradeOrderCreateRespVO> createOrder(@Valid @RequestBody AppTradeOrderCreateReqVO createReqVO) {
-        TradeOrderDO order = tradeOrderUpdateService.createOrder(getLoginUserId(), createReqVO);
-        return success(new AppTradeOrderCreateRespVO().setId(order.getId()).setPayOrderId(order.getPayOrderId()));
-    }
-
     @PostMapping("/update-paid")
     @Operation(summary = "更新订单为已支付") // 由 pay-module 支付服务,进行回调,可见 PayNotifyJob
     public CommonResult<Boolean> updateOrderPaid(@RequestBody PayOrderNotifyReqDTO notifyReqDTO) {

+ 0 - 1
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/aftersale/AfterSaleConvert.java

@@ -44,7 +44,6 @@ public interface AfterSaleConvert {
             @Mapping(source = "afterSale.orderId", target = "merchantOrderId"),
             @Mapping(source = "afterSale.id", target = "merchantRefundId"),
             @Mapping(source = "afterSale.applyReason", target = "reason"),
-            @Mapping(source = "afterSale.refundPrice", target = "price")
     })
     PayRefundCreateReqDTO convert(String userIp, AfterSaleDO afterSale,
                                   TradeOrderProperties orderProperties);

+ 2 - 4
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/brokerage/BrokerageRecordConvert.java

@@ -1,6 +1,5 @@
 package cn.newfeifan.mall.module.trade.convert.brokerage;
 
-import cn.hutool.core.math.Money;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
@@ -9,7 +8,6 @@ import cn.newfeifan.mall.module.member.api.user.dto.MemberUserRespDTO;
 import cn.newfeifan.mall.module.trade.controller.admin.brokerage.vo.record.BrokerageRecordPageReqVO;
 import cn.newfeifan.mall.module.trade.controller.admin.brokerage.vo.record.BrokerageRecordRespVO;
 import cn.newfeifan.mall.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordPageReqVO;
-import cn.newfeifan.mall.module.trade.controller.app.brokerage.vo.record.AppBrokerageRecordRespVO;
 import cn.newfeifan.mall.module.trade.controller.app.brokerage.vo.user.AppBrokerageUserRankByPriceRespVO;
 import cn.newfeifan.mall.module.trade.dal.dataobject.brokerage.BrokerageRecordDO;
 import cn.newfeifan.mall.module.trade.dal.dataobject.brokerage.BrokerageUserDO;
@@ -61,9 +59,9 @@ public interface BrokerageRecordConvert {
         PageResult<BrokerageRecordRespVO> result = convertPage(pageResult);
         for (BrokerageRecordRespVO respVO : result.getList()) {
             Optional.ofNullable(userMap.get(respVO.getUserId())).ifPresent(user ->
-                    respVO.setUserNickname(user.getNickname()).setUserAvatar(user.getAvatar()));
+                    respVO.setUserNickname(user.getUsername()).setUserAvatar(user.getAvatar()));
             Optional.ofNullable(userMap.get(respVO.getSourceUserId())).ifPresent(user ->
-                    respVO.setSourceUserNickname(user.getNickname()).setSourceUserAvatar(user.getAvatar()));
+                    respVO.setSourceUserNickname(user.getUsername()).setSourceUserAvatar(user.getAvatar()));
         }
         return result;
     }

+ 2 - 2
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/brokerage/BrokerageUserConvert.java

@@ -60,7 +60,7 @@ public interface BrokerageUserConvert {
 
     default BrokerageUserRespVO copyTo(MemberUserRespDTO source, BrokerageUserRespVO target) {
         Optional.ofNullable(source).ifPresent(
-                user -> target.setNickname(user.getNickname()).setAvatar(user.getAvatar()));
+                user -> target.setNickname(user.getUsername()).setAvatar(user.getAvatar()));
         return target;
     }
 
@@ -90,7 +90,7 @@ public interface BrokerageUserConvert {
     default void copyTo(List<AppBrokerageUserChildSummaryRespVO> list, Map<Long, MemberUserRespDTO> userMap) {
         for (AppBrokerageUserChildSummaryRespVO vo : list) {
             Optional.ofNullable(userMap.get(vo.getId())).ifPresent(user ->
-                    vo.setNickname(user.getNickname()).setAvatar(user.getAvatar()));
+                    vo.setNickname(user.getUsername()).setAvatar(user.getAvatar()));
         }
     }
 }

+ 1 - 1
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/brokerage/BrokerageWithdrawConvert.java

@@ -38,7 +38,7 @@ public interface BrokerageWithdrawConvert {
     default PageResult<BrokerageWithdrawRespVO> convertPage(PageResult<BrokerageWithdrawDO> pageResult, Map<Long, MemberUserRespDTO> userMap) {
         PageResult<BrokerageWithdrawRespVO> result = convertPage(pageResult);
         for (BrokerageWithdrawRespVO vo : result.getList()) {
-            vo.setUserNickname(Optional.ofNullable(userMap.get(vo.getUserId())).map(MemberUserRespDTO::getNickname).orElse(null));
+            vo.setUserNickname(Optional.ofNullable(userMap.get(vo.getUserId())).map(MemberUserRespDTO::getUsername).orElse(null));
         }
         return result;
     }

+ 4 - 19
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/convert/order/TradeOrderConvert.java

@@ -6,12 +6,10 @@ import cn.newfeifan.mall.framework.common.pojo.PageResult;
 import cn.newfeifan.mall.framework.common.util.collection.CollectionUtils;
 import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
 import cn.newfeifan.mall.framework.common.util.string.StrUtils;
-import cn.newfeifan.mall.framework.dict.core.util.DictFrameworkUtils;
 import cn.newfeifan.mall.framework.ip.core.utils.AreaUtils;
 import cn.newfeifan.mall.module.member.api.address.dto.MemberAddressRespDTO;
 import cn.newfeifan.mall.module.member.api.user.dto.MemberUserRespDTO;
 import cn.newfeifan.mall.module.pay.api.order.dto.PayOrderCreateReqDTO;
-import cn.newfeifan.mall.module.pay.enums.DictTypeConstants;
 import cn.newfeifan.mall.module.product.api.comment.dto.ProductCommentCreateReqDTO;
 import cn.newfeifan.mall.module.product.api.property.dto.ProductPropertyValueDetailRespDTO;
 import cn.newfeifan.mall.module.product.api.sku.dto.ProductSkuRespDTO;
@@ -63,16 +61,10 @@ public interface TradeOrderConvert {
     @Mappings({
             @Mapping(target = "id", ignore = true),
             @Mapping(source = "userId", target = "userId"),
-            @Mapping(source = "createReqVO.couponId", target = "couponId"),
             @Mapping(target = "remark", ignore = true),
             @Mapping(source = "createReqVO.remark", target = "userRemark"),
             @Mapping(source = "calculateRespBO.price.totalPrice", target = "totalPrice"),
-            @Mapping(source = "calculateRespBO.price.discountPrice", target = "discountPrice"),
             @Mapping(source = "calculateRespBO.price.deliveryPrice", target = "deliveryPrice"),
-            @Mapping(source = "calculateRespBO.price.couponPrice", target = "couponPrice"),
-            @Mapping(source = "calculateRespBO.price.pointPrice", target = "pointPrice"),
-            @Mapping(source = "calculateRespBO.price.vipPrice", target = "vipPrice"),
-            @Mapping(source = "calculateRespBO.price.payPrice", target = "payPrice")
     })
     TradeOrderDO convert(Long userId, AppTradeOrderCreateReqVO createReqVO, TradePriceCalculateRespBO calculateRespBO);
 
@@ -114,7 +106,7 @@ public interface TradeOrderConvert {
         createReqDTO.setSubject(subject);
         createReqDTO.setBody(subject); // TODO 非繁人:临时写死
         // 订单相关字段
-        createReqDTO.setPrice(order.getPayPrice()).setExpireTime(addTime(orderProperties.getPayExpireTime()));
+        createReqDTO.setPrice(order.getPayIntegral().intValue()).setExpireTime(addTime(orderProperties.getPayExpireTime()));
         return createReqDTO;
     }
 
@@ -130,8 +122,6 @@ public interface TradeOrderConvert {
             orderVO.setReceiverAreaName(AreaUtils.format(order.getReceiverAreaId()));
             // 增加用户信息
             orderVO.setUser(convertUser(memberUserMap.get(orderVO.getUserId())));
-            // 增加推广人信息
-            orderVO.setBrokerageUser(convertUser(memberUserMap.get(orderVO.getBrokerageUserId())));
             return orderVO;
         });
         return new PageResult<>(orderVOs, pageResult.getTotal());
@@ -185,9 +175,7 @@ public interface TradeOrderConvert {
                                                 DeliveryExpressDO express) {
         AppTradeOrderDetailRespVO orderVO = convert3(order, orderItems);
         orderVO.setPayExpireTime(addTime(tradeOrderProperties.getPayExpireTime()));
-        if (StrUtil.isNotEmpty(order.getPayChannelCode())) {
-            orderVO.setPayChannelName(DictFrameworkUtils.getDictDataLabel(DictTypeConstants.CHANNEL_CODE, order.getPayChannelCode()));
-        }
+
         // 处理收货地址
         orderVO.setReceiverAreaName(AreaUtils.format(order.getReceiverAreaId()));
         if (express != null) {
@@ -269,8 +257,8 @@ public interface TradeOrderConvert {
     default BrokerageAddReqBO convert(MemberUserRespDTO user, TradeOrderItemDO item,
                                       ProductSpuRespDTO spu, ProductSkuRespDTO sku) {
         BrokerageAddReqBO bo = new BrokerageAddReqBO().setBizId(String.valueOf(item.getId())).setSourceUserId(item.getUserId())
-                .setBasePrice(item.getPayPrice() * item.getCount())
-                .setTitle(StrUtil.format("{}成功购买{}", user.getNickname(), item.getSpuName()))
+                .setBasePrice(item.getPayIntegral().intValue() * item.getCount())
+                .setTitle(StrUtil.format("{}成功购买{}", user.getUsername(), item.getSpuName()))
                 .setFirstFixedPrice(0).setSecondFixedPrice(0);
         if (BooleanUtil.isTrue(spu.getSubCommissionType())) {
             bo.setFirstFixedPrice(sku.getFirstBrokeragePrice()).setSecondFixedPrice(sku.getSecondBrokeragePrice());
@@ -282,14 +270,11 @@ public interface TradeOrderConvert {
     List<TradeOrderRespDTO> convertList04(List<TradeOrderDO> list);
 
     @Mappings({
-            @Mapping(target = "activityId", source = "order.combinationActivityId"),
             @Mapping(target = "spuId", source = "item.spuId"),
             @Mapping(target = "skuId", source = "item.skuId"),
             @Mapping(target = "count", source = "item.count"),
             @Mapping(target = "orderId", source = "order.id"),
             @Mapping(target = "userId", source = "order.userId"),
-            @Mapping(target = "headId", source = "order.combinationHeadId"),
-            @Mapping(target = "combinationPrice", source = "item.payPrice"),
     })
     CombinationRecordCreateReqDTO convert(TradeOrderDO order, TradeOrderItemDO item);
 

+ 5 - 13
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/dataobject/aftersale/AfterSaleDO.java

@@ -140,15 +140,6 @@ public class AfterSaleDO extends BaseDO {
     private String auditReason;
 
     // ========== 退款相关 ==========
-    /**
-     * 退款金额,单位:分。
-     */
-    private Integer refundPrice;
-    /**
-     * 支付退款编号
-     * 对接 pay-module-biz 支付服务的退款订单编号,即 PayRefundDO 的 id 编号
-     */
-    private Long payRefundId;
     /**
      * 退款时间
      */
@@ -190,13 +181,14 @@ public class AfterSaleDO extends BaseDO {
     private Long merchantId;
 
     /**
-     * 退还的使用的消费分
+     * 退款积分类型
      */
-    private Long refundConsumptionPoints;
+    private Integer refundIntegralType;
+
     /**
-     * 退款总金额,单位:
+     * 退款总
      */
-    private Long refundPriceTotal;
+    private Long refundIntegralTotal;
     /**
      * 退还的使用的积分
      */

+ 4 - 152
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/dataobject/order/TradeOrderDO.java

@@ -70,6 +70,10 @@ public class TradeOrderDO extends BaseDO {
      * 用户 IP
      */
     private String userIp;
+    /**
+     * 使用积分类型
+     */
+    private Integer integralType;
     /**
      * 用户备注
      */
@@ -110,25 +114,12 @@ public class TradeOrderDO extends BaseDO {
      */
     private Boolean commentStatus;
 
-    /**
-     * 推广人编号
-     * <p>
-     * 关联 {@link BrokerageUserDO#getId()} 字段,即 {@link MemberUserRespDTO#getId()} 字段
-     */
-    private Long brokerageUserId;
-
     // ========== 价格 + 支付基本信息 ==========
 
     // 价格文档 - 淘宝:https://open.taobao.com/docV3.htm?docId=108471&docType=1
     // 价格文档 - 京东到家:https://openo2o.jddj.com/api/getApiDetail/182/4d1494c5e7ac4679bfdaaed950c5bc7f.htm
     // 价格文档 - 有赞:https://doc.youzanyun.com/detail/API/0/906
 
-    /**
-     * 支付订单编号
-     * <p>
-     * 对接 pay-module-biz 支付服务的支付订单编号,即 PayOrderDO 的 id 编号
-     */
-    private Long payOrderId;
     /**
      * 是否已支付
      * <p>
@@ -140,12 +131,6 @@ public class TradeOrderDO extends BaseDO {
      * 付款时间
      */
     private LocalDateTime payTime;
-    /**
-     * 支付渠道
-     * <p>
-     * 对应 PayChannelEnum 枚举
-     */
-    private String payChannelCode;
 
     /**
      * 商品原价,单位:分
@@ -155,34 +140,10 @@ public class TradeOrderDO extends BaseDO {
      * 对应 taobao 的 trade.total_fee 字段
      */
     private Integer totalPrice;
-    /**
-     * 优惠金额,单位:分
-     * <p>
-     * 对应 taobao 的 order.discount_fee 字段
-     */
-    private Integer discountPrice;
     /**
      * 运费金额,单位:分
      */
     private Integer deliveryPrice;
-    /**
-     * 订单调价,单位:分
-     * <p>
-     * 正数,加价;负数,减价
-     */
-    private Integer adjustPrice;
-    /**
-     * 应付金额(总),单位:分
-     * <p>
-     * = {@link #totalPrice}
-     * - {@link #couponPrice}
-     * - {@link #pointPrice}
-     * - {@link #discountPrice}
-     * + {@link #deliveryPrice}
-     * + {@link #adjustPrice}
-     * - {@link #vipPrice}
-     */
-    private Integer payPrice;
 
     // ========== 收件 + 物流基本信息 ==========
     /**
@@ -231,17 +192,6 @@ public class TradeOrderDO extends BaseDO {
      */
     private String receiverDetailAddress;
 
-    /**
-     * 自提门店编号
-     * <p>
-     * 关联 {@link DeliveryPickUpStoreDO#getId()}
-     */
-    private Long pickUpStoreId;
-    /**
-     * 自提核销码
-     */
-    private String pickUpVerifyCode;
-
     // ========== 售后基本信息 ==========
     /**
      * 售后状态
@@ -249,88 +199,6 @@ public class TradeOrderDO extends BaseDO {
      * 枚举 {@link TradeOrderRefundStatusEnum}
      */
     private Integer refundStatus;
-    /**
-     * 退款金额,单位:分
-     * <p>
-     * 注意,退款并不会影响 {@link #payPrice} 实际支付金额
-     * 也就说,一个订单最终产生多少金额的收入 = payPrice - refundPrice
-     */
-    private Integer refundPrice;
-
-    // ========== 营销基本信息 ==========
-    /**
-     * 优惠劵编号
-     */
-    private Long couponId;
-    /**
-     * 优惠劵减免金额,单位:分
-     * <p>
-     * 对应 taobao 的 trade.coupon_fee 字段
-     */
-    private Integer couponPrice;
-    /**
-     * 使用的积分
-     */
-    private Integer usePoint;
-    /**
-     * 积分抵扣的金额,单位:分
-     * <p>
-     * 对应 taobao 的 trade.point_fee 字段
-     */
-    private Integer pointPrice;
-    /**
-     * 赠送的积分
-     */
-    private Integer givePoint;
-    /**
-     * 退还的使用的积分
-     */
-    private Integer refundPoint;
-    /**
-     * VIP 减免金额,单位:分
-     */
-    private Integer vipPrice;
-
-    /**
-     * 秒杀活动编号
-     * <p>
-     * 关联 SeckillActivityDO 的 id 字段
-     */
-    private Long seckillActivityId;
-
-    /**
-     * 砍价活动编号
-     * <p>
-     * 关联 BargainActivityDO 的 id 字段
-     */
-    private Long bargainActivityId;
-    /**
-     * 砍价记录编号
-     * <p>
-     * 关联 BargainRecordDO 的 id 字段
-     */
-    private Long bargainRecordId;
-
-    /**
-     * 拼团活动编号
-     * <p>
-     * 关联 CombinationActivityDO 的 id 字段
-     */
-    private Long combinationActivityId;
-    /**
-     * 拼团团长编号
-     * <p>
-     * 关联 CombinationRecordDO 的 headId 字段
-     */
-    private Long combinationHeadId;
-    /**
-     * 拼团记录编号
-     * <p>
-     * 关联 CombinationRecordDO 的 id 字段
-     */
-    private Long combinationRecordId;
-
-
     /**
      * 店铺id
      */
@@ -344,18 +212,10 @@ public class TradeOrderDO extends BaseDO {
      * 支付积分
      */
     private Long payIntegral;
-    /**
-     * 用户获得积分
-     */
-    private Long increaseIntegral;
     /**
      * 退还的使用的积分
      */
     private Long refundIntegral;
-    /**
-     * 实付人民币,单位:分
-     */
-    private Integer payRmb;
 
     /**
      * 订阅物流信息,未订阅是0,已订阅是1
@@ -375,12 +235,4 @@ public class TradeOrderDO extends BaseDO {
      */
     private String attachment;
 
-    /**
-     * 支付消费分
-     */
-    private Long payConsumptionPoints;
-    /**
-     * 退还的使用的消费分
-     */
-    private Long refundConsumption;
 }

+ 0 - 62
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/dataobject/order/TradeOrderItemDO.java

@@ -40,10 +40,6 @@ public class TradeOrderItemDO extends BaseDO {
      * 退还积分
      */
     private Long refundIntegral;
-    /**
-     * 用户付款后,获得的冻结积分
-     */
-    private Long increaseIntegral;
     /**
      * 直推人用户付款后,推荐人用户获得积分
      */
@@ -113,58 +109,10 @@ public class TradeOrderItemDO extends BaseDO {
      * 对应 taobao 的 order.price 字段
      */
     private Integer price;
-    /**
-     * 优惠金额(总),单位:分
-     * 对应 taobao 的 order.discount_fee 字段
-     */
-    private Integer discountPrice;
     /**
      * 运费金额(总),单位:分
      */
     private Integer deliveryPrice;
-    /**
-     * 订单调价(总),单位:分
-     * 正数,加价;负数,减价
-     */
-    private Integer adjustPrice;
-    /**
-     * 应付金额(总),单位:分
-     * = {@link #price} * {@link #count}
-     * - {@link #couponPrice}
-     * - {@link #pointPrice}
-     * - {@link #discountPrice}
-     * + {@link #deliveryPrice}
-     * + {@link #adjustPrice}
-     * - {@link #vipPrice}
-     */
-    private Integer payPrice;
-
-    // ========== 营销基本信息 ==========
-
-    /**
-     * 优惠劵减免金额,单位:分
-     * 对应 taobao 的 trade.coupon_fee 字段
-     */
-    private Integer couponPrice;
-    /**
-     * 积分抵扣的金额,单位:分
-     * 对应 taobao 的 trade.point_fee 字段
-     */
-    private Integer pointPrice;
-    /**
-     * 使用的积分
-     * 目的:用于后续取消或者售后订单时,需要归还赠送
-     */
-    private Integer usePoint;
-    /**
-     * 赠送的积分
-     * 目的:用于后续取消或者售后订单时,需要扣减赠送
-     */
-    private Integer givePoint;
-    /**
-     * VIP 减免金额,单位:分
-     */
-    private Integer vipPrice;
 
     // ========== 售后基本信息 ==========
 
@@ -183,16 +131,6 @@ public class TradeOrderItemDO extends BaseDO {
      */
     private Boolean distributeBenefit;
 
-    private BigDecimal highPrecisionPrice;
-
-    /**
-     * 支付消费分
-     */
-    private Long payConsumptionPoints;
-    /**
-     * 退还的使用的消费分
-     */
-    private Long refundConsumption;
     /**
      * 成本价,单位: 分
      */

+ 0 - 22
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/dal/mysql/order/TradeOrderMapper.java

@@ -43,15 +43,12 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
                 .eqIfPresent(TradeOrderDO::getDeliveryType, reqVO.getDeliveryType())
                 .inIfPresent(TradeOrderDO::getUserId, userIds)
                 .eqIfPresent(TradeOrderDO::getType, reqVO.getType())
-                .eqIfPresent(TradeOrderDO::getPayChannelCode, reqVO.getPayChannelCode())
                 .eqIfPresent(TradeOrderDO::getTerminal, reqVO.getTerminal())
                 .eqIfPresent(TradeOrderDO::getLogisticsId, reqVO.getLogisticsId())
                 .eqIfPresent(TradeOrderDO::getMerchantId, reqVO.getMerchantId())
                 .eqIfPresent(TradeOrderDO::getShopId, reqVO.getShopId())
                 .eqIfPresent(TradeOrderDO::getPayStatus, reqVO.getPayStatus())
-                .inIfPresent(TradeOrderDO::getPickUpStoreId, reqVO.getPickUpStoreIds())
                 .inIfPresent(TradeOrderDO::getId, orderIds)
-                .likeIfPresent(TradeOrderDO::getPickUpVerifyCode, reqVO.getPickUpVerifyCode())
                 .betweenIfPresent(TradeOrderDO::getCreateTime, reqVO.getCreateTime())
                 .orderByDesc(TradeOrderDO::getId);
         if(reqVO.getStatus() != null && reqVO.getStatus().equals(TradeOrderStatusEnum.AFTER_SALE.getStatus())){
@@ -72,18 +69,14 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
         return selectMaps(new MPJLambdaWrapperX<TradeOrderDO>()
                 .selectAs(TradeOrderDO::getRefundStatus, TradeOrderDO::getRefundStatus)  // 售后状态
                 .selectCount(TradeOrderDO::getId, "count") // 售后状态对应的数量
-                .selectSum(TradeOrderDO::getPayPrice, "price")  // 售后状态对应的支付金额
                 .likeIfPresent(TradeOrderDO::getNo, reqVO.getNo())
                 .eqIfPresent(TradeOrderDO::getUserId, reqVO.getUserId())
                 .eqIfPresent(TradeOrderDO::getDeliveryType, reqVO.getDeliveryType())
                 .inIfPresent(TradeOrderDO::getUserId, userIds)
                 .eqIfPresent(TradeOrderDO::getType, reqVO.getType())
                 .eqIfPresent(TradeOrderDO::getStatus, reqVO.getStatus())
-                .eqIfPresent(TradeOrderDO::getPayChannelCode, reqVO.getPayChannelCode())
                 .eqIfPresent(TradeOrderDO::getTerminal, reqVO.getTerminal())
                 .eqIfPresent(TradeOrderDO::getLogisticsId, reqVO.getLogisticsId())
-                .inIfPresent(TradeOrderDO::getPickUpStoreId, reqVO.getPickUpStoreIds())
-                .likeIfPresent(TradeOrderDO::getPickUpVerifyCode, reqVO.getPickUpVerifyCode())
                 .betweenIfPresent(TradeOrderDO::getCreateTime, reqVO.getCreateTime())
                 .groupBy(TradeOrderDO::getRefundStatus)); // 按售后状态分组
     }
@@ -115,11 +108,8 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
                 .eqIfPresent(TradeOrderDO::getUserId, reqVO.getUserId())
                 .eqIfPresent(TradeOrderDO::getDeliveryType, reqVO.getDeliveryType())
                 .eqIfPresent(TradeOrderDO::getType, reqVO.getType())
-                .eqIfPresent(TradeOrderDO::getPayChannelCode, reqVO.getPayChannelCode())
                 .eqIfPresent(TradeOrderDO::getTerminal, reqVO.getTerminal())
                 .eqIfPresent(TradeOrderDO::getLogisticsId, reqVO.getLogisticsId())
-                .inIfPresent(TradeOrderDO::getPickUpStoreId, reqVO.getPickUpStoreIds())
-                .likeIfPresent(TradeOrderDO::getPickUpVerifyCode, reqVO.getPickUpVerifyCode())
                 .betweenIfPresent(TradeOrderDO::getCreateTime, reqVO.getCreateTime())
                 .eqIfPresent(TradeOrderDO::getShopId, shopId)
                 .eqIfPresent(TradeOrderDO::getMerchantId, merId)
@@ -154,21 +144,10 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
                 .eq(TradeOrderDO::getCommentStatus, commentStatus));
     }
 
-    default List<TradeOrderDO> selectListByUserIdAndSeckillActivityId(Long userId, Long seckillActivityId) {
-        return selectList(new LambdaUpdateWrapper<>(TradeOrderDO.class)
-                .eq(TradeOrderDO::getUserId, userId)
-                .eq(TradeOrderDO::getSeckillActivityId, seckillActivityId));
-    }
-
-    default TradeOrderDO selectOneByPickUpVerifyCode(String pickUpVerifyCode) {
-        return selectOne(TradeOrderDO::getPickUpVerifyCode, pickUpVerifyCode);
-    }
-
     default TradeOrderDO selectByUserIdAndCombinationActivityIdAndStatus(Long userId, Long combinationActivityId, Integer status) {
         return selectOne(new LambdaQueryWrapperX<TradeOrderDO>()
                 .eq(TradeOrderDO::getUserId, userId)
                 .eq(TradeOrderDO::getStatus, status)
-                .eq(TradeOrderDO::getCombinationActivityId, combinationActivityId)
         );
     }
 
@@ -200,7 +179,6 @@ public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
                 .likeIfPresent(TradeOrderDO::getNo, reqVO.getNo())
                 .eqIfPresent(TradeOrderDO::getDeliveryType, reqVO.getDeliveryType())
                 .eqIfPresent(TradeOrderDO::getType, reqVO.getType())
-                .eqIfPresent(TradeOrderDO::getPayChannelCode, reqVO.getPayChannelCode())
                 .eqIfPresent(TradeOrderDO::getTerminal, reqVO.getTerminal())
                 .eqIfPresent(TradeOrderDO::getMerchantId, reqVO.getMerchantId())
                 .eqIfPresent(TradeOrderDO::getShopId,reqVO.getShopId())

+ 1 - 1
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/mq/consumer/order/OrderConsumer.java

@@ -17,6 +17,6 @@ public class OrderConsumer {
     @EventListener
     public void onMessage(Long payOrderId) {
         //修改订单状态,并计算权益
-        tradeOrderUpdateService.updateOrderPaid(payOrderId);
+//        tradeOrderUpdateService.updateOrderPaid(payOrderId);
     }
 }

+ 25 - 56
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/aftersale/AfterSaleServiceImpl.java

@@ -16,6 +16,8 @@ import cn.newfeifan.mall.module.distri.dal.dataobject.dailybill.DailyBillDO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.ptdailybill.PtDailyBillDO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.ptprofit.PtProfitDO;
 import cn.newfeifan.mall.module.distri.enums.CaclEnum;
+import cn.newfeifan.mall.module.distri.enums.IntegralEnum;
+import cn.newfeifan.mall.module.distri.enums.IntegralTypeEnum;
 import cn.newfeifan.mall.module.distri.service.dailybill.DailyBillService;
 import cn.newfeifan.mall.module.distri.service.integral.IntegralService;
 import cn.newfeifan.mall.module.distri.service.ptdailybill.PtDailyBillService;
@@ -190,7 +192,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
             throw exception(AFTER_SALE_CREATE_FAIL_ORDER_ITEM_APPLIED);
         }
         // 申请的退款金额,不能超过商品的价格
-        if (createReqVO.getRefundPrice() > orderItem.getPayPrice()) {
+        if (createReqVO.getRefundPrice() > orderItem.getPayIntegral()) {
             throw exception(AFTER_SALE_CREATE_FAIL_REFUND_PRICE_ERROR);
         }
 
@@ -259,12 +261,12 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         AfterSaleLogUtils.setAfterSaleInfo(afterSale.getId(), afterSale.getStatus(), newStatus);
 
         // TODO 发送售后消息
-        if (afterSale.getWay().equals(AfterSaleWayEnum.RETURN_AND_REFUND.getWay())) {
-            // 发送微信消息
-            sentWcChatMessage(afterSale, AfterSaleStatusEnum.SELLER_AGREE.getContent());
-            // 发送极光推送
-            sentJPush(afterSale, AfterSaleStatusEnum.SELLER_AGREE.getContent());
-        }
+//        if (afterSale.getWay().equals(AfterSaleWayEnum.RETURN_AND_REFUND.getWay())) {
+//             发送微信消息
+//            sentWcChatMessage(afterSale, AfterSaleStatusEnum.SELLER_AGREE.getContent());
+//             发送极光推送
+//            sentJPush(afterSale, AfterSaleStatusEnum.SELLER_AGREE.getContent());
+//        }
     }
 
     @Override
@@ -438,7 +440,6 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         Long orderItemId = afterSale.getOrderItemId();
         TradeOrderItemDO tradeOrderItemDO = tradeOrderItemMapper.selectById(orderItemId);
         Long payIntegral = tradeOrderItemDO.getPayIntegral();//支付积分
-        Long payConsumptionPoints = tradeOrderItemDO.getPayConsumptionPoints();// 支付的消费分
 
         //查询该订单是否有对应的日结单
         DailyBillDO dailyBill = dailyBillService.getDailyBill(afterSale.getMerchantId(), afterSale.getShopId(), tradeOrderDO.getCreateTime().toLocalDate());
@@ -459,7 +460,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
             tradeOrderMapper.updateById(tradeOrderDO);
 
             //退回退款订单项,购物者支付的积分
-            integralService.updateUserIntegral(orderUserId, orderUserId, CaclEnum.ORDER_REFUND_INTEGRAL, payIntegral, 0L, tradeOrderId, tradeOrderNum);
+//            integralService.updateUserIntegral(orderUserId, orderUserId, CaclEnum.ORDER_REFUND_INTEGRAL, payIntegral, 0L, tradeOrderId, tradeOrderNum);
 
             if (dailyBill != null) {
                 //有就追加退回积分
@@ -471,52 +472,24 @@ public class AfterSaleServiceImpl implements AfterSaleService {
             }
         }
 
-        //记录退还消费分
-        if (payConsumptionPoints > 0) {
-            TradeOrderItemDO toid = new TradeOrderItemDO();
-            toid.setId(tradeOrderItemDO.getId());
-            toid.setRefundConsumption(payConsumptionPoints);
-            tradeOrderItemMapper.updateById(toid);
-
-            if (tradeOrderDO.getRefundConsumption() != null) {
-                tradeOrderDO.setRefundConsumption(tradeOrderDO.getRefundConsumption() + payConsumptionPoints);
-            } else {
-                tradeOrderDO.setRefundConsumption(payConsumptionPoints);
-            }
-            tradeOrderMapper.updateById(tradeOrderDO);
-
-            //退回退款订单项,购物者支付的消费分
-            integralService.updateUserConsumptionPoints(orderUserId, orderUserId, payConsumptionPoints, tradeOrderId, tradeOrderNum);
-
-            if (dailyBill != null) {
-                //有就追加退回消费分
-                dailyBill.setRefundConsumptionPoints(dailyBill.getRefundConsumptionPoints() + payConsumptionPoints);
-                dailyBill.setReceivedConsumptionPoints(dailyBill.getReceivedConsumptionPoints() - payConsumptionPoints);
-
-                ptDailyBill.setRefundConsumptionPoints(ptDailyBill.getRefundConsumptionPoints() + payConsumptionPoints);
-                ptDailyBill.setReceivedConsumptionPoints(ptDailyBill.getReceivedConsumptionPoints() - payConsumptionPoints);
-            }
-        }
-
-        if (dailyBill != null) {
-            //有就追加退款金额
-            dailyBill.setRefundPrice(dailyBill.getRefundPrice() + afterSale.getRefundPrice());
-            dailyBill.setReceivedPrice(dailyBill.getReceivedPrice() - afterSale.getRefundPrice());
-            dailyBillService.updateDailyBill(BeanUtils.toBean(dailyBill, DailyBillSaveReqVO.class));
-
-            ptDailyBill.setRefundPrice(ptDailyBill.getRefundPrice() + afterSale.getRefundPrice());
-            ptDailyBill.setReceivedPrice(ptDailyBill.getReceivedPrice() - afterSale.getRefundPrice());
-            ptDailyBillService.updatePtDailyBill(BeanUtils.toBean(ptDailyBill, PtDailyBillSaveReqVO.class));
-        }
+//        if (dailyBill != null) {
+//            //有就追加退款金额
+//            dailyBill.setRefundPrice(dailyBill.getRefundPrice() + afterSale.getRefundIntegral());
+//            dailyBill.setReceivedPrice(dailyBill.getReceivedPrice() - afterSale.getRefundIntegral());
+//            dailyBillService.updateDailyBill(BeanUtils.toBean(dailyBill, DailyBillSaveReqVO.class));
+//
+//            ptDailyBill.setRefundPrice(ptDailyBill.getRefundPrice() + afterSale.getRefundIntegral());
+//            ptDailyBill.setReceivedPrice(ptDailyBill.getReceivedPrice() - afterSale.getRefundIntegralTotal());
+//            ptDailyBillService.updatePtDailyBill(BeanUtils.toBean(ptDailyBill, PtDailyBillSaveReqVO.class));
+//        }
 
         //2. 减少退货物品对应的冻结积分
-        Long increaseIntegral = tradeOrderItemDO.getIncreaseIntegral();//消费者自得冻结积分
         Long ancestorIncreaseIntegral = tradeOrderItemDO.getAncestorIncreaseIntegral();//消费者推荐人得冻结积分
         Long freezeHighQuota = tradeOrderItemDO.getFreezeHighQuota();
 
 
         //订单退款,收回消费者获得的冻结积分
-        integralService.updateUserIntegral(orderUserId, orderUserId, CaclEnum.ORDER_REFUND_INTEGRAL_CONSUMER, increaseIntegral * (-1), 0L, tradeOrderId, tradeOrderNum);
+        integralService.updateUserIntegral(orderUserId, orderUserId, IntegralEnum.INTEGRAL_RECIPIENT, 0L * (-1), null,"1", 1,null);
 
         //20240604 推荐人(上级用户ID)
         Long ancesterUserId = tradeOrderMapper.selectAncesterByMemberUserId(orderUserId);
@@ -534,12 +507,8 @@ public class AfterSaleServiceImpl implements AfterSaleService {
 
             ptProfitLogService.addMessage(user.getId(), null, CaclEnum.ORDER_REFUND_INTEGRAL_ANCESTER, ancestorIncreaseIntegral,
                     ptProfitDO.getVisitorEarnings(), null, null, null, tradeOrderId, tradeOrderNum);
-        } else {
-            //订单退款,收回消费者推荐人获得的冻结积分和补回峰值
-            integralService.updateUserIntegralByAmountWithHighQuota(orderUserId, ancesterUserId, CaclEnum.ORDER_REFUND_INTEGRAL_ANCESTER, ancestorIncreaseIntegral, tradeOrderId, tradeOrderNum);
         }
 
-
         // 发起退款单。注意,需要在事务提交后,再进行发起,避免重复发起
         createPayRefund(userIp, afterSale);
 
@@ -558,7 +527,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         sentJPush(afterSale, AfterSaleStatusEnum.COMPLETE.getContent());
 
         // 更新交易订单项的售后状态为【已完成】
-        tradeOrderUpdateService.updateOrderItemWhenAfterSaleSuccess(afterSale.getOrderItemId(), afterSale.getRefundPrice());
+        tradeOrderUpdateService.updateOrderItemWhenAfterSaleSuccess(afterSale.getOrderItemId(), afterSale.getRefundIntegral().intValue());
     }
 
     /**
@@ -573,7 +542,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         params.add(afterSale.getSpuName());
 
         DecimalFormat df = new DecimalFormat("0.00");
-        String formattedPrice = df.format((double) afterSale.getRefundPrice() / 100);
+        String formattedPrice = df.format((double) afterSale.getRefundIntegral() / 100);
 
         params.add("¥ " + formattedPrice);
         params.add(afterStatus);
@@ -595,7 +564,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         String alert = "售后订单号: " + afterSale.getNo();
         alert += "\n商品名称: " + afterSale.getSpuName();
         DecimalFormat df = new DecimalFormat("0.00");
-        String formattedPrice = df.format((double) afterSale.getRefundPrice() / 100);
+        String formattedPrice = df.format((double) afterSale.getRefundIntegral() / 100);
         alert += "\n金额: ¥ " + formattedPrice;
 
         alert += "\n售后状态: " + afterStatus;
@@ -620,7 +589,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
                 .setReason(StrUtil.format("退款【{}】", afterSale.getSpuName()));
         Long payRefundId = payRefundApi.createRefund(createReqDTO);
         // 更新售后单的退款单号
-        tradeAfterSaleMapper.updateById(new AfterSaleDO().setId(afterSale.getId()).setPayRefundId(payRefundId));
+        tradeAfterSaleMapper.updateById(new AfterSaleDO().setId(afterSale.getId()));
 //            }
 //        });
     }

+ 1 - 1
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/brokerage/BrokerageUserServiceImpl.java

@@ -234,7 +234,7 @@ public class BrokerageUserServiceImpl implements BrokerageUserService {
         // 1.2 根据昵称过滤下级用户
         List<MemberUserRespDTO> users = memberUserApi.getUserList(childIds);
         Map<Long, MemberUserRespDTO> userMap = convertMapByFilter(users,
-                user -> StrUtil.contains(user.getNickname(), pageReqVO.getNickname()),
+                user -> StrUtil.contains(user.getUsername(), pageReqVO.getNickname()),
                 MemberUserRespDTO::getId);
         if (CollUtil.isEmpty(userMap)) {
             return PageResult.empty();

+ 0 - 22
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderQueryService.java

@@ -114,17 +114,6 @@ public interface TradeOrderQueryService {
      */
     List<ExpressTrackRespDTO> getExpressTrackList(Long id);
 
-    /**
-     * 【会员】在指定秒杀活动下,用户购买的商品数量
-     *
-     * @param userId     用户编号
-     * @param activityId 活动编号
-     * @return 秒杀商品数量
-     */
-    int getSeckillProductCount(Long userId, Long activityId);
-
-    // =================== Order Item ===================
-
     /**
      * 获得指定用户,指定的交易订单项
      *
@@ -168,17 +157,6 @@ public interface TradeOrderQueryService {
      */
     Long getOrderCount(Integer status, TradeOrderPageReqVO reqVO);
 
-
-    /**
-     * 根据状态获取订单数量, 不通过用户ID信息
-     * @param status 订单状态
-     * @param shopId 店铺ID
-     * @param merId 商户ID
-     * @return
-     */
-    Long getOrderCount(Integer status,Long shopId, Long merId);
-
-
     /**
      * 补充订单编号以及商品图片
      * @param list

+ 0 - 18
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderQueryServiceImpl.java

@@ -207,12 +207,6 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
         return tradeOrderMapper.selectCountByStatus(status, userShopDetails.getShopId(), userShopDetails.getMerId(), reqVO);
     }
 
-    @Override
-    public Long getOrderCount(Integer status, Long shopId, Long merId) {
-//        return tradeOrderMapper.selectCountByStatus(status, shopId, merId);
-        return null;
-    }
-
     @Override
     public List<PayOrderPageItemRespVO> getOrderNoAndPicUrl(List<PayOrderPageItemRespVO> list) {
         for (PayOrderPageItemRespVO payOrderPageItemRespVO : list) {
@@ -357,18 +351,6 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
         return getExpressTrackList(order);
     }
 
-    @Override
-    public int getSeckillProductCount(Long userId, Long activityId) {
-        // 获得订单列表
-        List<TradeOrderDO> orders = tradeOrderMapper.selectListByUserIdAndSeckillActivityId(userId, activityId);
-        orders.removeIf(order -> TradeOrderStatusEnum.isCanceled(order.getStatus())); // 过滤掉【已取消】的订单
-        if (CollUtil.isEmpty(orders)) {
-            return 0;
-        }
-        // 获得订单项列表
-        return tradeOrderItemMapper.selectProductSumByOrderId(convertSet(orders, TradeOrderDO::getId));
-    }
-
     /**
      * 获得订单的物流轨迹
      *

+ 0 - 30
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderUpdateService.java

@@ -122,20 +122,6 @@ public interface TradeOrderUpdateService {
      */
     void pickUpOrderByAdmin(Long id);
 
-    /**
-     * 【管理员】核销订单
-     *
-     * @param pickUpVerifyCode 自提核销码
-     */
-    void pickUpOrderByAdmin(String pickUpVerifyCode);
-
-    /**
-     * 【管理员】根据自提核销码,查询订单
-     *
-     * @param pickUpVerifyCode 自提核销码
-     */
-    TradeOrderDO getByPickUpVerifyCode(String pickUpVerifyCode);
-
     // =================== Order Item ===================
 
     /**
@@ -177,16 +163,6 @@ public interface TradeOrderUpdateService {
      */
     int createOrderItemCommentBySystem();
 
-    /**
-     * 更新拼团相关信息到订单
-     *
-     * @param orderId             订单编号
-     * @param activityId          拼团活动编号
-     * @param combinationRecordId 拼团记录编号
-     * @param headId              团长编号
-     */
-    void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId);
-
     // TODO 非繁人:拼团取消,不调这个接口哈;
     /**
      * 取消支付订单
@@ -198,12 +174,6 @@ public interface TradeOrderUpdateService {
 
     void updateOrderById(TradeOrderDO order);
 
-    /**
-     *  修改订单状态
-     * @param payOrderId 支付订单id
-     */
-    void updateOrderPaid(Long payOrderId);
-
     /**
      * 用户自提
      * @param smsLoginReqVO 验证码信息

+ 19 - 235
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/TradeOrderUpdateServiceImpl.java

@@ -5,9 +5,7 @@ import cn.hutool.core.lang.Assert;
 import cn.hutool.core.map.MapUtil;
 import cn.hutool.core.util.ObjUtil;
 import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.RandomUtil;
 import cn.hutool.extra.spring.SpringUtil;
-import cn.hutool.json.JSONUtil;
 import cn.newfeifan.mall.framework.common.core.KeyValue;
 import cn.newfeifan.mall.framework.common.enums.UserTypeEnum;
 import cn.newfeifan.mall.framework.common.util.json.JsonUtils;
@@ -23,7 +21,6 @@ import cn.newfeifan.mall.module.distri.dal.dataobject.ptprofit.PtProfitDO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.sharepath.SharePathDO;
 import cn.newfeifan.mall.module.distri.dal.mysql.orderpercentage.OrderPercentageMapper;
 import cn.newfeifan.mall.module.distri.enums.CaclEnum;
-import cn.newfeifan.mall.module.distri.enums.ConsumptionEnum;
 import cn.newfeifan.mall.module.distri.enums.SocialStatusEnum;
 import cn.newfeifan.mall.module.distri.service.duser.DuserService;
 import cn.newfeifan.mall.module.distri.service.integral.IntegralService;
@@ -34,7 +31,6 @@ import cn.newfeifan.mall.module.member.api.address.MemberAddressApi;
 import cn.newfeifan.mall.module.member.api.address.dto.MemberAddressRespDTO;
 import cn.newfeifan.mall.module.member.controller.admin.auth.vo.AppAuthSmsLoginReqVO;
 import cn.newfeifan.mall.module.member.convert.auth.AuthConvert;
-import cn.newfeifan.mall.module.member.dal.dataobject.user.MemberUserDO;
 import cn.newfeifan.mall.module.member.service.user.MemberUserService;
 import cn.newfeifan.mall.module.pay.api.order.PayOrderApi;
 import cn.newfeifan.mall.module.pay.api.order.dto.PayOrderCreateReqDTO;
@@ -42,7 +38,6 @@ import cn.newfeifan.mall.module.pay.api.order.dto.PayOrderRespDTO;
 import cn.newfeifan.mall.module.pay.enums.order.PayOrderStatusEnum;
 import cn.newfeifan.mall.module.product.api.comment.ProductCommentApi;
 import cn.newfeifan.mall.module.product.api.comment.dto.ProductCommentCreateReqDTO;
-import cn.newfeifan.mall.module.product.dal.dataobject.sku.ProductSkuDO;
 import cn.newfeifan.mall.module.product.dal.mysql.sku.ProductSkuMapper;
 import cn.newfeifan.mall.module.system.api.sms.SmsCodeApi;
 import cn.newfeifan.mall.module.system.enums.sms.SmsSceneEnum;
@@ -80,7 +75,6 @@ import cn.newfeifan.mall.module.trade.service.price.calculator.TradePriceCalcula
 import cn.newfeifan.mall.module.trade.utils.push.JPushUtils;
 import cn.newfeifan.mall.module.trade.utils.push.pojo.RequestBody;
 import cn.newfeifan.mall.module.trade.utils.wechat.WcChatMessageUtils;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.kuaidi100.sdk.api.Subscribe;
@@ -263,8 +257,8 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         order.setProductCount(getSumValue(calculateRespBO.getItems(), TradePriceCalculateRespBO.OrderItem::getCount, Integer::sum));
         order.setUserIp(getClientIP()).setTerminal(getTerminal());
         // 支付 + 退款信息
-        order.setAdjustPrice(0).setPayStatus(false);
-        order.setRefundStatus(TradeOrderRefundStatusEnum.NONE.getStatus()).setRefundPrice(0);
+        order.setPayStatus(false);
+        order.setRefundStatus(TradeOrderRefundStatusEnum.NONE.getStatus());
         // 物流信息
         order.setDeliveryType(createReqVO.getDeliveryType());
         if (Objects.equals(createReqVO.getDeliveryType(), DeliveryTypeEnum.EXPRESS.getType())) {
@@ -274,7 +268,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
                     .setReceiverAreaId(address.getAreaId()).setReceiverDetailAddress(address.getDetailAddress());
         } else if (Objects.equals(createReqVO.getDeliveryType(), DeliveryTypeEnum.PICK_UP.getType())) {
             order.setReceiverName(createReqVO.getReceiverName()).setReceiverMobile(createReqVO.getReceiverMobile());
-            order.setPickUpVerifyCode(RandomUtil.randomNumbers(8)); // 随机一个核销码,长度为 8 位
         }
         return order;
     }
@@ -320,8 +313,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         Long payOrderId = payOrderApi.createOrder(payOrderCreateReqDTO);
 
         // 更新到交易单上
-        tradeOrderMapper.updateById(new TradeOrderDO().setId(order.getId()).setPayOrderId(payOrderId));
-        order.setPayOrderId(payOrderId);
+        tradeOrderMapper.updateById(new TradeOrderDO().setId(order.getId()));
     }
 
     @Override
@@ -336,7 +328,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         // 2. 更新 TradeOrderDO 状态为已支付,等待发货
         int updateCount = tradeOrderMapper.updateByIdAndStatus(id, order.getStatus(),
                 new TradeOrderDO().setStatus(TradeOrderStatusEnum.UNDELIVERED.getStatus()).setPayStatus(true)
-                        .setPayTime(LocalDateTime.now()).setPayChannelCode(payOrder.getChannelCode()));
+                        .setPayTime(LocalDateTime.now()));
         if (updateCount == 0) {
             throw exception(ORDER_UPDATE_PAID_STATUS_NOT_UNPAID);
         }
@@ -369,12 +361,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
                     id, JsonUtils.toJsonString(order));
             throw exception(ORDER_UPDATE_PAID_STATUS_NOT_UNPAID);
         }
-        // 校验支付订单匹配
-        if (ObjectUtil.notEqual(order.getPayOrderId(), payOrderId)) { // 支付单号
-            log.error("[validateOrderPaid][order({}) 支付单不匹配({}),请进行处理!order 数据是:{}]",
-                    id, payOrderId, JsonUtils.toJsonString(order));
-            throw exception(ORDER_UPDATE_PAID_FAIL_PAY_ORDER_ID_ERROR);
-        }
 
         // 校验支付单是否存在
         PayOrderRespDTO payOrder = payOrderApi.getOrder(payOrderId);
@@ -389,7 +375,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
             throw exception(ORDER_UPDATE_PAID_FAIL_PAY_ORDER_STATUS_NOT_SUCCESS);
         }
         // 校验支付金额一致
-        if (ObjectUtil.notEqual(payOrder.getPrice(), order.getPayPrice())) {
+        if (ObjectUtil.notEqual(payOrder.getPrice(), order.getPayIntegral())) {
             log.error("[validateOrderPaid][order({}) payOrder({}) 支付金额不匹配,请进行处理!order 数据是:{},payOrder 数据是:{}]",
                     id, payOrderId, JsonUtils.toJsonString(order), JsonUtils.toJsonString(payOrder));
             throw exception(ORDER_UPDATE_PAID_FAIL_PAY_PRICE_NOT_MATCH);
@@ -733,9 +719,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
                 if (payIntegral > 0) {
                     integralService.updateUserIntegral(userId, CaclEnum.ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL, payIntegral, tradeOrderId, orderNum);
                 }
-                if (order.getPayConsumptionPoints() > 0) {
-                    integralService.updateUserConsumptionPoints(userId, ConsumptionEnum.ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL, order.getPayConsumptionPoints(), tradeOrderId, orderNum);
-                }
 
                 count++;
             } catch (Throwable e) {
@@ -789,7 +772,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
     @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.ADMIN_CANCEL_AFTER_SALE)
     public void cancelOrderByAfterSale(TradeOrderDO order, Integer refundPrice) {
         // 1. 更新订单
-        if (refundPrice < order.getPayPrice()) {
+        if (refundPrice < order.getPayIntegral()) {
             return;
         }
         tradeOrderMapper.updateById(new TradeOrderDO().setId(order.getId())
@@ -840,19 +823,14 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         if (order.getPayStatus()) {
             throw exception(ORDER_UPDATE_PRICE_FAIL_PAID);
         }
-        // 1.2 校验调价金额是否变化
-        if (order.getAdjustPrice() > 0) {
-            throw exception(ORDER_UPDATE_PRICE_FAIL_ALREADY);
-        }
         // 1.3 支付价格不能为 0
-        int newPayPrice = order.getPayPrice() + order.getAdjustPrice();
+        int newPayPrice = order.getPayIntegral().intValue();
         if (newPayPrice <= 0) {
             throw exception(ORDER_UPDATE_PRICE_FAIL_PRICE_ERROR);
         }
 
         // 2. 更新订单
-        tradeOrderMapper.updateById(new TradeOrderDO().setId(order.getId())
-                .setAdjustPrice(reqVO.getAdjustPrice()).setPayPrice(newPayPrice));
+        tradeOrderMapper.updateById(new TradeOrderDO().setId(order.getId()).setPayIntegral((long) newPayPrice));
 
         // 3. 更新 TradeOrderItem,需要做 adjustPrice 的分摊
         List<TradeOrderItemDO> orderOrderItems = tradeOrderItemMapper.selectListByOrderId(order.getId());
@@ -860,17 +838,14 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         List<TradeOrderItemDO> updateItems = new ArrayList<>();
         for (int i = 0; i < orderOrderItems.size(); i++) {
             TradeOrderItemDO item = orderOrderItems.get(i);
-            updateItems.add(new TradeOrderItemDO().setId(item.getId()).setAdjustPrice(dividePrices.get(i))
-                    .setPayPrice(item.getPayPrice() + dividePrices.get(i)));
+            updateItems.add(new TradeOrderItemDO().setId(item.getId())
+                    .setPayIntegral(item.getPayIntegral() + dividePrices.get(i)));
         }
         tradeOrderItemMapper.updateBatch(updateItems);
 
-        // 4. 更新支付订单
-        payOrderApi.updatePayOrderPrice(order.getPayOrderId(), newPayPrice);
-
         // 5. 记录订单日志
         TradeOrderLogUtils.setOrderInfo(order.getId(), order.getStatus(), order.getStatus(),
-                MapUtil.<String, Object>builder().put("oldPayPrice", MoneyUtils.fenToYuanStr(order.getPayPrice()))
+                MapUtil.<String, Object>builder().put("oldPayPrice", MoneyUtils.fenToYuanStr(order.getPayIntegral().intValue()))
                         .put("newPayPrice", MoneyUtils.fenToYuanStr(newPayPrice)).build());
     }
 
@@ -897,17 +872,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         getSelf().pickUpOrder(tradeOrderMapper.selectById(id));
     }
 
-    @Override
-    @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.ADMIN_PICK_UP_RECEIVE)
-    public void pickUpOrderByAdmin(String pickUpVerifyCode) {
-        getSelf().pickUpOrder(tradeOrderMapper.selectOneByPickUpVerifyCode(pickUpVerifyCode));
-    }
-
-    @Override
-    public TradeOrderDO getByPickUpVerifyCode(String pickUpVerifyCode) {
-        return tradeOrderMapper.selectOneByPickUpVerifyCode(pickUpVerifyCode);
-    }
-
     @Transactional(rollbackFor = Exception.class)
     public void pickUpOrder(TradeOrderDO order) {
         if (order == null) {
@@ -940,14 +904,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         tradeOrderHandlers.forEach(handler -> handler.afterCancelOrderItem(order, orderItem));
 
         // 2.1 更新订单的退款金额、积分
-        Integer orderRefundPrice = order.getRefundPrice() + refundPrice;
-        Integer orderRefundPoint = order.getRefundPoint() + orderItem.getUsePoint();
+        Integer orderRefundPrice = order.getPayIntegral().intValue() + refundPrice;
         Integer refundStatus = isAllOrderItemAfterSaleSuccess(order.getId()) ?
                 TradeOrderRefundStatusEnum.ALL.getStatus() // 如果都售后成功,则需要取消订单
                 : TradeOrderRefundStatusEnum.PART.getStatus();
         tradeOrderMapper.updateById(new TradeOrderDO().setId(order.getId())
-                .setRefundStatus(refundStatus)
-                .setRefundPrice(orderRefundPrice).setRefundPoint(orderRefundPoint));
+                .setRefundStatus(refundStatus));
         // 2.2 如果全部退款,则进行取消订单
         getSelf().cancelOrderByAfterSale(order, orderRefundPrice);
     }
@@ -1039,14 +1001,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         return count;
     }
 
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId) {
-        tradeOrderMapper.updateById(
-                new TradeOrderDO().setId(orderId).setCombinationActivityId(activityId)
-                        .setCombinationRecordId(combinationRecordId).setCombinationHeadId(headId));
-    }
-
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void cancelPaidOrder(Long userId, Long orderId) {
@@ -1063,175 +1017,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         tradeOrderMapper.updateById(order);
     }
 
-    @Override
-    @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.MEMBER_PAY)
-    @Transactional(rollbackFor = Exception.class)
-    public void updateOrderPaid(Long payOrderId) {
-        //查询订单提成比例
-        QueryWrapper<OrderPercentageDO> queryWrapper = new QueryWrapper<>();
-        OrderPercentageDO orderPercentageDO = orderPercentageMapper.selectOne(queryWrapper);//表中只有一条记录
-
-        /*
-         * 毛利 = 成本 * 0.38... (推广费用)
-         */
-        String grossProfitPerc = orderPercentageDO.getGrossProfitPerc();
-
-        /*
-         * 购物本人自得 百分比
-         */
-        String grossProfitUserQuotaPerc = orderPercentageDO.getGrossProfitUserQuotaPerc();
-
-        /*
-         * 推荐人(上一级) 百分比
-         */
-        String grossProfitAncestorQuotaPerc = orderPercentageDO.getGrossProfitAncestorQuotaPerc();
-
-        //add by Ben 根据支付订单id,查询所有 支付订单 对应的 订单
-        List<TradeOrderDO> TradeOrderDOList = tradeOrderMapper.selectList("pay_order_id", payOrderId);
-
-        //购物者ID
-        Long memberUserIdOfTradeOrder = TradeOrderDOList.get(0).getUserId();
-        //20240604 推荐人(上级用户ID)
-        Long ancesterUserId = tradeOrderMapper.selectAncesterByMemberUserId(memberUserIdOfTradeOrder);
-
-        // 当前订单用户
-        MemberUserDO user = memberUserService.getUser(memberUserIdOfTradeOrder);
-
-        for (TradeOrderDO tradeOrderDO : TradeOrderDOList) {
-
-            Long tradeOrderId = tradeOrderDO.getId();
-
-//            System.out.println("#########updateOrderPaid####tradeOrderId:"+tradeOrderId);
-
-            // 1. 校验并获得交易订单(可支付)
-            KeyValue<TradeOrderDO, PayOrderRespDTO> orderResult = validateOrderPayable(tradeOrderId, payOrderId);
-
-            TradeOrderDO order = orderResult.getKey();
-            PayOrderRespDTO payOrder = orderResult.getValue();
-
-            // 2. 更新 TradeOrderDO 状态为已支付,等待发货
-            int updateCount = tradeOrderMapper.updateByIdAndStatus(tradeOrderId, order.getStatus(),
-                    new TradeOrderDO().setStatus(TradeOrderStatusEnum.UNDELIVERED.getStatus()).setPayStatus(true)
-                            .setPayTime(LocalDateTime.now()).setPayChannelCode(payOrder.getChannelCode()));
-
-//            System.out.println("#########updateOrderPaid####updateCount:"+updateCount);
-
-            if (updateCount == 0) {
-                throw exception(ORDER_UPDATE_PAID_STATUS_NOT_UNPAID);
-            }
-
-            //注释 by Ben ,下面是系统原来的营销部分,和我们业务对不上,注释掉
-            // 3. 执行 TradeOrderHandler 的后置处理
-//            List<TradeOrderItemDO> orderItems = tradeOrderItemMapper.selectListByOrderId(tradeOrderId);
-
-            //注释 by Ben ,下面是系统原来的营销部分,和我们业务对不上,注释掉
-//            tradeOrderHandlers.forEach(handler -> handler.afterPayOrder(order, orderItems));
-
-            // 4. 记录订单日志
-            TradeOrderLogUtils.setOrderInfo(order.getId(), order.getStatus(), TradeOrderStatusEnum.UNDELIVERED.getStatus());
-            TradeOrderLogUtils.setUserInfo(order.getUserId(), UserTypeEnum.MEMBER.getValue());
-
-
-            // 5. 增加用户冻结积分 20240420
-
-
-            List<Long> skuList = new ArrayList<>();
-            //汇总各订单项利润
-            List<TradeOrderItemDO> TradeOrderItemList = tradeOrderItemMapper.selectList("order_id", order.getId());
-            for (TradeOrderItemDO tradeOrderItemDO : TradeOrderItemList) {
-                Long skuId = tradeOrderItemDO.getSkuId();
-                skuList.add(skuId);
-            }
-
-            List<ProductSkuDO> productSkuDOS = productSkuMapper.selectBatchIds(skuList);
-            Map<Long, ProductSkuDO> skuDOMap = new HashMap<>();
-            for (ProductSkuDO productSkuDO : productSkuDOS) {
-                skuDOMap.put(productSkuDO.getId(), productSkuDO);
-            }
-
-            Long totalFreezeAmount = 0L;//用户总的冻结积分
-
-            Long totalAncestorFreezeAmount = 0L;//推荐人总的冻结积分
-
-            Long totalFreezeHighQuota = 0L;//冻结峰值
-
-            for (TradeOrderItemDO tradeOrderItemDO : TradeOrderItemList) {
-                ProductSkuDO productSkuDO = skuDOMap.get(tradeOrderItemDO.getSkuId());
-                //这类商品的总推广费
-                Integer promotionExpenses = (productSkuDO.getPrice() - productSkuDO.getCostPrice())
-                        * tradeOrderItemDO.getCount();
-
-                //把商品项的推广费,转换为这项商品直推人获得的冻结积分
-                Long itemFreezeAmount =
-                        promotionExpenses2GrossProfitAncestorQuota(promotionExpenses,
-                                grossProfitPerc,//毛利 = 成本 * 0.38... (推广费用)
-                                grossProfitUserQuotaPerc//消费者自得额度 百分比
-                        );
-
-
-                //把商品项的推广费,转换为这项商品推荐人(上级)获得的冻结积分
-                Long ancestorItemFreezeAmount =
-                        promotionExpenses2GrossProfitAncestorQuota(promotionExpenses,
-                                grossProfitPerc,//毛利 = 成本 * 0.38... (推广费用)
-                                grossProfitAncestorQuotaPerc//消费者自得额度 百分比
-                        );
-
-                //峰值为毛利的十倍
-                BigDecimal grossProfit = new BigDecimal(promotionExpenses).multiply(new BigDecimal(grossProfitPerc)).setScale(4, RoundingMode.DOWN);
-                BigDecimal freezeHighQuota = grossProfit.multiply(new BigDecimal("10"));
-                freezeHighQuota = money2Integral(freezeHighQuota);
-                Long freezeHighQuotaInt = freezeHighQuota.longValue();
-
-                totalFreezeAmount += itemFreezeAmount;
-                totalAncestorFreezeAmount += ancestorItemFreezeAmount;
-                totalFreezeHighQuota += freezeHighQuotaInt;
-
-                //记录用户在此订单项获得的冻结积分
-                TradeOrderItemDO toid = new TradeOrderItemDO();
-                toid.setId(tradeOrderItemDO.getId());
-                toid.setIncreaseIntegral(itemFreezeAmount);
-                toid.setAncestorIncreaseIntegral(ancestorItemFreezeAmount);//20240504 add by Ben
-                toid.setFreezeHighQuota(freezeHighQuotaInt);
-                tradeOrderItemMapper.updateById(toid);
-            }
-
-            //把商品的推广费总额,转换为直推人获得的冻结积分
-//            Integer freezeAmount = promotionExpenses2GrossProfitAncestorQuota(orderPercentageMapper,totalPromotionExpenses);
-
-            String OrderNum = order.getNo();
-            //修改购物者本人获得的冻结积分
-            integralService.updateUserIntegral(tradeOrderDO.getUserId(), tradeOrderDO.getUserId(), CaclEnum.ORDER_PAY_INTEGRAL_CONSUMER, 0L, totalFreezeAmount, tradeOrderId, OrderNum);
-
-            // 如果用户不是游客才会分配直推将,否者是计算到游客收益中的
-            if (!user.getVisitor()) {
-                //修改推荐人(上级)获得的冻结积分
-                integralService.updateUserIntegral(tradeOrderDO.getUserId(), ancesterUserId, CaclEnum.ORDER_PAY_INTEGRAL_ANCESTER, 0L, totalAncestorFreezeAmount, tradeOrderId, OrderNum);
-            } else {
-                // 游客收益
-                PtProfitDO ptProfitDO = ptProfitService.getPtProfit();
-
-                ptProfitDO.setVisitorEarnings(ptProfitDO.getVisitorEarnings() + totalAncestorFreezeAmount);
-                ptProfitDO.setPtTotalAdd(ptProfitDO.getPtTotalAdd() + totalAncestorFreezeAmount);
-                ptProfitService.updatePtProfit(cn.newfeifan.mall.framework.common.util.object.BeanUtils.toBean(ptProfitDO, PtProfitSaveReqVO.class));
-
-                // 记录日志
-                ptProfitLogService.addMessage(user.getId(), null, CaclEnum.RECOMMENDED_PERSON_QUOTA, totalAncestorFreezeAmount,
-                        ptProfitDO.getVisitorEarnings(), null, null, JSONUtil.toJsonStr(orderPercentageDO), tradeOrderId, OrderNum);
-            }
-
-            //修改购物者本人获得的冻结峰值
-            integralService.updateIntegralFreezeHighQuota(tradeOrderDO.getUserId(), tradeOrderDO.getUserId(), CaclEnum.ORDER_PAY_FREEZE_HIGH_QUOTA, totalFreezeHighQuota, tradeOrderId, OrderNum);
-            log.warn("[TradeOrderUpdateServiceImpl.updateOrderPaid]$$$:[tradeOrderId({}),ancesterUserId({}),totalAncestorFreezeAmount({})]" + new Date(),
-                    tradeOrderId, ancesterUserId, totalAncestorFreezeAmount);
-
-            // 发送给微信消息给系统用户待发货消息
-//            sentWcChatMessage(order);
-        }
-
-        // 七天获得变为即算即得,后续如果恢复把这里注释即可,并打开平台定时任务得订单结算
-        calc(TradeOrderDOList, orderPercentageDO, JsonUtils.toJsonString(orderPercentageDO));
-    }
-
     @Override
     public void pickUpInAStore(AppAuthSmsLoginReqVO smsLoginReqVO, Long orderId) {
         // 校验验证码
@@ -1284,7 +1069,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
                 BigDecimal productCount = new BigDecimal(j.getCount());
                 BigDecimal oneGrossProfit = onePrice.subtract(oneCostPrice).multiply(productCount);
                 profit[0] = profit[0].add(oneGrossProfit);  // 注意这里的改动
-                profit[1] = profit[1].add(new BigDecimal(j.getIncreaseIntegral()));     //自得积分
                 profit[2] = profit[2].add(new BigDecimal(j.getAncestorIncreaseIntegral()));     //直推奖
                 profit[3] = profit[3].add(new BigDecimal(j.getFreezeHighQuota()));     //用户获得冻结最大可用额度
 
@@ -1308,7 +1092,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
             }
 
             // 用户所得: 毛利 * 0.35
-            BigDecimal descendantQuota = profit[1];
+            BigDecimal descendantQuota = BigDecimal.valueOf(0L);
 
             // 直推奖: 毛利 * 0.3 (上一级)
             BigDecimal ancestorQuota = profit[2];
@@ -1441,7 +1225,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
                     .orderNo(k.getNo())
                     .userId(sharePath.getAncestor())
                     .amount(amount)
-                    .afterAmount(integralDOAncestor.getCurrentQuota())
+                    .afterAmount(integralDOAncestor.getRedCurrentQuota())
                     .freezeAmount(-amount)
                     .afterFreezeAmount(integralDOAncestor.getFreezeQuota())
                     .ancestorQuotaAmount(ptReplenish)
@@ -1459,7 +1243,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
                     .orderNo(k.getNo())
                     .userId(sharePath.getDescendant())
                     .amount(descendantQuotaInt)
-                    .afterAmount(integralDO.getCurrentQuota())
+                    .afterAmount(integralDO.getRedCurrentQuota())
                     .freezeAmount(-descendantQuotaInt)
                     .afterFreezeAmount(integralDO.getFreezeQuota())
                     .maxAvailablePointsAmount(highQuotaInt)
@@ -1525,10 +1309,10 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         integralDO.setFreezeHighQuota(integralDO.getFreezeHighQuota() - highQuota);
         // todo 增加累计额度
 
-        integralDO.setCurrentQuota(integralDO.getCurrentQuota() + descendantQuota);
+        integralDO.setRedCurrentQuota(integralDO.getRedCurrentQuota() + descendantQuota);
         integralDO.setFreezeQuota(integralDO.getFreezeQuota() - descendantQuota);
         // 增加推荐人额度
-        integralDOAncestor.setCurrentQuota(integralDOAncestor.getCurrentQuota() + ancestorQuota);
+        integralDOAncestor.setRedCurrentQuota(integralDOAncestor.getRedCurrentQuota() + ancestorQuota);
         // 减少推荐人的可获取额度
         integralDOAncestor.setHighQuota(integralDOAncestor.getHighQuota() - ancestorQuota);
         integralDOAncestor.setAncestorQuota(integralDOAncestor.getAncestorQuota() + ancestorQuota);
@@ -1536,7 +1320,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
         integralService.updateIntegral(cn.newfeifan.mall.framework.common.util.object.BeanUtils.toBean(integralDOAncestor, IntegralSaveReqVO.class));
 
         // 增加平台额度
-        pt.setCurrentQuota(pt.getCurrentQuota() + ptA + ptB);
+        pt.setRedCurrentQuota(pt.getRedCurrentQuota() + ptA + ptB);
 
         integralService.updateIntegral(cn.newfeifan.mall.framework.common.util.object.BeanUtils.toBean(integralDO, IntegralSaveReqVO.class));
         integralService.updateIntegral(cn.newfeifan.mall.framework.common.util.object.BeanUtils.toBean(pt, IntegralSaveReqVO.class));

+ 0 - 8
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeBargainOrderHandler.java

@@ -32,10 +32,6 @@ public class TradeBargainOrderHandler implements TradeOrderHandler {
         }
         // 明确校验一下
         Assert.isTrue(orderItems.size() == 1, "砍价时,只允许选择一个商品");
-
-        // 扣减砍价活动的库存
-        bargainActivityApi.updateBargainActivityStock(order.getBargainActivityId(),
-                -orderItems.get(0).getCount());
     }
 
     @Override
@@ -46,8 +42,6 @@ public class TradeBargainOrderHandler implements TradeOrderHandler {
         // 明确校验一下
         Assert.isTrue(orderItems.size() == 1, "砍价时,只允许选择一个商品");
 
-        // 记录砍价记录对应的订单编号
-        bargainRecordApi.updateBargainRecordOrderId(order.getBargainRecordId(), order.getId());
     }
 
     @Override
@@ -71,8 +65,6 @@ public class TradeBargainOrderHandler implements TradeOrderHandler {
         if (!TradeOrderTypeEnum.isBargain(order.getType())) {
             return;
         }
-        // 恢复(增加)砍价活动的库存
-        bargainActivityApi.updateBargainActivityStock(order.getBargainActivityId(), orderItem.getCount());
     }
 
 }

+ 0 - 52
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeBrokerageOrderHandler.java

@@ -45,19 +45,10 @@ public class TradeBrokerageOrderHandler implements TradeOrderHandler {
 
     @Override
     public void beforeOrderCreate(TradeOrderDO order, List<TradeOrderItemDO> orderItems) {
-        // 设置订单推广人
-        BrokerageUserDO brokerageUser = brokerageUserService.getBrokerageUser(order.getUserId());
-        if (brokerageUser != null && brokerageUser.getBindUserId() != null) {
-            order.setBrokerageUserId(brokerageUser.getBindUserId());
-        }
     }
 
     @Override
     public void afterPayOrder(TradeOrderDO order, List<TradeOrderItemDO> orderItems) {
-        if (order.getBrokerageUserId() == null) {
-            return;
-        }
-        addBrokerage(order.getUserId(), orderItems);
     }
 
     @Override
@@ -66,53 +57,10 @@ public class TradeBrokerageOrderHandler implements TradeOrderHandler {
         if (!order.getPayStatus()) {
             return;
         }
-        if (order.getBrokerageUserId() == null) {
-            return;
-        }
-
-        // 售后的订单项,已经在 afterCancelOrderItem 回滚库存,所以这里不需要重复回滚
-        orderItems = filterOrderItemListByNoneAfterSale(orderItems);
-        if (CollUtil.isEmpty(orderItems)) {
-            return;
-        }
-        orderItems.forEach(orderItem -> afterCancelOrderItem(order, orderItem));
     }
 
     @Override
     public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) {
-        if (order.getBrokerageUserId() == null) {
-            return;
-        }
-        cancelBrokerage(order.getBrokerageUserId(), orderItem.getOrderId());
-    }
-
-    /**
-     * 创建分销记录
-     * <p>
-     * 目前是支付成功后,就会创建分销记录。
-     * <p>
-     * 业内还有两种做法,可以根据自己的业务调整:
-     * 1. 确认收货后,才创建分销记录
-     * 2. 支付 or 下单成功时,创建分销记录(冻结),确认收货解冻或者 n 天后解冻
-     *
-     * @param userId  用户编号
-     * @param orderItems 订单项
-     */
-    protected void addBrokerage(Long userId, List<TradeOrderItemDO> orderItems) {
-        MemberUserRespDTO user = memberUserApi.getUser(userId);
-        Assert.notNull(user);
-        ProductSpuRespDTO spu = productSpuApi.getSpu(orderItems.get(0).getSpuId());
-        Assert.notNull(spu);
-        ProductSkuRespDTO sku = productSkuApi.getSku(orderItems.get(0).getSkuId());
-
-        // 每一个订单项,都会去生成分销记录
-        List<BrokerageAddReqBO> addList = convertList(orderItems,
-                item -> TradeOrderConvert.INSTANCE.convert(user, item, spu, sku));
-        brokerageRecordService.addBrokerage(userId, BrokerageRecordBizTypeEnum.ORDER, addList);
-    }
-
-    protected void cancelBrokerage(Long userId, Long orderItemId) {
-        brokerageRecordService.cancelBrokerage(userId, BrokerageRecordBizTypeEnum.ORDER, String.valueOf(orderItemId));
     }
 
 }

+ 0 - 17
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeCombinationOrderHandler.java

@@ -42,18 +42,6 @@ public class TradeCombinationOrderHandler implements TradeOrderHandler {
             return;
         }
         Assert.isTrue(orderItems.size() == 1, "拼团时,只允许选择一个商品");
-
-        // 1. 校验是否满足拼团活动相关限制
-        TradeOrderItemDO item = orderItems.get(0);
-        combinationRecordApi.validateCombinationRecord(order.getUserId(), order.getCombinationActivityId(),
-                order.getCombinationHeadId(), item.getSkuId(), item.getCount());
-
-        // 2. 校验该用户是否存在未支付的拼团活动订单,避免一个拼团可以下多个单子了
-        TradeOrderDO activityOrder = orderQueryService.getOrderByUserIdAndStatusAndCombination(
-                order.getUserId(), order.getCombinationActivityId(), TradeOrderStatusEnum.UNPAID.getStatus());
-        if (activityOrder != null) {
-            throw exception(ORDER_CREATE_FAIL_EXIST_UNPAID);
-        }
     }
 
     @Override
@@ -68,11 +56,6 @@ public class TradeCombinationOrderHandler implements TradeOrderHandler {
         TradeOrderItemDO item = orderItems.get(0);
         CombinationRecordCreateRespDTO combinationRecord = combinationRecordApi.createCombinationRecord(
                 TradeOrderConvert.INSTANCE.convert(order, item));
-
-        // 3. 更新拼团相关信息到订单。为什么几个字段都要更新?
-        // 原因是:如果创建订单时自己是团长的情况下 combinationHeadId 是为 null 的,设置团长编号这个操作时在订单是否后创建拼团记录时才设置的。
-        orderUpdateService.updateOrderCombinationInfo(order.getId(), order.getCombinationActivityId(),
-                combinationRecord.getCombinationRecordId(), combinationRecord.getCombinationHeadId());
     }
 
     @Override

+ 2 - 11
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeCouponOrderHandler.java

@@ -22,21 +22,12 @@ public class TradeCouponOrderHandler implements TradeOrderHandler {
 
     @Override
     public void afterOrderCreate(TradeOrderDO order, List<TradeOrderItemDO> orderItems) {
-        if (order.getCouponId() == null || order.getCouponId() <= 0) {
-            return;
-        }
-        // 不在前置扣减的原因,是因为优惠劵要记录使用的订单号
-        couponApi.useCoupon(new CouponUseReqDTO().setId(order.getCouponId()).setUserId(order.getUserId())
-                .setOrderId(order.getId()));
+
     }
 
     @Override
     public void afterCancelOrder(TradeOrderDO order, List<TradeOrderItemDO> orderItems) {
-        if (order.getCouponId() == null || order.getCouponId() <= 0) {
-            return;
-        }
-        // 退回优惠劵
-        couponApi.returnUsedCoupon(order.getCouponId());
+
     }
 
 }

+ 4 - 25
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeMemberPointOrderHandler.java

@@ -35,17 +35,17 @@ public class TradeMemberPointOrderHandler implements TradeOrderHandler {
     @Override
     public void afterOrderCreate(TradeOrderDO order, List<TradeOrderItemDO> orderItems) {
         // 扣减用户积分(订单抵扣)。不在前置扣减的原因,是因为积分扣减时,需要记录关联业务
-        reducePoint(order.getUserId(), order.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE, order.getId());
+        reducePoint(order.getUserId(), null, MemberPointBizTypeEnum.ORDER_USE, order.getId());
     }
 
     @Override
     public void afterPayOrder(TradeOrderDO order, List<TradeOrderItemDO> orderItems) {
         // 增加用户积分(订单赠送)
-        addPoint(order.getUserId(), order.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE,
+        addPoint(order.getUserId(), null, MemberPointBizTypeEnum.ORDER_GIVE,
                 order.getId());
 
         // 增加用户经验
-        memberLevelApi.addExperience(order.getUserId(), order.getPayPrice(),
+        memberLevelApi.addExperience(order.getUserId(), order.getPayIntegral().intValue(),
                 MemberExperienceBizTypeEnum.ORDER_GIVE.getType(), String.valueOf(order.getId()));
     }
 
@@ -57,38 +57,17 @@ public class TradeMemberPointOrderHandler implements TradeOrderHandler {
             return;
         }
 
-        // 增加(回滚)用户积分(订单抵扣)
-        Integer usePoint = getSumValue(orderItems, TradeOrderItemDO::getUsePoint, Integer::sum);
-        addPoint(order.getUserId(), usePoint, MemberPointBizTypeEnum.ORDER_USE_CANCEL,
-                order.getId());
-
         // 如下的返还,需要经过支持,也就是经历 afterPayOrder 流程
         if (!order.getPayStatus()) {
             return;
         }
-        // 扣减(回滚)积分(订单赠送)
-        Integer givePoint = getSumValue(orderItems, TradeOrderItemDO::getGivePoint, Integer::sum);
-        reducePoint(order.getUserId(), givePoint, MemberPointBizTypeEnum.ORDER_GIVE_CANCEL,
-                order.getId());
-        // 扣减(回滚)用户经验
-        int payPrice = order.getPayPrice() - order.getRefundPrice();
-        memberLevelApi.addExperience(order.getUserId(), payPrice,
+        memberLevelApi.addExperience(order.getUserId(), order.getPayIntegral().intValue(),
                 MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL.getType(), String.valueOf(order.getId()));
     }
 
     @Override
     public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) {
-        // 扣减(回滚)积分(订单赠送)
-        reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM,
-                orderItem.getId());
-        // 增加(回滚)积分(订单抵扣)
-        addPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE_CANCEL_ITEM,
-                orderItem.getId());
-
         // 扣减(回滚)用户经验
-        AfterSaleDO afterSale = afterSaleService.getAfterSale(orderItem.getAfterSaleId());
-        memberLevelApi.reduceExperience(order.getUserId(), afterSale.getRefundPrice(),
-                MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL_ITEM.getType(), String.valueOf(orderItem.getId()));
     }
 
     /**

+ 0 - 6
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/order/handler/TradeSeckillOrderHandler.java

@@ -30,9 +30,6 @@ public class TradeSeckillOrderHandler implements TradeOrderHandler {
         // 明确校验一下
         Assert.isTrue(orderItems.size() == 1, "秒杀时,只允许选择一个商品");
 
-        // 扣减秒杀活动的库存
-        seckillActivityApi.updateSeckillStockDecr(order.getSeckillActivityId(),
-                orderItems.get(0).getSkuId(), orderItems.get(0).getCount());
     }
 
     @Override
@@ -56,9 +53,6 @@ public class TradeSeckillOrderHandler implements TradeOrderHandler {
         if (!TradeOrderTypeEnum.isSeckill(order.getType())) {
             return;
         }
-        // 恢复秒杀活动的库存
-        seckillActivityApi.updateSeckillStockIncr(order.getSeckillActivityId(),
-                orderItem.getSkuId(), orderItem.getCount());
     }
 
 }

+ 1 - 1
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/price/calculator/TradePriceCalculatorHelper.java

@@ -254,7 +254,7 @@ public class TradePriceCalculatorHelper {
             TradeOrderItemDO orderItem = items.get(i);
             int partPrice;
             if (i < items.size() - 1) { // 减一的原因,是因为拆分时,如果按照比例,可能会出现.所以最后一个,使用反减
-                partPrice = (int) (price * (1.0D * orderItem.getPayPrice() / total));
+                partPrice = (int) (price * (1.0D * orderItem.getPayIntegral() / total));
                 remainPrice -= partPrice;
             } else {
                 partPrice = remainPrice;

+ 0 - 28
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/service/price/calculator/TradeSeckillActivityPriceCalculator.java

@@ -26,12 +26,6 @@ import static cn.newfeifan.mall.module.trade.enums.ErrorCodeConstants.PRICE_CALC
 @Order(TradePriceCalculator.ORDER_SECKILL_ACTIVITY)
 public class TradeSeckillActivityPriceCalculator implements TradePriceCalculator {
 
-    @Resource
-    private SeckillActivityApi seckillActivityApi;
-
-    @Resource
-    private TradeOrderQueryService tradeOrderQueryService;
-
     @Override
     public void calculate(TradePriceCalculateReqBO param, TradePriceCalculateRespBO result) {
         // 1. 判断订单类型和是否具有秒杀活动编号
@@ -41,31 +35,9 @@ public class TradeSeckillActivityPriceCalculator implements TradePriceCalculator
         Assert.isTrue(param.getItems().size() == 1, "秒杀时,只允许选择一个商品");
         // 2. 校验是否可以参与秒杀
         TradePriceCalculateRespBO.OrderItem orderItem = result.getItems().get(0);
-        SeckillValidateJoinRespDTO seckillActivity = validateJoinSeckill(
-                param.getUserId(), param.getSeckillActivityId(),
-                orderItem.getSkuId(), orderItem.getCount());
 
-        // 3.1 记录优惠明细
-        Integer discountPrice = orderItem.getPayPrice() - seckillActivity.getSeckillPrice() * orderItem.getCount();
-        TradePriceCalculatorHelper.addPromotion(result, orderItem,
-                param.getSeckillActivityId(), seckillActivity.getName(), PromotionTypeEnum.SECKILL_ACTIVITY.getType(),
-                StrUtil.format("秒杀活动:省 {} 元", TradePriceCalculatorHelper.formatPrice(discountPrice)),
-                discountPrice);
         // 3.2 更新 SKU 优惠金额
-        orderItem.setDiscountPrice(orderItem.getDiscountPrice() + discountPrice);
         TradePriceCalculatorHelper.recountPayPrice(orderItem);
         TradePriceCalculatorHelper.recountAllPrice(result);
     }
-
-    private SeckillValidateJoinRespDTO validateJoinSeckill(Long userId, Long activityId, Long skuId, Integer count) {
-        // 1. 校验是否可以参与秒杀
-        SeckillValidateJoinRespDTO seckillActivity = seckillActivityApi.validateJoinSeckill(activityId, skuId, count);
-        // 2. 校验总限购数量,目前只有 trade 有具体下单的数据,需要交给 trade 价格计算使用
-        int seckillProductCount = tradeOrderQueryService.getSeckillProductCount(userId, activityId);
-        if (seckillProductCount + count > seckillActivity.getTotalLimitCount()) {
-            throw exception(PRICE_CALCULATE_SECKILL_TOTAL_LIMIT_COUNT);
-        }
-        return seckillActivity;
-    }
-
 }

+ 1 - 1
feifan-module-mall/feifan-module-trade-biz/src/main/resources/mapper/order/BrokerageUserMapper.xml

@@ -6,7 +6,7 @@
             resultType="cn.newfeifan.mall.module.trade.service.order.TradeOrderCountWithMoney">
         SELECT
             DATE(o.create_time) `date`,
-            SUM(o.pay_rmb) + (SUM(o.pay_integral) / 10000) + (SUM(o.pay_consumption_points) / 10000) money,
+            SUM(o.pay_integral) / 10000 money,
             count(*) count
         FROM
             trade_order o

+ 1 - 1
feifan-module-member/feifan-module-member-api/src/main/java/cn/newfeifan/mall/module/member/api/user/dto/MemberUserRespDTO.java

@@ -24,7 +24,7 @@ public class MemberUserRespDTO {
     /**
      * 用户昵称
      */
-    private String nickname;
+    private String username;
     /**
      * 帐号状态
      *

+ 1 - 1
feifan-module-member/feifan-module-member-biz/src/main/java/cn/newfeifan/mall/module/member/controller/admin/point/vo/recrod/MemberPointRecordRespVO.java

@@ -16,7 +16,7 @@ public class MemberPointRecordRespVO {
     private Long userId;
 
     @Schema(description = "昵称", example = "张三")
-    private String nickname;
+    private String username;
 
     @Schema(description = "业务编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "22706")
     private String bizId;

Some files were not shown because too many files changed in this diff