浏览代码

* 代码优化

顾绍勇 5 年前
父节点
当前提交
642de272fd

+ 0
- 2
src/main/resources/mapper/TaHousingResourcesMapper.xml 查看文件

45
             AND t.`status` > 0
45
             AND t.`status` > 0
46
             AND t4.`status` = 1
46
             AND t4.`status` = 1
47
         <if test = "source == 'raiseChoose'">
47
         <if test = "source == 'raiseChoose'">
48
-            AND ( t6.`status` != 0 OR t6.`status` IS NULL )
49
-            --AND (t.house_locking_status  != 'locked' OR t.house_locking_status IS NULL)
50
             AND t7.raise_start_time &lt;= now() AND t7.raise_end_time &gt;= now()
48
             AND t7.raise_start_time &lt;= now() AND t7.raise_end_time &gt;= now()
51
             <if test="personId != null and personId != ''">
49
             <if test="personId != null and personId != ''">
52
                 AND (t6.person_id != #{personId} OR t6.person_id IS NULL)
50
                 AND (t6.person_id != #{personId} OR t6.person_id IS NULL)

+ 8
- 6
src/main/resources/mapper/TaRaiseRecordMapper.xml 查看文件

172
             <if test = "bo.refundNo != null and bo.refundNo != ''">
172
             <if test = "bo.refundNo != null and bo.refundNo != ''">
173
                 AND t2.refund_no = #{bo.refundNo}
173
                 AND t2.refund_no = #{bo.refundNo}
174
             </if>
174
             </if>
175
-            <if test = "bo.payStatus == 'paid'">
176
-                AND t.pay_status = #{bo.payStatus}
177
-            </if>
178
-            <if test = "bo.payStatus == 'refunded'">
179
-                AND t.pay_status IN ('refunded','change')
180
-            </if>
175
+            <choose>
176
+                <when test="bo.payStatus == 'refunded'">
177
+                    AND t.pay_status IN ('refunded','change')
178
+                </when>
179
+                <otherwise>
180
+                    AND t.pay_status = #{bo.payStatus}
181
+                </otherwise>
182
+            </choose>
181
             <if test = "bo.payStartTime != null and bo.payStartTime != ''">
183
             <if test = "bo.payStartTime != null and bo.payStartTime != ''">
182
                 AND t2.pay_time &gt;= STR_TO_DATE(#{bo.payStartTime}, '%Y-%m-%d %H:%i:%s')
184
                 AND t2.pay_time &gt;= STR_TO_DATE(#{bo.payStartTime}, '%Y-%m-%d %H:%i:%s')
183
             </if>
185
             </if>