Quellcode durchsuchen

Merge branch 'dev/2024/0604/update-business-Y' of feifan/mall-backend-business into master

修改计算程序
Yangzw vor 10 Monaten
Ursprung
Commit
fd12ed1062

+ 25 - 21
feifan-module-distri/feifan-module-distri-api/src/main/java/cn/newfeifan/mall/module/distri/enums/CaclEnum.java

@@ -6,27 +6,26 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum CaclEnum {
-    PLATFORM_SERVICE_FEE(1, "平台服务费"),
-    PLATFORM_REVENUE(2, "平台收益"),
-    RECOMMENDED_PERSON_QUOTA(3, "推荐人额度"),
-    DIRECT_REFERRAL_QUOTA(4, "直推人额度"),
-    TOGETHER_AWARD(5, "合赢奖"),
-    HIGH_QUOTA(6, "最高可以获得积分"),
-    SMALL_QUOTA_CRASH(7, "小区额度分配"),
-    AFTER_CRASH_CALC_PT_TOTAL_QUOTA(8, "碰撞后计算平台总收益"),
-    ORDER_PAY_INTEGRAL(9,"购物使用积分进行支付"),      //购物使用积分进行支付
-    ORDER_REFUND_INTEGRAL(10,"退回退款订单项,消费者支付的积分"),//订单已支付,用户退款申请通过,则退回商品项使用的积分
-    ORDER_INTEGRAL_UNFREEZE(11,"订单积分到账"),//购物收货7天后,冻结积分变为可用积分
-    AFTER_CRASH_CALC_PT_TOTAL_GROSS_QUOTA(12, "碰撞后计算平台收益"),
-    FREEZE_CHANGE_INTEGRAL(13, "冻结积分转化成可用积分"),
-    GROSS_PROFIT_BONUS_QUOTA_PERC_EXCEED_MAXIMUM_LIMIT(14, "合赢奖超额"),
-    GROSS_PROFIT_ANCESTOR_QUOTA_PERC_EXCEED_MAXIMUM_LIMIT(15, "直推奖超额"),
-    ORDER_CANCEL_BY_USER_REFUND_INTEGRAL(16,"取消订单,退回积分"),
-    ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL(17,"订单超时未支付,退回积分"),
-    ORDER_PAY_INTEGRAL_ANCESTER(18, "直推人购物,推荐人获得冻结积分"),//购物 上级直推人 获得积分
-    ORDER_REFUND_INTEGRAL_CONSUMER(19,"订单退款,收回消费者获得的冻结积分"),
-    ORDER_REFUND_INTEGRAL_ANCESTER(20,"订单退款,收回消费者的推荐人,获得的冻结积分"),
-    ORDER_PAY_INTEGRAL_CONSUMER(21, "消费者购物,获得冻结积分"),//购物者本人 获得积分
+    PLATFORM_TOTAL_ADD(0, "平台总收益","平台总收益"),
+    PLATFORM_SERVICE_FEE(1, "平台服务费","平台服务费"),
+    PLATFORM_REVENUE(2, "平台收益","平台收益"),
+    RECOMMENDED_PERSON_QUOTA(3, "直推奖获得","直推奖获得"),           //直推奖获得可用积分
+    DIRECT_REFERRAL_QUOTA(4, "购物获得","购物获得可用积分"),       //购物用户自得额度
+    TOGETHER_AWARD(5, "合赢奖","合赢奖"),
+    HIGH_QUOTA(6, "最高可以获得积分","最高可以获得积分"),
+    SMALL_QUOTA_CRASH(7, "合赢奖获得","小区额度分配"),
+    AFTER_CRASH_CALC_PT_TOTAL_QUOTA(8, "碰撞后计算平台总收益","碰撞后计算平台总收益"),
+    ORDER_PAY_INTEGRAL(9, "购物支付","购物使用积分进行支付"),      //购物使用积分进行支付
+    ORDER_REFUND_INTEGRAL(10, "退回退款返回","退回退款订单项,消费者支付的积分"),
+    AFTER_CRASH_CALC_PT_TOTAL_GROSS_QUOTA(12, "碰撞后计算平台收益","碰撞后计算平台收益"),
+    GROSS_PROFIT_BONUS_QUOTA_PERC_EXCEED_MAXIMUM_LIMIT(14, "合赢奖超额","合赢奖超额"),
+    GROSS_PROFIT_ANCESTOR_QUOTA_PERC_EXCEED_MAXIMUM_LIMIT(15, "直推奖超额","直推奖超额"),
+    ORDER_CANCEL_BY_USER_REFUND_INTEGRAL(16,"手动取消支付返回","取消订单,退回积分"),
+    ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL(17,"支付超时返回","订单超时未支付,退回积分"),
+    ORDER_PAY_INTEGRAL_ANCESTER(18, "直推奖获得","直推人购物,推荐人获得冻结积分"),//购物 上级直推人 获得积分
+    ORDER_REFUND_INTEGRAL_CONSUMER(19,"订单退款","订单退款,收回消费者获得的冻结积分"),
+    ORDER_REFUND_INTEGRAL_ANCESTER(20,"订单退款","订单退款,收回消费者的推荐人,获得的冻结积分"),
+    ORDER_PAY_INTEGRAL_CONSUMER(21, "购物获得","消费者购物,获得冻结积分"),//购物者本人 获得积分
     ;
 
 //    ORDER_GET_FREEZE_INTEGRAL(12,"购物返积分"),//购物获得冻结积分
@@ -44,6 +43,11 @@ public enum CaclEnum {
      */
     private final String name;
 
+    /**
+     * 描述
+     */
+    private final String mark;
+
     public static CaclEnum getCaclEnumByValue(int value) {
         for (CaclEnum caclEnum : CaclEnum.values()) {
             if (caclEnum.getType() == value) {

+ 1 - 1
feifan-module-mall/feifan-module-trade-api/src/main/java/cn/newfeifan/mall/module/trade/enums/aftersale/AfterSaleStatusEnum.java

@@ -27,7 +27,7 @@ public enum AfterSaleStatusEnum implements IntArrayValuable {
     /**
      * 卖家通过售后;【商品待退货】
      */
-    SELLER_AGREE(20, "卖家通过", "商家同意退款"), // 有赞的状态提示:请退货并填写物流信息
+    SELLER_AGREE(20, "卖家通过", "商家等待买家退货"), // 有赞的状态提示:请退货并填写物流信息
     /**
      * 买家已退货,等待卖家收货;【商家待收货】
      */

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

@@ -231,6 +231,9 @@ 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());
+        }
     }
 
     @Override
@@ -250,7 +253,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         AfterSaleLogUtils.setAfterSaleInfo(afterSale.getId(), afterSale.getStatus(), newStatus);
 
         // 发送给微信用户售后消息
-        sentWcChatMessage(afterSale,false);
+        sentWcChatMessage(afterSale,AfterSaleStatusEnum.SELLER_DISAGREE.getContent());
 
         // 更新交易订单项的售后状态为【未申请】
         tradeOrderUpdateService.updateOrderItemWhenAfterSaleCancel(afterSale.getOrderItemId());
@@ -351,6 +354,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
                 MapUtil.of("reason", refuseReqVO.getRefuseMemo()));
 
         // TODO 发送售后消息
+        sentWcChatMessage(afterSale,AfterSaleStatusEnum.SELLER_REFUSE.getContent());
 
         // 更新交易订单项的售后状态为【未申请】
         tradeOrderUpdateService.updateOrderItemWhenAfterSaleCancel(afterSale.getOrderItemId());
@@ -433,7 +437,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
                 AfterSaleStatusEnum.COMPLETE.getStatus());
 
         // 发送给微信用户售后消息
-        sentWcChatMessage(afterSale,true);
+        sentWcChatMessage(afterSale , AfterSaleStatusEnum.COMPLETE.getContent());
 
         // 更新交易订单项的售后状态为【已完成】
         tradeOrderUpdateService.updateOrderItemWhenAfterSaleSuccess(afterSale.getOrderItemId(), afterSale.getRefundPrice());
@@ -444,7 +448,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
      * @param afterSale 售后订单
      * @param afterStatus 是否同意退款
      */
-    private void sentWcChatMessage(AfterSaleDO afterSale,Boolean afterStatus) {
+    private void sentWcChatMessage(AfterSaleDO afterSale,String afterStatus) {
         List<String> params = new ArrayList<>();
         params.add(afterSale.getNo());
         params.add(afterSale.getSpuName());
@@ -453,7 +457,7 @@ public class AfterSaleServiceImpl implements AfterSaleService {
         String formattedPrice = df.format((double) afterSale.getRefundPrice() / 100);
 
         params.add("¥ " + formattedPrice);
-        params.add(afterStatus ? "商家确认退款" : "商家拒绝退款");
+        params.add(afterStatus);
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         params.add(LocalDateTime.now().format(formatter));
         wcChatMessageUtils.sendWcChatMessage(afterSale.getUserId(), WcChatMessageTemplateIdEnum.AFTER_SALE_CHECK2.getTemplateId(),