Ver Fonte

golden 功能调整

yexianchao há 1 semana atrás
pai
commit
1a80aa0c84

+ 6 - 3
crm-custom/src/main/java/com/crm/custom/service/impl/CustomInfoServiceImpl.java

@@ -906,11 +906,14 @@ public class CustomInfoServiceImpl extends BaseUploadServiceImpl implements Cust
 
     @Override
     public CustomListDto getLevelLabel(Long id) {
-        CustomInfoTable customInfoTable = customInfoRepository.getFirstById(id);
+        CustomInfoTable custom = customInfoRepository.getFirstById(id);
 
         CustomListDto dto = new CustomListDto();
-        dto.setLevelLabel(customInfoTable.getLevelLabel());
-        dto.setReferralCode(customInfoTable.getReferralCode());
+        dto.setLevelLabel(custom.getLevelLabel());
+        if(custom.getLevelLabel() >= 3){
+            dto.setReferralCode(custom.getReferralCode());
+        }
+
         return dto;
     }
 

+ 4 - 4
crm-custom/src/main/java/com/crm/custom/service/impl/GoldenCustomBalanceRecordServiceImpl.java

@@ -135,10 +135,6 @@ public class GoldenCustomBalanceRecordServiceImpl implements GoldenCustomBalance
             pCustom.setBalance(balance.add(giveAmount.multiply(new BigDecimal(num))));
             customInfoRepository.save(pCustom);
 
-            custom.setRewardAmountLimit(rewardAmountLimit.add(table.getAmount()));
-            custom.setPRewardNum(custom.getPRewardNum() == null ? num : custom.getPRewardNum()+num);
-            customInfoRepository.save(custom);
-
             for (int i = 0; i < num; i++) {
                 GoldenCustomBalanceRecordTable record = new GoldenCustomBalanceRecordTable();
                 record.setCustomId(pCustom.getId());
@@ -151,6 +147,10 @@ public class GoldenCustomBalanceRecordServiceImpl implements GoldenCustomBalance
             }
         }
 
+        custom.setRewardAmountLimit(rewardAmountLimit);
+        custom.setPRewardNum(custom.getPRewardNum() == null ? num : custom.getPRewardNum()+num);
+        customInfoRepository.save(custom);
+
     }
 
 }

+ 10 - 4
crm-manager/src/main/resources/mapper/CustomInfoDao.xml

@@ -11,10 +11,13 @@
         from custom_info custom
         <where>
             <if test="name != null and name !=''">
-                and custom.name line concat ('%',#{name},'%')
+                and custom.name like concat ('%',#{name},'%')
             </if>
             <if test="email != null and email !=''">
-                and custom.email line concat (#{email},'%')
+                and custom.email like concat (#{email},'%')
+            </if>
+            <if test="phone != null and phone !=''">
+                and custom.phone = #{phone}
             </if>
             <if test="identity != null and identity !=''">
                 and custom.identity = #{identity}
@@ -42,10 +45,13 @@
         from custom_info custom
         <where>
             <if test="name != null and name !=''">
-                and custom.name line concat ('%',#{name},'%')
+                and custom.name like concat ('%',#{name},'%')
             </if>
             <if test="email != null and email !=''">
-                and custom.email line concat ('%',#{email},'%')
+                and custom.email like concat ('%',#{email},'%')
+            </if>
+            <if test="phone != null and phone !=''">
+                and custom.phone = #{phone}
             </if>
             <if test="identity != null and identity !=''">
                 and custom.identity =#{identity}

+ 0 - 7
crm-model/src/main/java/com/crm/rely/backend/model/dto/custom/InfoDto.java

@@ -144,11 +144,4 @@ public class InfoDto extends InfoEntity {
 
     private String sno;
 
-    /**
-     * 1:初探 2:研习 3:学成 4:深耕 5:传誉
-     */
-    private Integer levelLabel;
-
-    private String referralCode;
-
 }

+ 0 - 6
crm-model/src/main/java/com/crm/rely/backend/model/entity/custom/info/CustomInfoEntity.java

@@ -149,10 +149,4 @@ public class CustomInfoEntity extends BaseCustomInfoEntity {
 
     //private String sno;
 
-    /**
-     * 1:初探 2:研习 3:学成 4:深耕 5:传誉
-     */
-    private Integer levelLabel;
-
-    private String referralCode;
 }

+ 4 - 16
crm-model/src/main/java/com/crm/rely/backend/model/entity/custom/info/CustomSearchEntity.java

@@ -17,31 +17,17 @@ public class CustomSearchEntity extends BaseDateAndPageSearchEntity {
 
     private String email;
 
-    private String stamp;
-
-    private String ibNo;
-
-    private Long groupId;
+    private String identity;
 
     /**
      * 0:未申请或者已拒绝
      */
     private Integer status;
 
-    /**
-     * status=0 potentialStatus=0 未申请 potentialStatus=1已拒绝
-     */
-    private Integer potentialStatus;
+    private String stamp;
 
     private Long agentId;
 
-    private String identity;
-
-
-    private String agentIbNo;
-    private String salesIbNo;
-
-
     private String sortName;
     /**
      * 1:正序
@@ -51,4 +37,6 @@ public class CustomSearchEntity extends BaseDateAndPageSearchEntity {
 
 
     private String lastIp;
+
+    private String phone;
 }

+ 2 - 0
crm-model/src/main/java/com/crm/rely/backend/model/pojo/view/CustomView.java

@@ -39,4 +39,6 @@ public class CustomView {
     private BigDecimal totalSpendingAmount;
 
     private Integer levelLabel;
+
+    private String referralCode;
 }