Browse Source

添加用户收藏商品获得身价

Yangzw 6 months ago
parent
commit
1eb3289312
34 changed files with 115 additions and 114 deletions
  1. 1 2
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/OrderPercentageController.java
  2. 2 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentageDoubleSaveReqVO.java
  3. 3 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentagePageReqVO.java
  4. 3 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentageRespVO.java
  5. 3 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentageSaveReqVO.java
  6. 2 2
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionbrothers/vo/PartitionBrothersPageReqVO.java
  7. 2 5
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionbrothers/vo/PartitionBrothersRespVO.java
  8. 2 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionbrothers/vo/PartitionBrothersSaveReqVO.java
  9. 3 4
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitioncrash/vo/PartitionCrashPageReqVO.java
  10. 3 6
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitioncrash/vo/PartitionCrashRespVO.java
  11. 3 5
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitioncrash/vo/PartitionCrashSaveReqVO.java
  12. 2 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionson/vo/PartitionSonPageReqVO.java
  13. 2 5
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionson/vo/PartitionSonRespVO.java
  14. 2 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionson/vo/PartitionSonSaveReqVO.java
  15. 4 4
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/ptprofitlog/vo/PtProfitLogPageReqVO.java
  16. 4 4
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/ptprofitlog/vo/PtProfitLogRespVO.java
  17. 5 11
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/UserCollectBeforeController.java
  18. 1 2
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/vo/UserCollectBeforePageReqVO.java
  19. 1 4
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/vo/UserCollectBeforeRespVO.java
  20. 1 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/vo/UserCollectBeforeSaveReqVO.java
  21. 5 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/orderpercentage/OrderPercentageDO.java
  22. 2 5
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/partitionbrothers/PartitionBrothersDO.java
  23. 3 6
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/partitioncrash/PartitionCrashDO.java
  24. 2 5
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/partitionson/PartitionSonDO.java
  25. 3 6
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/ptprofit/PtProfitDO.java
  26. 4 4
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/ptprofitlog/PtProfitLogDO.java
  27. 1 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/orderpercentage/OrderPercentageMapper.java
  28. 1 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/usercollectbefore/UserCollectBeforeMapper.java
  29. 3 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/orderpercentage/OrderPercentageService.java
  30. 3 4
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/orderpercentage/OrderPercentageServiceImpl.java
  31. 2 2
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/ptprofitlog/PtProfitLogServiceImpl.java
  32. 4 0
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/socialstatus/SocialStatusServiceImpl.java
  33. 3 3
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/usercollectbefore/UserCollectBeforeService.java
  34. 30 4
      feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/usercollectbefore/UserCollectBeforeServiceImpl.java

+ 1 - 2
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/OrderPercentageController.java

@@ -1,5 +1,6 @@
 package cn.newfeifan.mall.module.distri.controller.admin.orderpercentage;
 
+import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.*;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import org.springframework.validation.annotation.Validated;
@@ -8,7 +9,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Operation;
 
-import javax.validation.constraints.*;
 import javax.validation.*;
 import javax.servlet.http.*;
 import java.util.*;
@@ -25,7 +25,6 @@ import cn.newfeifan.mall.framework.excel.core.util.ExcelUtils;
 import cn.newfeifan.mall.framework.operatelog.core.annotations.OperateLog;
 import static cn.newfeifan.mall.framework.operatelog.core.enums.OperateTypeEnum.*;
 
-import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.*;
 import cn.newfeifan.mall.module.distri.dal.dataobject.orderpercentage.OrderPercentageDO;
 import cn.newfeifan.mall.module.distri.service.orderpercentage.OrderPercentageService;
 

+ 2 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentageDoubleSaveReqVO.java

@@ -46,6 +46,8 @@ public class OrderPercentageDoubleSaveReqVO {
     @Schema(description = "用户注册后,获得的基础最大合赢奖、直推奖积分限额")
     private String baseMaxQuota;
 
+    @Schema(description = "收藏商品获取身价值,同一SPU商品收藏多次无效", example = "1")
+    private String collectSocialStatus;
 
 
 }

+ 3 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentagePageReqVO.java

@@ -52,4 +52,7 @@ public class OrderPercentagePageReqVO extends PageParam {
 
     @Schema(description = "用户注册后,获得的基础最大合赢奖、直推奖积分限额")
     private String baseMaxQuota;
+
+    @Schema(description = "收藏商品获取身价值,同一SPU商品收藏多次无效", example = "1")
+    private String collectSocialStatus;
 }

+ 3 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentageRespVO.java

@@ -62,4 +62,7 @@ public class OrderPercentageRespVO {
 
     @Schema(description = "用户注册后,获得的基础最大合赢奖、直推奖积分限额")
     private String baseMaxQuota;
+
+    @Schema(description = "收藏商品获取身价值,同一SPU商品收藏多次无效", example = "1")
+    private String collectSocialStatus;
 }

+ 3 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/orderpercentage/vo/OrderPercentageSaveReqVO.java

@@ -47,5 +47,8 @@ public class OrderPercentageSaveReqVO {
     @Schema(description = "用户注册后,获得的基础最大合赢奖、直推奖积分限额")
     private String baseMaxQuota;
 
+    @Schema(description = "收藏商品获取身价值,同一SPU商品收藏多次无效", example = "1")
+    private String collectSocialStatus;
+
 
 }

+ 2 - 2
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionbrothers/vo/PartitionBrothersPageReqVO.java

@@ -21,13 +21,13 @@ public class PartitionBrothersPageReqVO extends PageParam {
     private String partNo;
 
     @Schema(description = "业绩", example = "24491")
-    private Integer price;
+    private Long price;
 
     @Schema(description = "是否碰撞 0为未碰撞 1为已碰撞")
     private Integer hasHit;
 
     @Schema(description = "碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "是否是大区 0为小区 1为大区")
     private Integer size;

+ 2 - 5
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionbrothers/vo/PartitionBrothersRespVO.java

@@ -2,9 +2,6 @@ package cn.newfeifan.mall.module.distri.controller.admin.partitionbrothers.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
-import java.util.*;
-import org.springframework.format.annotation.DateTimeFormat;
 import java.time.LocalDateTime;
 import com.alibaba.excel.annotation.*;
 
@@ -27,7 +24,7 @@ public class PartitionBrothersRespVO {
 
     @Schema(description = "业绩", example = "24491")
     @ExcelProperty("业绩")
-    private Integer price;
+    private Long price;
 
     @Schema(description = "是否碰撞 0为未碰撞 1为已碰撞", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("是否碰撞 0为未碰撞 1为已碰撞")
@@ -35,7 +32,7 @@ public class PartitionBrothersRespVO {
 
     @Schema(description = "碰撞后额度")
     @ExcelProperty("碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "是否是大区 0为小区 1为大区")
     @ExcelProperty("是否是大区 0为小区 1为大区")

+ 2 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionbrothers/vo/PartitionBrothersSaveReqVO.java

@@ -2,7 +2,6 @@ package cn.newfeifan.mall.module.distri.controller.admin.partitionbrothers.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
 import javax.validation.constraints.*;
 
 @Schema(description = "管理后台 - 兄弟分区新增/修改 Request VO")
@@ -19,14 +18,14 @@ public class PartitionBrothersSaveReqVO {
     private String partNo;
 
     @Schema(description = "业绩", example = "24491")
-    private Integer price;
+    private Long price;
 
     @Schema(description = "是否碰撞 0为未碰撞 1为已碰撞", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotNull(message = "是否碰撞 0为未碰撞 1为已碰撞不能为空")
     private Integer hasHit;
 
     @Schema(description = "碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "是否是大区 0为小区 1为大区")
     private Integer size;

+ 3 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitioncrash/vo/PartitionCrashPageReqVO.java

@@ -1,7 +1,6 @@
 package cn.newfeifan.mall.module.distri.controller.admin.partitioncrash.vo;
 
 import lombok.*;
-import java.util.*;
 import io.swagger.v3.oas.annotations.media.Schema;
 import cn.newfeifan.mall.framework.common.pojo.PageParam;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -22,13 +21,13 @@ public class PartitionCrashPageReqVO extends PageParam {
     private String partNo;
 
     @Schema(description = "兄弟分区额度", example = "12349")
-    private Integer brotherPrice;
+    private Long brotherPrice;
 
     @Schema(description = "子分区额度", example = "30462")
-    private Integer sonPrice;
+    private Long sonPrice;
 
     @Schema(description = "碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "创建时间")
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)

+ 3 - 6
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitioncrash/vo/PartitionCrashRespVO.java

@@ -2,9 +2,6 @@ package cn.newfeifan.mall.module.distri.controller.admin.partitioncrash.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
-import java.util.*;
-import org.springframework.format.annotation.DateTimeFormat;
 import java.time.LocalDateTime;
 import com.alibaba.excel.annotation.*;
 
@@ -27,15 +24,15 @@ public class PartitionCrashRespVO {
 
     @Schema(description = "兄弟分区额度", example = "12349")
     @ExcelProperty("兄弟分区额度")
-    private Integer brotherPrice;
+    private Long brotherPrice;
 
     @Schema(description = "子分区额度", example = "30462")
     @ExcelProperty("子分区额度")
-    private Integer sonPrice;
+    private Long sonPrice;
 
     @Schema(description = "碰撞后额度")
     @ExcelProperty("碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("创建时间")

+ 3 - 5
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitioncrash/vo/PartitionCrashSaveReqVO.java

@@ -2,8 +2,6 @@ package cn.newfeifan.mall.module.distri.controller.admin.partitioncrash.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
-import javax.validation.constraints.*;
 
 @Schema(description = "管理后台 - 分区碰撞新增/修改 Request VO")
 @Data
@@ -19,12 +17,12 @@ public class PartitionCrashSaveReqVO {
     private String partNo;
 
     @Schema(description = "兄弟分区额度", example = "12349")
-    private Integer brotherPrice;
+    private Long brotherPrice;
 
     @Schema(description = "子分区额度", example = "30462")
-    private Integer sonPrice;
+    private Long sonPrice;
 
     @Schema(description = "碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
 }

+ 2 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionson/vo/PartitionSonPageReqVO.java

@@ -1,7 +1,6 @@
 package cn.newfeifan.mall.module.distri.controller.admin.partitionson.vo;
 
 import lombok.*;
-import java.util.*;
 import io.swagger.v3.oas.annotations.media.Schema;
 import cn.newfeifan.mall.framework.common.pojo.PageParam;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -22,13 +21,13 @@ public class PartitionSonPageReqVO extends PageParam {
     private String partNo;
 
     @Schema(description = "业绩", example = "5813")
-    private Integer price;
+    private Long price;
 
     @Schema(description = "是否碰撞 0为未碰撞 1为已碰撞")
     private Integer hasHit;
 
     @Schema(description = "碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "是否是大区 0为小区 1为大区")
     private Integer size;

+ 2 - 5
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionson/vo/PartitionSonRespVO.java

@@ -2,9 +2,6 @@ package cn.newfeifan.mall.module.distri.controller.admin.partitionson.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
-import java.util.*;
-import org.springframework.format.annotation.DateTimeFormat;
 import java.time.LocalDateTime;
 import com.alibaba.excel.annotation.*;
 
@@ -27,7 +24,7 @@ public class PartitionSonRespVO {
 
     @Schema(description = "业绩", example = "5813")
     @ExcelProperty("业绩")
-    private Integer price;
+    private Long price;
 
     @Schema(description = "是否碰撞 0为未碰撞 1为已碰撞", requiredMode = Schema.RequiredMode.REQUIRED)
     @ExcelProperty("是否碰撞 0为未碰撞 1为已碰撞")
@@ -35,7 +32,7 @@ public class PartitionSonRespVO {
 
     @Schema(description = "碰撞后额度")
     @ExcelProperty("碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "是否是大区 0为小区 1为大区")
     @ExcelProperty("是否是大区 0为小区 1为大区")

+ 2 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/partitionson/vo/PartitionSonSaveReqVO.java

@@ -2,7 +2,6 @@ package cn.newfeifan.mall.module.distri.controller.admin.partitionson.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
 import javax.validation.constraints.*;
 
 @Schema(description = "管理后台 - 后代分区新增/修改 Request VO")
@@ -19,14 +18,14 @@ public class PartitionSonSaveReqVO {
     private String partNo;
 
     @Schema(description = "业绩", example = "5813")
-    private Integer price;
+    private Long price;
 
     @Schema(description = "是否碰撞 0为未碰撞 1为已碰撞", requiredMode = Schema.RequiredMode.REQUIRED)
     @NotNull(message = "是否碰撞 0为未碰撞 1为已碰撞不能为空")
     private Integer hasHit;
 
     @Schema(description = "碰撞后额度")
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
     @Schema(description = "是否是大区 0为小区 1为大区")
     private Integer size;

+ 4 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/ptprofitlog/vo/PtProfitLogPageReqVO.java

@@ -35,16 +35,16 @@ public class PtProfitLogPageReqVO extends PageParam {
     private String orderNo;
 
     @Schema(description = "变动的当前可用积分值(可为负数)")
-    private Integer amount;
+    private Long amount;
 
     @Schema(description = "变动后当前可用积分钱包的余额")
-    private Integer afterAmount;
+    private Long afterAmount;
 
     @Schema(description = "变动的冻结积分值(可为负数)")
-    private Integer freezeAmount;
+    private Long freezeAmount;
 
     @Schema(description = "变动后冻结积分钱包的余额")
-    private Integer afterFreezeAmount;
+    private Long afterFreezeAmount;
 
     @Schema(description = "计算百分比模板")
     private String percentTemplate;

+ 4 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/ptprofitlog/vo/PtProfitLogRespVO.java

@@ -41,19 +41,19 @@ public class PtProfitLogRespVO {
 
     @Schema(description = "变动的当前可用积分值(可为负数)")
     @ExcelProperty("变动的当前可用积分值(可为负数)")
-    private Integer amount;
+    private Long amount;
 
     @Schema(description = "变动后当前可用积分钱包的余额")
     @ExcelProperty("变动后当前可用积分钱包的余额")
-    private Integer afterAmount;
+    private Long afterAmount;
 
     @Schema(description = "变动的冻结积分值(可为负数)")
     @ExcelProperty("变动的冻结积分值(可为负数)")
-    private Integer freezeAmount;
+    private Long freezeAmount;
 
     @Schema(description = "变动后冻结积分钱包的余额")
     @ExcelProperty("变动后冻结积分钱包的余额")
-    private Integer afterFreezeAmount;
+    private Long afterFreezeAmount;
 
     @Schema(description = "计算百分比模板")
     @ExcelProperty("计算百分比模板")

+ 5 - 11
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/usercollectbefore/UserCollectBeforeController.java → feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/UserCollectBeforeController.java

@@ -1,14 +1,15 @@
-package cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore;
+package cn.newfeifan.mall.module.distri.controller.app.usercollectbefore;
 
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforePageReqVO;
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforeRespVO;
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforeSaveReqVO;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.security.access.prepost.PreAuthorize;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.Operation;
 
-import javax.validation.constraints.*;
 import javax.validation.*;
 import javax.servlet.http.*;
 import java.util.*;
@@ -25,11 +26,10 @@ import cn.newfeifan.mall.framework.excel.core.util.ExcelUtils;
 import cn.newfeifan.mall.framework.operatelog.core.annotations.OperateLog;
 import static cn.newfeifan.mall.framework.operatelog.core.enums.OperateTypeEnum.*;
 
-import cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore.vo.*;
 import cn.newfeifan.mall.module.distri.dal.dataobject.usercollectbefore.UserCollectBeforeDO;
 import cn.newfeifan.mall.module.distri.service.usercollectbefore.UserCollectBeforeService;
 
-@Tag(name = "管理后台 - 用户曾经收藏过什么商品的")
+@Tag(name = "用户APP - 用户曾经收藏过什么商品的")
 @RestController
 @RequestMapping("/distri/user-collect-before")
 @Validated
@@ -40,14 +40,12 @@ public class UserCollectBeforeController {
 
     @PostMapping("/create")
     @Operation(summary = "创建用户曾经收藏过什么商品的")
-    @PreAuthorize("@ss.hasPermission('distri:user-collect-before:create')")
     public CommonResult<Long> createUserCollectBefore(@Valid @RequestBody UserCollectBeforeSaveReqVO createReqVO) {
         return success(userCollectBeforeService.createUserCollectBefore(createReqVO));
     }
 
     @PutMapping("/update")
     @Operation(summary = "更新用户曾经收藏过什么商品的")
-    @PreAuthorize("@ss.hasPermission('distri:user-collect-before:update')")
     public CommonResult<Boolean> updateUserCollectBefore(@Valid @RequestBody UserCollectBeforeSaveReqVO updateReqVO) {
         userCollectBeforeService.updateUserCollectBefore(updateReqVO);
         return success(true);
@@ -56,7 +54,6 @@ public class UserCollectBeforeController {
     @DeleteMapping("/delete")
     @Operation(summary = "删除用户曾经收藏过什么商品的")
     @Parameter(name = "id", description = "编号", required = true)
-    @PreAuthorize("@ss.hasPermission('distri:user-collect-before:delete')")
     public CommonResult<Boolean> deleteUserCollectBefore(@RequestParam("id") Long id) {
         userCollectBeforeService.deleteUserCollectBefore(id);
         return success(true);
@@ -65,7 +62,6 @@ public class UserCollectBeforeController {
     @GetMapping("/get")
     @Operation(summary = "获得用户曾经收藏过什么商品的")
     @Parameter(name = "id", description = "编号", required = true, example = "1024")
-    @PreAuthorize("@ss.hasPermission('distri:user-collect-before:query')")
     public CommonResult<UserCollectBeforeRespVO> getUserCollectBefore(@RequestParam("id") Long id) {
         UserCollectBeforeDO userCollectBefore = userCollectBeforeService.getUserCollectBefore(id);
         return success(BeanUtils.toBean(userCollectBefore, UserCollectBeforeRespVO.class));
@@ -73,7 +69,6 @@ public class UserCollectBeforeController {
 
     @GetMapping("/page")
     @Operation(summary = "获得用户曾经收藏过什么商品的分页")
-    @PreAuthorize("@ss.hasPermission('distri:user-collect-before:query')")
     public CommonResult<PageResult<UserCollectBeforeRespVO>> getUserCollectBeforePage(@Valid UserCollectBeforePageReqVO pageReqVO) {
         PageResult<UserCollectBeforeDO> pageResult = userCollectBeforeService.getUserCollectBeforePage(pageReqVO);
         return success(BeanUtils.toBean(pageResult, UserCollectBeforeRespVO.class));
@@ -81,7 +76,6 @@ public class UserCollectBeforeController {
 
     @GetMapping("/export-excel")
     @Operation(summary = "导出用户曾经收藏过什么商品的 Excel")
-    @PreAuthorize("@ss.hasPermission('distri:user-collect-before:export')")
     @OperateLog(type = EXPORT)
     public void exportUserCollectBeforeExcel(@Valid UserCollectBeforePageReqVO pageReqVO,
               HttpServletResponse response) throws IOException {

+ 1 - 2
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/usercollectbefore/vo/UserCollectBeforePageReqVO.java → feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/vo/UserCollectBeforePageReqVO.java

@@ -1,7 +1,6 @@
-package cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore.vo;
+package cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo;
 
 import lombok.*;
-import java.util.*;
 import io.swagger.v3.oas.annotations.media.Schema;
 import cn.newfeifan.mall.framework.common.pojo.PageParam;
 import org.springframework.format.annotation.DateTimeFormat;

+ 1 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/usercollectbefore/vo/UserCollectBeforeRespVO.java → feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/vo/UserCollectBeforeRespVO.java

@@ -1,10 +1,7 @@
-package cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore.vo;
+package cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
-import java.util.*;
-import org.springframework.format.annotation.DateTimeFormat;
 import java.time.LocalDateTime;
 import com.alibaba.excel.annotation.*;
 

+ 1 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/admin/usercollectbefore/vo/UserCollectBeforeSaveReqVO.java → feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/controller/app/usercollectbefore/vo/UserCollectBeforeSaveReqVO.java

@@ -1,8 +1,7 @@
-package cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore.vo;
+package cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo;
 
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
-import java.util.*;
 import javax.validation.constraints.*;
 
 @Schema(description = "管理后台 - 用户曾经收藏过什么商品的新增/修改 Request VO")
@@ -17,7 +16,6 @@ public class UserCollectBeforeSaveReqVO {
     private Long productSpuId;
 
     @Schema(description = "收藏商品的用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25194")
-    @NotNull(message = "收藏商品的用户ID不能为空")
     private Long userId;
 
 }

+ 5 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/orderpercentage/OrderPercentageDO.java

@@ -73,4 +73,9 @@ public class OrderPercentageDO extends BaseDO {
      */
     private String baseMaxQuota;
 
+    /**
+     * 收藏商品获取身价值,同一SPU商品收藏多次无效
+     */
+    private String collectSocialStatus;
+
 }

+ 2 - 5
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/partitionbrothers/PartitionBrothersDO.java

@@ -1,9 +1,6 @@
 package cn.newfeifan.mall.module.distri.dal.dataobject.partitionbrothers;
 
 import lombok.*;
-import java.util.*;
-import java.time.LocalDateTime;
-import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.*;
 import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
 
@@ -38,7 +35,7 @@ public class PartitionBrothersDO extends BaseDO {
     /**
      * 业绩
      */
-    private Integer price;
+    private Long price;
     /**
      * 是否碰撞 0为未碰撞 1为已碰撞
      */
@@ -46,7 +43,7 @@ public class PartitionBrothersDO extends BaseDO {
     /**
      * 碰撞后额度
      */
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
     /**
      * 是否是大区 0为小区 1为大区
      */

+ 3 - 6
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/partitioncrash/PartitionCrashDO.java

@@ -1,9 +1,6 @@
 package cn.newfeifan.mall.module.distri.dal.dataobject.partitioncrash;
 
 import lombok.*;
-import java.util.*;
-import java.time.LocalDateTime;
-import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.*;
 import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
 
@@ -38,14 +35,14 @@ public class PartitionCrashDO extends BaseDO {
     /**
      * 兄弟分区额度
      */
-    private Integer brotherPrice;
+    private Long brotherPrice;
     /**
      * 子分区额度
      */
-    private Integer sonPrice;
+    private Long sonPrice;
     /**
      * 碰撞后额度
      */
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
 
 }

+ 2 - 5
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/partitionson/PartitionSonDO.java

@@ -1,9 +1,6 @@
 package cn.newfeifan.mall.module.distri.dal.dataobject.partitionson;
 
 import lombok.*;
-import java.util.*;
-import java.time.LocalDateTime;
-import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.*;
 import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
 
@@ -38,7 +35,7 @@ public class PartitionSonDO extends BaseDO {
     /**
      * 业绩
      */
-    private Integer price;
+    private Long price;
     /**
      * 是否碰撞 0为未碰撞 1为已碰撞
      */
@@ -46,7 +43,7 @@ public class PartitionSonDO extends BaseDO {
     /**
      * 碰撞后额度
      */
-    private Integer afterHitQuota;
+    private Long afterHitQuota;
     /**
      * 是否是大区 0为小区 1为大区
      */

+ 3 - 6
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/ptprofit/PtProfitDO.java

@@ -1,9 +1,6 @@
 package cn.newfeifan.mall.module.distri.dal.dataobject.ptprofit;
 
 import lombok.*;
-import java.util.*;
-import java.time.LocalDateTime;
-import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.*;
 import cn.newfeifan.mall.framework.mybatis.core.dataobject.BaseDO;
 
@@ -30,14 +27,14 @@ public class PtProfitDO extends BaseDO {
     /**
      * 平台服务费(毛利下的百分比收益)
      */
-    private Integer ptAdd;
+    private Long ptAdd;
     /**
      * 平台收益(0.3888 之外的收益)
      */
-    private Integer ptGrossAdd;
+    private Long ptGrossAdd;
     /**
      * 平台总收益
      */
-    private Integer ptTotalAdd;
+    private Long ptTotalAdd;
 
 }

+ 4 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/dataobject/ptprofitlog/PtProfitLogDO.java

@@ -43,19 +43,19 @@ public class PtProfitLogDO extends BaseDO {
     /**
      * 变动的当前可用积分值(可为负数)
      */
-    private Integer amount;
+    private Long amount;
     /**
      * 变动后当前可用积分钱包的余额
      */
-    private Integer afterAmount;
+    private Long afterAmount;
     /**
      * 变动的冻结积分值(可为负数)
      */
-    private Integer freezeAmount;
+    private Long freezeAmount;
     /**
      * 变动后冻结积分钱包的余额
      */
-    private Integer afterFreezeAmount;
+    private Long afterFreezeAmount;
     /**
      * 计算百分比模板
      */

+ 1 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/orderpercentage/OrderPercentageMapper.java

@@ -1,13 +1,11 @@
 package cn.newfeifan.mall.module.distri.dal.mysql.orderpercentage;
 
-import java.util.*;
-
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
 import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
 import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
+import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.OrderPercentagePageReqVO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.orderpercentage.OrderPercentageDO;
 import org.apache.ibatis.annotations.Mapper;
-import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.*;
 
 /**
  * 积分相关计算浮动百分比设置 Mapper

+ 1 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/dal/mysql/usercollectbefore/UserCollectBeforeMapper.java

@@ -1,13 +1,11 @@
 package cn.newfeifan.mall.module.distri.dal.mysql.usercollectbefore;
 
-import java.util.*;
-
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
 import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
 import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforePageReqVO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.usercollectbefore.UserCollectBeforeDO;
 import org.apache.ibatis.annotations.Mapper;
-import cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore.vo.*;
 
 /**
  * 用户曾经收藏过什么商品的 Mapper

+ 3 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/orderpercentage/OrderPercentageService.java

@@ -1,11 +1,11 @@
 package cn.newfeifan.mall.module.distri.service.orderpercentage;
 
-import java.util.*;
 import javax.validation.*;
-import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.*;
+
+import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.OrderPercentageDoubleSaveReqVO;
+import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.OrderPercentagePageReqVO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.orderpercentage.OrderPercentageDO;
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
-import cn.newfeifan.mall.framework.common.pojo.PageParam;
 
 /**
  * 积分相关计算浮动百分比设置 Service 接口

+ 3 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/orderpercentage/OrderPercentageServiceImpl.java

@@ -1,20 +1,19 @@
 package cn.newfeifan.mall.module.distri.service.orderpercentage;
 
 import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.OrderPercentageDoubleSaveReqVO;
+import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.OrderPercentagePageReqVO;
+import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.OrderPercentageSaveReqVO;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 
 import org.springframework.validation.annotation.Validated;
-import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
 
-import cn.newfeifan.mall.module.distri.controller.admin.orderpercentage.vo.*;
 import cn.newfeifan.mall.module.distri.dal.dataobject.orderpercentage.OrderPercentageDO;
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
-import cn.newfeifan.mall.framework.common.pojo.PageParam;
 import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
 
 import cn.newfeifan.mall.module.distri.dal.mysql.orderpercentage.OrderPercentageMapper;

+ 2 - 2
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/ptprofitlog/PtProfitLogServiceImpl.java

@@ -140,7 +140,7 @@ public class PtProfitLogServiceImpl implements PtProfitLogService {
                 .eqIfPresent(PtProfitLogDO::getProfitStatus, CaclEnum.DIRECT_REFERRAL_QUOTA.getType())
                 .or().eq(PtProfitLogDO::getProfitStatus, CaclEnum.TOGETHER_AWARD.getType())
                 .in(PtProfitLogDO::getUserId, sonsId));
-        int sum = ptProfitLogDOS.stream().mapToInt(PtProfitLogDO::getAmount).sum();
+        Long sum = ptProfitLogDOS.stream().mapToLong(PtProfitLogDO::getAmount).sum();
 
         return sum + "";
     }
@@ -151,7 +151,7 @@ public class PtProfitLogServiceImpl implements PtProfitLogService {
                 .eqIfPresent(PtProfitLogDO::getProfitStatus, CaclEnum.DIRECT_REFERRAL_QUOTA.getType())
                 .or().eq(PtProfitLogDO::getProfitStatus, CaclEnum.TOGETHER_AWARD.getType())
                 .in(PtProfitLogDO::getUserId, sonsId));
-        int sum = ptProfitLogDOS.stream().mapToInt(PtProfitLogDO::getAmount).sum();
+        Long sum = ptProfitLogDOS.stream().mapToLong(PtProfitLogDO::getAmount).sum();
 
         return sum + "";
     }

+ 4 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/socialstatus/SocialStatusServiceImpl.java

@@ -92,6 +92,10 @@ public class SocialStatusServiceImpl implements SocialStatusService {
                 break;
             }
         }
+        if(socialStatusBO.getId() == null){
+            socialStatusBO.setId(socialStatusDOS.get(socialStatusDOS.size() - 1).getId());
+            socialStatusBO.setSocialUpNeed(0L);
+        }
         return socialStatusBO;
     }
 

+ 3 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/usercollectbefore/UserCollectBeforeService.java

@@ -1,11 +1,11 @@
 package cn.newfeifan.mall.module.distri.service.usercollectbefore;
 
-import java.util.*;
 import javax.validation.*;
-import cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore.vo.*;
+
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforePageReqVO;
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforeSaveReqVO;
 import cn.newfeifan.mall.module.distri.dal.dataobject.usercollectbefore.UserCollectBeforeDO;
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
-import cn.newfeifan.mall.framework.common.pojo.PageParam;
 
 /**
  * 用户曾经收藏过什么商品的 Service 接口

+ 30 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/usercollectbefore/UserCollectBeforeServiceImpl.java

@@ -1,20 +1,24 @@
 package cn.newfeifan.mall.module.distri.service.usercollectbefore;
 
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforePageReqVO;
+import cn.newfeifan.mall.module.distri.controller.app.usercollectbefore.vo.UserCollectBeforeSaveReqVO;
+import cn.newfeifan.mall.module.distri.dal.dataobject.orderpercentage.OrderPercentageDO;
+import cn.newfeifan.mall.module.distri.enums.SocialStatusEnum;
+import cn.newfeifan.mall.module.distri.service.duser.DuserService;
+import cn.newfeifan.mall.module.distri.service.orderpercentage.OrderPercentageService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.transaction.annotation.Transactional;
 
-import java.util.*;
-import cn.newfeifan.mall.module.distri.controller.admin.usercollectbefore.vo.*;
 import cn.newfeifan.mall.module.distri.dal.dataobject.usercollectbefore.UserCollectBeforeDO;
 import cn.newfeifan.mall.framework.common.pojo.PageResult;
-import cn.newfeifan.mall.framework.common.pojo.PageParam;
 import cn.newfeifan.mall.framework.common.util.object.BeanUtils;
 
 import cn.newfeifan.mall.module.distri.dal.mysql.usercollectbefore.UserCollectBeforeMapper;
 
 import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static cn.newfeifan.mall.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
 import static cn.newfeifan.mall.module.distri.enums.ErrorCodeConstants.*;
 
 /**
@@ -29,10 +33,32 @@ public class UserCollectBeforeServiceImpl implements UserCollectBeforeService {
     @Resource
     private UserCollectBeforeMapper userCollectBeforeMapper;
 
+    @Resource
+    private OrderPercentageService orderPercentageService;
+
+    @Resource
+    private DuserService duserService;
+
     @Override
     public Long createUserCollectBefore(UserCollectBeforeSaveReqVO createReqVO) {
+        createReqVO.setUserId(getLoginUserId());
         // 插入
         UserCollectBeforeDO userCollectBefore = BeanUtils.toBean(createReqVO, UserCollectBeforeDO.class);
+
+        UserCollectBeforeDO userCollectBeforeDO = userCollectBeforeMapper.selectOne(new LambdaQueryWrapper<UserCollectBeforeDO>()
+                .eq(UserCollectBeforeDO::getProductSpuId, createReqVO.getProductSpuId())
+                .eq(UserCollectBeforeDO::getUserId, createReqVO.getUserId())
+        );
+
+        if(userCollectBeforeDO != null){
+            return userCollectBeforeDO.getId();
+        }
+
+        //没有收藏过这个商品则获得身价
+        OrderPercentageDO orderPercentageDO = orderPercentageService.queryStatus();
+        Long collectSocialStatus = Long.valueOf(orderPercentageDO.getCollectSocialStatus());
+        duserService.updateDuserSocial(createReqVO.getUserId(), collectSocialStatus, SocialStatusEnum.FAVORITE_SOCIAL.getStatus());
+
         userCollectBeforeMapper.insert(userCollectBefore);
         // 返回
         return userCollectBefore.getId();