From db689e5e2cb730b2cf08796fa224084f00758a71 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 12 三月 2022 17:05:17 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml |   46 +++++++++++++++++++---------------------------
 1 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml
index d5863c5..df4f150 100755
--- a/java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml
@@ -7,10 +7,10 @@
     <!-- 淇濆瓨璐圭敤淇℃伅 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessFeeInfo" parameterType="Map">
         insert into business_pay_fee(
-        amount,operate,income_obj_id,fee_type_cd,start_time,end_time,community_id,b_id,fee_id,user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type
+        amount,operate,income_obj_id,fee_type_cd,start_time,end_time,community_id,b_id,fee_id,user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type,batch_id
         ) values (
         #{amount},#{operate},#{incomeObjId},#{feeTypeCd},#{startTime},#{endTime},#{communityId},#{bId},#{feeId},#{userId},#{payerObjId},
-        #{feeFlag},#{state},#{configId},#{payerObjType}
+        #{feeFlag},#{state},#{configId},#{payerObjType},#{batchId}
         )
     </insert>
 
@@ -21,7 +21,7 @@
         feeTypeCd,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
         communityId,t.b_id,t.b_id bId,t.fee_id,t.fee_id feeId,t.user_id,t.user_id userId,t.payer_obj_id,t.payer_obj_id
         payerObjId,t.fee_flag,t.fee_flag feeFlag,t.state,t.config_id,t.config_id
-        configId,t.payer_obj_type,t.payer_obj_type payerObjType
+        configId,t.payer_obj_type,t.payer_obj_type payerObjType,t.batch_id,t.batch_id batchId
         from business_pay_fee t
         where 1 =1
         <if test="amount !=null and amount != ''">
@@ -51,9 +51,6 @@
         <if test="feeId !=null and feeId != ''">
             and t.fee_id= #{feeId}
         </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
-        </if>
         <if test="payerObjId !=null and payerObjId != ''">
             and t.payer_obj_id= #{payerObjId}
         </if>
@@ -76,10 +73,10 @@
     <!-- 淇濆瓨璐圭敤淇℃伅鑷� instance琛ㄤ腑 add by wuxw 2018-07-03 -->
     <insert id="saveFeeInfoInstance" parameterType="Map">
         insert into pay_fee(
-        amount,income_obj_id,fee_type_cd,start_time,status_cd,end_time,community_id,b_id,fee_id,user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type
+        amount,income_obj_id,fee_type_cd,start_time,status_cd,end_time,community_id,b_id,fee_id,user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type,batch_id
         ) select
         t.amount,t.income_obj_id,t.fee_type_cd,t.start_time,'0',t.end_time,t.community_id,t.b_id,t.fee_id,t.user_id,t.payer_obj_id
-        ,t.fee_flag,t.state,t.config_id,t.payer_obj_type
+        ,t.fee_flag,t.state,t.config_id,t.payer_obj_type,t.batch_id
         from business_pay_fee t where 1=1
         <if test="amount !=null and amount != ''">
             and t.amount= #{amount}
@@ -105,9 +102,6 @@
         </if>
         <if test="feeId !=null and feeId != ''">
             and t.fee_id= #{feeId}
-        </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
         </if>
         <if test="payerObjId !=null and payerObjId != ''">
             and t.payer_obj_id= #{payerObjId}
@@ -142,8 +136,9 @@
         configStartTime,pfc.end_time configEndTime,pfc.payment_cd paymentCd,pfc.payment_cycle paymentCycle,td4.name
         billTypeName,pfa.value importFeeName,ifd.end_time importFeeEndTime,mw.cur_degrees curDegrees,mw.pre_degrees
         preDegrees,
-        mw.pre_reading_time preReadingTime,mw.cur_reading_time curReadingTime,pfa1.`value` deadlineTime,mw.price mwPrice,
-        pfa2.`value` ownerName
+        mw.pre_reading_time preReadingTime,mw.cur_reading_time curReadingTime,pfa1.`value` deadlineTime,mw.price
+        mwPrice,
+        pfa2.`value` ownerName,t.batch_id,t.batch_id batchId
         from pay_fee t
         INNER join pay_fee_config pfc on t.config_id = pfc.config_id and
         pfc.status_cd = '0'
@@ -205,9 +200,6 @@
         </if>
         <if test="feeId !=null and feeId != ''">
             and t.fee_id= #{feeId}
-        </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
         </if>
         <if test="payerObjId !=null and payerObjId != ''">
             and t.payer_obj_id= #{payerObjId}
@@ -352,9 +344,6 @@
         </if>
         <if test="feeId !=null and feeId != ''">
             and t.fee_id= #{feeId}
-        </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
         </if>
         <if test="payerObjId !=null and payerObjId != ''">
             and t.payer_obj_id= #{payerObjId}
@@ -662,9 +651,6 @@
         <if test="feeId !=null and feeId != ''">
             and t.fee_id= #{feeId}
         </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
-        </if>
         <if test="payerObjId !=null and payerObjId != ''">
             and t.payer_obj_id= #{payerObjId}
         </if>
@@ -749,9 +735,6 @@
         <if test="feeId !=null and feeId != ''">
             and t.fee_id= #{feeId}
         </if>
-        <if test="userId !=null and userId != ''">
-            and t.user_id= #{userId}
-        </if>
         <if test="payerObjId !=null and payerObjId != ''">
             and t.payer_obj_id= #{payerObjId}
         </if>
@@ -783,11 +766,11 @@
     <!-- 鎵归噺鎻掑叆璐圭敤 -->
     <insert id="insertFees" parameterType="Map">
         insert into pay_fee (amount,status_cd,income_obj_id,fee_type_cd,start_time,end_time,community_id,b_id,fee_id,
-        user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type)
+        user_id,payer_obj_id,fee_flag,state,config_id,payer_obj_type,batch_id)
         VALUES
         <foreach collection="payFeePos" item="item" separator=",">
             (#{item.amount},'0',#{item.incomeObjId},#{item.feeTypeCd},#{item.startTime},#{item.endTime},#{item.communityId},
-            '-1',#{item.feeId},#{item.userId},#{item.payerObjId},#{item.feeFlag},#{item.state},#{item.configId},#{item.payerObjType})
+            '-1',#{item.feeId},#{item.userId},#{item.payerObjId},#{item.feeFlag},#{item.state},#{item.configId},#{item.payerObjType},#{item.batchId})
         </foreach>
     </insert>
 
@@ -879,4 +862,13 @@
         </if>
     </select>
 
+
+    <!-- 鏍规嵁鎵规鍒犻櫎璐圭敤 add by wuxw 2018-07-03 -->
+    <update id="deleteFeesByBatch" parameterType="Map">
+        update pay_fee t set t.status_cd = '1'
+        where 1=1
+        and t.batch_id= #{batchId}
+        and t.community_id= #{communityId}
+
+    </update>
 </mapper>

--
Gitblit v1.8.0