Commit a3f3ba1a authored by tangwei's avatar tangwei

修改数据

parent fd7ab7a0
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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}
......
...@@ -75,15 +75,18 @@ public class MasterDbConfig { ...@@ -75,15 +75,18 @@ 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");
//是否将参数offset作为PageNum使用
properties.setProperty("offsetAsPageNum", "true"); properties.setProperty("offsetAsPageNum", "true");
//是否进行count查询
properties.setProperty("rowBoundsWithCount", "true"); properties.setProperty("rowBoundsWithCount", "true");
//是否分页合理化 properties.setProperty("reasonable", "true");
properties.setProperty("reasonable", "false"); properties.setProperty("supportMethodsArguments","true");
properties.setProperty("params","pageNum=pageNum;pageSize=pageSize" +
"" +
";");
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