Browse Source

修改计算表字段

gaohp 11 months ago
parent
commit
eaa2c53a11

+ 9 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ordercalc/vo/OrderCalcPageReqVO.java

@@ -27,6 +27,9 @@ public class OrderCalcPageReqVO extends PageParam {
     @Schema(description = "成本")
     private Integer cost;
 
+    @Schema(description = "购买数量", example = "10152")
+    private Integer productCount;
+
     @Schema(description = "毛利 = 成本 * 0.38... (推广费用)")
     private Integer grossProfit;
 
@@ -50,4 +53,10 @@ public class OrderCalcPageReqVO extends PageParam {
     @Schema(description = "计算百分比模板")
     private String percentTemplate;
 
+    @Schema(description = "订单ID", example = "21497")
+    private Long orderId;
+
+    @Schema(description = "下单人姓名", example = "赵六")
+    private String name;
+
 }

+ 12 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ordercalc/vo/OrderCalcRespVO.java

@@ -33,6 +33,10 @@ public class OrderCalcRespVO {
     @ExcelProperty("成本")
     private Integer cost;
 
+    @Schema(description = "购买数量", example = "10152")
+    @ExcelProperty("购买数量")
+    private Integer productCount;
+
     @Schema(description = "毛利 = 成本 * 0.38... (推广费用)")
     @ExcelProperty("毛利 = 成本 * 0.38... (推广费用)")
     private Integer grossProfit;
@@ -59,4 +63,12 @@ public class OrderCalcRespVO {
     @Schema(description = "计算百分比模板")
     private String percentTemplate;
 
+    @Schema(description = "订单ID", example = "21497")
+    @ExcelProperty("订单ID")
+    private Long orderId;
+
+    @Schema(description = "下单人姓名", example = "赵六")
+    @ExcelProperty("下单人姓名")
+    private String name;
+
 }

+ 9 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/ordercalc/vo/OrderCalcSaveReqVO.java

@@ -28,6 +28,9 @@ public class OrderCalcSaveReqVO {
     @Schema(description = "成本")
     private Integer cost;
 
+    @Schema(description = "购买数量", example = "10152")
+    private Integer productCount;
+
     @Schema(description = "毛利 = 成本 * 0.38... (推广费用)")
     private Integer grossProfit;
 
@@ -45,4 +48,10 @@ public class OrderCalcSaveReqVO {
     @Schema(description = "计算百分比模板")
     private String percentTemplate;
 
+    @Schema(description = "订单ID", example = "21497")
+    private Long orderId;
+
+    @Schema(description = "下单人姓名", example = "赵六")
+    private String name;
+
 }

+ 8 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/ordercalc/OrderCalcDO.java

@@ -43,6 +43,10 @@ public class OrderCalcDO extends BaseDO {
      * 成本
      */
     private Integer cost;
+    /**
+     * 购买数量
+     */
+    private Integer productCount;
     /**
      * 毛利 = 成本 * 0.38... (推广费用)
      */
@@ -65,4 +69,8 @@ public class OrderCalcDO extends BaseDO {
     private Integer grossProfitPlatformQuota;
     private String percentTemplate;
 
+    private Long orderId;
+
+    private String name;
+
 }

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

@@ -24,12 +24,15 @@ public interface OrderCalcMapper extends BaseMapperX<OrderCalcDO> {
                 .betweenIfPresent(OrderCalcDO::getCreateTime, reqVO.getCreateTime())
                 .eqIfPresent(OrderCalcDO::getPrice, reqVO.getPrice())
                 .eqIfPresent(OrderCalcDO::getCost, reqVO.getCost())
+                .eqIfPresent(OrderCalcDO::getProductCount, reqVO.getProductCount())
                 .eqIfPresent(OrderCalcDO::getGrossProfit, reqVO.getGrossProfit())
                 .eqIfPresent(OrderCalcDO::getGrossProfitUserQuota, reqVO.getGrossProfitUserQuota())
                 .eqIfPresent(OrderCalcDO::getGrossProfitAncestorQuota, reqVO.getGrossProfitAncestorQuota())
                 .eqIfPresent(OrderCalcDO::getGrossProfitBonusQuota, reqVO.getGrossProfitBonusQuota())
                 .eqIfPresent(OrderCalcDO::getGrossProfitPlatformQuota, reqVO.getGrossProfitPlatformQuota())
                 .eqIfPresent(OrderCalcDO::getPercentTemplate, reqVO.getPercentTemplate())
+                .eqIfPresent(OrderCalcDO::getOrderId, reqVO.getOrderId())
+                .likeIfPresent(OrderCalcDO::getName, reqVO.getName())
                 .orderByDesc(OrderCalcDO::getId));
     }
 

+ 11 - 1
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/ordercalc/OrderCalcServiceImpl.java

@@ -287,7 +287,17 @@ public class OrderCalcServiceImpl implements OrderCalcService {
     }
 
     private static void addCaclDo(String percentTemplate, List<OrderCalcSaveReqVO> saveList, DistriOrderMessage k, Integer grossProfit, Integer ancestorQuota, Integer descendantQuota, Integer bonusQuota, Integer platformQuota) {
-        OrderCalcSaveReqVO orderCalcSaveReqVO = OrderCalcSaveReqVO.builder().userId(k.getUserId()).orderNo(k.getNo()).cost(k.getCostPrice()).price(k.getPrice()).grossProfit(grossProfit).grossProfitUserQuota(ancestorQuota).grossProfitAncestorQuota(descendantQuota).grossProfitBonusQuota(bonusQuota).grossProfitPlatformQuota(platformQuota).percentTemplate(percentTemplate).build();
+        OrderCalcSaveReqVO orderCalcSaveReqVO = OrderCalcSaveReqVO.builder()
+                .userId(k.getUserId())
+                .orderNo(k.getNo())
+                .cost(k.getCostPrice())
+                .price(k.getPrice())
+                .grossProfit(grossProfit)
+                .grossProfitUserQuota(ancestorQuota)
+                .grossProfitAncestorQuota(descendantQuota)
+                .grossProfitBonusQuota(bonusQuota)
+                .grossProfitPlatformQuota(platformQuota)
+                .percentTemplate(percentTemplate).build();
         saveList.add(orderCalcSaveReqVO);
     }