Commit a3f3ba1a authored by tangwei's avatar tangwei

修改数据

parent fd7ab7a0
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jxiop.api.mapper.MonitorFanIndicatorMapper">
<update id=""> <update id="UpdateMonitorFanIndicator">
<foreach collection="list" item="item" index="index"> <foreach collection="list" item="item" index="index">
update monitor_fan_indicator set indicator_value =#{item.indicatorValue} ,set time=#{item.time} update monitor_fan_indicator set indicator_value =#{item.indicatorValue} ,set time=#{item.time}
where gateway=#{time.gateway} and index_address=#{time.indexAddress} where gateway=#{time.gateway} and index_address=#{time.indexAddress}
</foreach> </foreach>
</update> </update>
......
...@@ -73,17 +73,20 @@ public class MasterDbConfig { ...@@ -73,17 +73,20 @@ public class MasterDbConfig {
//分页插件 //分页插件
Interceptor interceptor = new PageInterceptor(); Interceptor interceptor = new PageInterceptor();
Properties properties = new Properties(); Properties properties = new Properties();
//数据库 properties.setProperty("helperDialect", "mysql");
properties.setProperty("helperDialect", "mysql"); properties.setProperty("offsetAsPageNum", "true");
//是否将参数offset作为PageNum使用 properties.setProperty("rowBoundsWithCount", "true");
properties.setProperty("offsetAsPageNum", "true"); properties.setProperty("reasonable", "true");
//是否进行count查询 properties.setProperty("supportMethodsArguments","true");
properties.setProperty("rowBoundsWithCount", "true"); properties.setProperty("params","pageNum=pageNum;pageSize=pageSize" +
//是否分页合理化 "" +
properties.setProperty("reasonable", "false"); ";");
interceptor.setProperties(properties); interceptor.setProperties(properties);
sessionFactory.setPlugins(new Interceptor[] {interceptor}); sessionFactory.setPlugins(new Interceptor[] {interceptor});
return sessionFactory.getObject(); return sessionFactory.getObject();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment