Forráskód Böngészése

增加缺少的is_delete字段

jiakai 3 hónapja
szülő
commit
ad84c5d887

+ 8 - 0
commons/src/main/java/com/jzg/commons/entity/po/SysUserJzgInfoSalesman.java

@@ -1,8 +1,11 @@
 package com.jzg.commons.entity.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 /**
@@ -22,6 +25,11 @@ public class SysUserJzgInfoSalesman {
 
     private int partnerStatus;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
     public SysUserJzgInfoSalesman(){
 
     }

+ 7 - 0
partner/src/main/java/com/jzg/entity/PartnerRule.java

@@ -1,6 +1,8 @@
 package com.jzg.entity;
 
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.jzg.commons.core.base.PartnerBaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -43,4 +45,9 @@ public class PartnerRule extends PartnerBaseModel {
     @Schema(description = "购买保级金额")
     private BigDecimal fallAmount;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
 }

+ 8 - 0
partner/src/main/java/com/jzg/entity/PartnerUser.java

@@ -1,9 +1,11 @@
 package com.jzg.entity;
 
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.jzg.commons.core.base.PartnerBaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -96,4 +98,10 @@ public class PartnerUser extends PartnerBaseModel {
     private boolean first;
 
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
+
 }

+ 46 - 9
partner/src/main/resources/mapper/PartnerAttributeMapper.xml

@@ -20,7 +20,6 @@
         <collection property="requirement" column="id=id" select="selectRequirement" />
     </resultMap>
 
-
     <resultMap id="partner_attribute" type="com.jzg.entity.PartnerAttribute">
         <result property="id" column="id"/>
         <result property="min" column="min"/>
@@ -36,28 +35,66 @@
         <result property="taskDays" column="task_days"/>
     </resultMap>
 
+    <!-- 查询全部规则 -->
     <select id="queryAll" resultMap="BaseMapper">
-        select id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,strategy,kh_days,fall_tick,fall_amount,system_code from partner_rule
+        select
+        id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,
+        strategy,kh_days,fall_tick,fall_amount,system_code
+        from partner_rule
+        <where>
+            AND is_delete = 0
+        </where>
     </select>
 
-
+    <!-- 根据等级查询 -->
     <select id="selectByGrade" resultMap="BaseMapper">
-        select id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,strategy,kh_days,fall_tick,fall_amount from partner_rule where grade = #{grade}
+        select
+        id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,
+        strategy,kh_days,fall_tick,fall_amount
+        from partner_rule
+        <where>
+            AND is_delete = 0
+            <if test="grade != null">
+                AND grade = #{grade}
+            </if>
+        </where>
     </select>
 
 
+    <!-- 查询周期 -->
     <select id="selectCycle" resultMap="partner_attribute">
-        select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 1 and rule_id = #{id}
+        select
+        id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
+        from partner_attribute
+        <where>
+            AND is_delete = 0
+            AND type = 1
+            AND rule_id = #{id}
+        </where>
     </select>
 
-
+    <!-- 查询策略 -->
     <select id="selectStrategy" resultMap="partner_attribute">
-        select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 3 and rule_id = #{id}
+        select
+        id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
+        from partner_attribute
+        <where>
+            AND is_delete = 0
+            AND type = 3
+            AND rule_id = #{id}
+        </where>
     </select>
 
+    <!-- 查询要求 -->
     <select id="selectRequirement" resultMap="partner_attribute">
-        select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 2 and rule_id = #{id}
+        select
+        id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
+        from partner_attribute
+        <where>
+            AND is_delete = 0
+            AND type = 2
+            AND rule_id = #{id}
+        </where>
     </select>
 
-
 </mapper>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 532 - 481
partner/src/main/resources/mapper/PartnerUserMapper.xml


+ 5 - 4
partner/src/main/resources/mapper/SysPartnerAccountMapper.xml

@@ -22,8 +22,9 @@
             a.create_time as "createTime",
             a.history_fee as "historyFee",
             a.cash_fee as "cashFee"
-        from sys_partner_account a
+        from partner_partner_account a
         <where>
+            a.is_delete = 0
             <if test="userId !=null and userId !=''">
                 AND a.user_id =#{userId}
             </if>
@@ -74,10 +75,10 @@
             COALESCE(SUM(CASE WHEN 1=1 THEN history_fee END), 0) AS transferAmount,
             COALESCE(SUM(CASE WHEN 1=1 THEN expired_amount END), 0) AS expiredAmount,
             COALESCE(SUM(CASE WHEN 1=1 THEN cash_fee - expired_amount END), 0) AS unreportedAmount,
-            (SELECT COALESCE(cash_fee, 0) FROM sys_partner_account WHERE user_id = #{userId}) AS cashFee,
-            (SELECT COALESCE(history_fee, 0) FROM sys_partner_account WHERE user_id = #{userId} ) AS historyFee
+            (SELECT COALESCE(cash_fee, 0) FROM partner_partner_account WHERE user_id = #{userId} ) AS cashFee,
+            (SELECT COALESCE(history_fee, 0) FROM partner_partner_account WHERE user_id = #{userId} ) AS historyFee
         FROM partner_partner_account
-        WHERE user_id = #{userId}
+        WHERE user_id = #{userId} and is_delete = 0
     </select>
 
 </mapper>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott