wuxw 1 年間 前
コミット
8d0bae4b91
共有1 個のファイルを変更した42 個の追加39 個の削除を含む
  1. 42 39
      java110-db/src/main/resources/mapper/fee/PayFeeV1ServiceDaoImplMapper.xml

+ 42 - 39
java110-db/src/main/resources/mapper/fee/PayFeeV1ServiceDaoImplMapper.xml

@@ -6,9 +6,9 @@
     <!-- 保存费用明细信息 add by wuxw 2018-07-03 -->
     <insert id="savePayFeeInfo" parameterType="Map">
         insert into pay_fee(amount, fee_type_cd, batch_id, fee_id, user_id, income_obj_id, config_id, fee_flag,
-                            start_time, end_time, state, community_id, payer_obj_type, payer_obj_id, b_id)
+        start_time, end_time, state, community_id, payer_obj_type, payer_obj_id, b_id)
         values (#{amount}, #{feeTypeCd}, #{batchId}, #{feeId}, #{userId}, #{incomeObjId}, #{configId}, #{feeFlag},
-                #{startTime}, #{endTime}, #{state}, #{communityId}, #{payerObjType}, #{payerObjId}, #{bId})
+        #{startTime}, #{endTime}, #{state}, #{communityId}, #{payerObjType}, #{payerObjId}, #{bId})
     </insert>
 
     <!-- 查询费用明细信息 add by wuxw 2018-07-03 -->
@@ -73,44 +73,47 @@
 
     <!-- 修改费用明细信息 add by wuxw 2018-07-03 -->
     <update id="updatePayFeeInfo" parameterType="Map">
-        update pay_fee t set t.status_cd = #{statusCd}
-        <if test="newBId != null and newBId != ''">
-            ,t.b_id = #{newBId}
-        </if>
-        <if test="amount !=null and amount != ''">
-            , t.amount= #{amount}
-        </if>
-        <if test="feeTypeCd !=null and feeTypeCd != ''">
-            , t.fee_type_cd= #{feeTypeCd}
-        </if>
-        <if test="batchId !=null and batchId != ''">
-            , t.batch_id= #{batchId}
-        </if>
-        <if test="userId !=null and userId != ''">
-            , t.user_id= #{userId}
-        </if>
-        <if test="incomeObjId !=null and incomeObjId != ''">
-            , t.income_obj_id= #{incomeObjId}
-        </if>
-        <if test="feeFlag !=null and feeFlag != ''">
-            , t.fee_flag= #{feeFlag}
-        </if>
-        <if test="startTime !=null and startTime != ''">
-            , t.start_time= #{startTime}
-        </if>
-        <if test="endTime !=null and endTime != ''">
-            , t.end_time= #{endTime}
-        </if>
-        <if test="state !=null and state != ''">
-            , t.state= #{state}
-        </if>
-        <if test="payerObjType !=null and payerObjType != ''">
-            , t.payer_obj_type= #{payerObjType}
-        </if>
-        <if test="payerObjId !=null and payerObjId != ''">
-            , t.payer_obj_id= #{payerObjId}
-        </if>
+        update pay_fee t
+        <set>
+            <if test="newBId != null and newBId != ''">
+                t.b_id = #{newBId},
+            </if>
+            <if test="amount !=null and amount != ''">
+                t.amount= #{amount},
+            </if>
+            <if test="feeTypeCd !=null and feeTypeCd != ''">
+                t.fee_type_cd= #{feeTypeCd},
+            </if>
+            <if test="batchId !=null and batchId != ''">
+                t.batch_id= #{batchId},
+            </if>
+            <if test="userId !=null and userId != ''">
+                t.user_id= #{userId},
+            </if>
+            <if test="incomeObjId !=null and incomeObjId != ''">
+                t.income_obj_id= #{incomeObjId},
+            </if>
+            <if test="feeFlag !=null and feeFlag != ''">
+                t.fee_flag= #{feeFlag},
+            </if>
+            <if test="startTime !=null and startTime != ''">
+                t.start_time= #{startTime},
+            </if>
+            <if test="endTime !=null and endTime != ''">
+                t.end_time= #{endTime},
+            </if>
+            <if test="state !=null and state != ''">
+                t.state= #{state},
+            </if>
+            <if test="payerObjType !=null and payerObjType != ''">
+                 t.payer_obj_type= #{payerObjType},
+            </if>
+            <if test="payerObjId !=null and payerObjId != ''">
+                 t.payer_obj_id= #{payerObjId}
+            </if>
+        </set>
         where 1=1
+        and t.status_cd = '0'
         <if test="feeId !=null and feeId != ''">
             and t.fee_id= #{feeId}
         </if>