소스 검색

优化代码

java110 4 년 전
부모
커밋
2331d79d9f
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

+ 3 - 3
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -692,7 +692,7 @@
             and pfc.start_time <= #{endTime}
             and pfc.start_time <= #{endTime}
         </if>
         </if>
         <if test="yearMonth !=null and yearMonth != ''">
         <if test="yearMonth !=null and yearMonth != ''">
-            and concat(t.fee_year,t.fee_month) = #{yearMonth}
+            and concat(t.fee_year,lpad(t.fee_month,2,0)) = #{yearMonth}
         </if>
         </if>
 
 
         group by t.config_id,t.fee_name,pfc.start_time
         group by t.config_id,t.fee_name,pfc.start_time
@@ -762,7 +762,7 @@
             and pfc.start_time &lt;= #{endTime}
             and pfc.start_time &lt;= #{endTime}
         </if>
         </if>
         <if test="yearMonth !=null and yearMonth != ''">
         <if test="yearMonth !=null and yearMonth != ''">
-            and concat(t.fee_year,t.fee_month) = #{yearMonth}
+            and concat(t.fee_year,lpad(t.fee_month,2,0)) = #{yearMonth}
         </if>
         </if>
         group by t.config_id,t.fee_name,pfc.start_time
         group by t.config_id,t.fee_name,pfc.start_time
         order by t.create_time desc
         order by t.create_time desc
@@ -831,7 +831,7 @@
             and pfc.start_time &lt;= #{endTime}
             and pfc.start_time &lt;= #{endTime}
         </if>
         </if>
         <if test="yearMonth !=null and yearMonth != ''">
         <if test="yearMonth !=null and yearMonth != ''">
-            and concat(t.fee_year,t.fee_month) = #{yearMonth}
+            and concat(t.fee_year,lpad(t.fee_month,2,0)) = #{yearMonth}
         </if>
         </if>
         order by t.create_time desc
         order by t.create_time desc
     </select>
     </select>