Преглед на файлове

归集数据频次分享

wangzhe преди 1 година
родител
ревизия
029d69a143

+ 2 - 0
mybusiness/src/main/java/com/sooka/system/service/impl/TUInterfaceinfoServiceImpl.java

@@ -310,7 +310,9 @@ public class TUInterfaceinfoServiceImpl implements ITUInterfaceinfoService
             }
             Map map = new HashMap();
             map.put("year", year);
+//            month = "1";
             map.put("month", month);
+            System.out.println("month=" + month);
             map.put("tableName", tableName);
             System.out.println(tuInterfaceinfo.getTableName() + " - " + tuInterfaceinfo.getInterfaceName() + " - " + "updating database... id = " + tuInterfaceinfo.getId());
             Map column = new HashMap();

+ 12 - 12
mybusiness/src/main/resources/mapper/imputationData/ImputationDataMapper.xml

@@ -81,18 +81,18 @@
     <update id="updateImputationInterfaceByYearMonthTableName" parameterType="ImputationData">
         update t_u_imputation_interface
             <trim prefix="SET" suffixOverrides=",">
-                <if test="month == '1'">jan = #{count},</if>
-                <if test="month == '2'">feb = #{count},</if>
-                <if test="month == '3'">mar = #{count},</if>
-                <if test="month == '4'">apr = #{count},</if>
-                <if test="month == '5'">may = #{count},</if>
-                <if test="month == '6'">jun = #{count},</if>
-                <if test="month == '7'">jul = #{count},</if>
-                <if test="month == '8'">aug = #{count},</if>
-                <if test="month == '9'">sep = #{count},</if>
-                <if test="month == '10'">oct = #{count},</if>
-                <if test="month == '11'">nov = #{count},</if>
-                <if test="month == '12'">decb = #{count},</if>
+                <if test="month == 1">jan = #{count},</if>
+                <if test="month == 2">feb = #{count},</if>
+                <if test="month == 3">mar = #{count},</if>
+                <if test="month == 4">apr = #{count},</if>
+                <if test="month == 5">may = #{count},</if>
+                <if test="month == 6">jun = #{count},</if>
+                <if test="month == 7">jul = #{count},</if>
+                <if test="month == 8">aug = #{count},</if>
+                <if test="month == 9">sep = #{count},</if>
+                <if test="month == 10">oct = #{count},</if>
+                <if test="month == 11">nov = #{count},</if>
+                <if test="month == 12">decb = #{count},</if>
             </trim>
         where year = #{year} and table_name = #{tableName}
     </update>