xda %!s(int64=2) %!d(string=hai) anos
pai
achega
dcd1c4b86d
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/main/resources/mapper/RepalBillMapper.xml

+ 2 - 3
src/main/resources/mapper/RepalBillMapper.xml

@@ -103,12 +103,11 @@
         SELECT COUNT(*) AS totalCount, IFNULL(SUM(bill.RECEIVABLE), 0)  FROM REPAL_RESPONSIBLE_PERSON AS person
         LEFT JOIN REPAL_BILL AS bill ON person.REPAL_BILL_ID = bill.ID
         WHERE person.USER_ID = #{userId} AND person.DELETED = 0
-        AND
         <if test="repalBillStatus == 1">
-            bill.REPAL_BILL_STATUS = 1
+            AND bill.REPAL_BILL_STATUS = 1
         </if>
         <if test="repalBillStatus == 2">
-            bill.REPAL_BILL_STATUS IN (1,2)
+            AND bill.REPAL_BILL_STATUS IN (1,2)
         </if>
         AND bill.REPAL_GROUP_ID = #{repalGroupId}
         AND bill.REPAL_BOOK_ID = #{repalBookId}