diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3087554 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.idea +target +**/lib +**/classes \ No newline at end of file diff --git a/src/main/java/com/ifish7/mq/queues/event/DeviceInfoEvent.java b/src/main/java/com/ifish7/mq/queues/event/DeviceInfoEvent.java index cdbbc09..ba43fc3 100644 --- a/src/main/java/com/ifish7/mq/queues/event/DeviceInfoEvent.java +++ b/src/main/java/com/ifish7/mq/queues/event/DeviceInfoEvent.java @@ -17,6 +17,7 @@ import lombok.extern.log4j.Log4j; public class DeviceInfoEvent { /** + * 设备开关设置 * { * "eventProcess": "updateWarnOnoff", * "eventName": "com.ifish7.mq.queues.event.DeviceInfoEvent", @@ -25,18 +26,22 @@ public class DeviceInfoEvent { * "data" : { * "macAddress" : "5ccf7f006686", * "onOff" : "0" - * } + * } * } * } * @param eventEntity 事件体 */ private void updateWarnOnoff(Object eventEntity) { log.info("DeviceInfoEvent eventEntity : " + eventEntity); - TblDevice device = (TblDevice) eventEntity; - ITblDeviceService deviceService = AppBeans.getBean(TblDeviceServiceImpl.class); - TblDevice tblDevice = deviceService.getOne(new QueryWrapper().lambda().eq(TblDevice::getMacAddress, device.getMacAddress())); - tblDevice.setOnOff(device.getOnOff()); - deviceService.updateById(tblDevice); + try { + TblDevice device = (TblDevice) eventEntity; + ITblDeviceService deviceService = AppBeans.getBean(TblDeviceServiceImpl.class); + TblDevice tblDevice = deviceService.getOne(new QueryWrapper().lambda().eq(TblDevice::getMacAddress, device.getMacAddress())); + tblDevice.setOnOff(device.getOnOff()); + deviceService.updateById(tblDevice); + } catch (Exception e) { + log.info(e.getMessage(),e); + } } } diff --git a/src/main/webapp/WEB-INF/classes/com/ifish7/mq/Main.class b/src/main/webapp/WEB-INF/classes/com/ifish7/mq/Main.class deleted file mode 100644 index 8ddca3b..0000000 Binary files a/src/main/webapp/WEB-INF/classes/com/ifish7/mq/Main.class and /dev/null differ diff --git a/src/main/webapp/WEB-INF/classes/com/ifish7/mq/activemq/ConsumerService.class b/src/main/webapp/WEB-INF/classes/com/ifish7/mq/activemq/ConsumerService.class deleted file mode 100644 index 3508dc1..0000000 Binary files a/src/main/webapp/WEB-INF/classes/com/ifish7/mq/activemq/ConsumerService.class and /dev/null differ diff --git a/src/main/webapp/WEB-INF/classes/com/ifish7/mq/activemq/listener/QueueMessageListener.class b/src/main/webapp/WEB-INF/classes/com/ifish7/mq/activemq/listener/QueueMessageListener.class deleted file mode 100644 index 96dc135..0000000 Binary files a/src/main/webapp/WEB-INF/classes/com/ifish7/mq/activemq/listener/QueueMessageListener.class and /dev/null differ diff --git a/src/main/webapp/WEB-INF/classes/jdbc.properties b/src/main/webapp/WEB-INF/classes/jdbc.properties deleted file mode 100644 index a5700c3..0000000 --- a/src/main/webapp/WEB-INF/classes/jdbc.properties +++ /dev/null @@ -1,58 +0,0 @@ -jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8 -#jdbc.url=jdbc\:mysql\://139.196.24.156\:3306/myfishdb?characterEncoding\=UTF-8 -jdbc.username=ifish -jdbc.password=ifish7pwd -#jdbc.username=root -#jdbc.password=ifish7mysql -#jdbc.testWhileIdle=true -jdbc.validationQuery=SELECT * FROM DUAL -initialSize=1 -minIdle=1 -maxActive=20 -maxWait=60000 -timeBetweenEvictionRunsMillis=60000 -minEvictableIdleTimeMillis=300000 -poolPreparedStatements=true -maxPoolPreparedStatementPerConnectionSize=20 -removeAbandonedTimeout=1800 - -hibernate.dialect=org.hibernate.dialect.MySQLDialect -hibernate.show_sql=false -hibernate.format_sql=true -hibernate.hbm2ddl.auto=false -hibernate.jdbc.batch_size=50 -hibernate.query.substitutions=true 1,false 0 - - - - -#c3p0.driverClassName=com.mysql.jdbc.Driver -#c3p0.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8 -#c3p0.username=ifish -#c3p0.password=ifish7pwd -##c3p0.username=root -##c3p0.password=123456 -# -#c3p0.autoCommitOnClose=true -#c3p0.initialPoolSize=20 -#c3p0.minPoolSize=20 -#c3p0.maxPoolSize=50 -#c3p0.acquireIncrement=3 -# -#c3p0.checkoutTimeout=5000 -#c3p0.maxIdleTime=7200 -#c3p0.idleConnectionTestPeriod=18000 -##c3p0.maxIdleTimeExcessConnections=1800 -# -##c3p0.automaticTestTable=C3P0TestTable -##c3p0.testConnectionOnCheckout=false -##c3p0.testConnectionOnCheckin=false -# -##org.hibernate.dialect.MySQLInnoDBDialect -#hibernate.dialect=org.hibernate.dialect.MySQLDialect -#hibernate.show_sql=false -#hibernate.format_sql=true -#hibernate.hbm2ddl.auto=false -#hibernate.jdbc.batch_size=50 -#hibernate.query.substitutions=true 1,false 0 diff --git a/src/main/webapp/WEB-INF/classes/log4j.properties b/src/main/webapp/WEB-INF/classes/log4j.properties deleted file mode 100644 index ef3de12..0000000 --- a/src/main/webapp/WEB-INF/classes/log4j.properties +++ /dev/null @@ -1,18 +0,0 @@ -log4j.rootLogger=INFO,Console,File -#\u5B9A\u4E49\u65E5\u5FD7\u8F93\u51FA\u76EE\u7684\u5730\u4E3A\u63A7\u5236\u53F0 -log4j.appender.Console=org.apache.log4j.ConsoleAppender -log4j.appender.Console.Target=System.out -#\u53EF\u4EE5\u7075\u6D3B\u5730\u6307\u5B9A\u65E5\u5FD7\u8F93\u51FA\u683C\u5F0F\uFF0C\u4E0B\u9762\u4E00\u884C\u662F\u6307\u5B9A\u5177\u4F53\u7684\u683C\u5F0F -log4j.appender.Console.layout = org.apache.log4j.PatternLayout -log4j.appender.Console.layout.ConversionPattern=[%c] - %m%n - -#\u6587\u4EF6\u5927\u5C0F\u5230\u8FBE\u6307\u5B9A\u5C3A\u5BF8\u7684\u65F6\u5019\u4EA7\u751F\u4E00\u4E2A\u65B0\u7684\u6587\u4EF6 -log4j.appender.File = org.apache.log4j.RollingFileAppender -#\u6307\u5B9A\u8F93\u51FA\u76EE\u5F55 -log4j.appender.File.File = logs/dnkx.log -#\u5B9A\u4E49\u6587\u4EF6\u6700\u5927\u5927\u5C0F -log4j.appender.File.MaxFileSize = 10MB -#\u8F93\u51FA\u6240\u4EE5\u65E5\u5FD7\uFF0C\u5982\u679C\u6362\u6210DEBUG\u8868\u793A\u8F93\u51FADEBUG\u4EE5\u4E0A\u7EA7\u522B\u65E5\u5FD7 -log4j.appender.File.Threshold = ALL -log4j.appender.File.layout = org.apache.log4j.PatternLayout -log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-dd HH\:mm\:ss}][%c]%m%n \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/classes/spring-mq.xml b/src/main/webapp/WEB-INF/classes/spring-mq.xml deleted file mode 100644 index 4ef81b8..0000000 --- a/src/main/webapp/WEB-INF/classes/spring-mq.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - dnkxmq - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/classes/spring-mybatis.xml b/src/main/webapp/WEB-INF/classes/spring-mybatis.xml deleted file mode 100644 index 3fe4c77..0000000 --- a/src/main/webapp/WEB-INF/classes/spring-mybatis.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/lib/activemq-all-5.15.4.jar b/src/main/webapp/WEB-INF/lib/activemq-all-5.15.4.jar deleted file mode 100644 index e22bff4..0000000 Binary files a/src/main/webapp/WEB-INF/lib/activemq-all-5.15.4.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/aspectjweaver-1.8.4.jar b/src/main/webapp/WEB-INF/lib/aspectjweaver-1.8.4.jar deleted file mode 100644 index 4458ba4..0000000 Binary files a/src/main/webapp/WEB-INF/lib/aspectjweaver-1.8.4.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/commons-codec-1.6.jar b/src/main/webapp/WEB-INF/lib/commons-codec-1.6.jar deleted file mode 100644 index ee1bc49..0000000 Binary files a/src/main/webapp/WEB-INF/lib/commons-codec-1.6.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/commons-httpclient-3.1.jar b/src/main/webapp/WEB-INF/lib/commons-httpclient-3.1.jar deleted file mode 100644 index 7c59774..0000000 Binary files a/src/main/webapp/WEB-INF/lib/commons-httpclient-3.1.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/commons-lang3-3.1.jar b/src/main/webapp/WEB-INF/lib/commons-lang3-3.1.jar deleted file mode 100644 index a85e539..0000000 Binary files a/src/main/webapp/WEB-INF/lib/commons-lang3-3.1.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/druid-1.1.6.jar b/src/main/webapp/WEB-INF/lib/druid-1.1.6.jar deleted file mode 100644 index aff8f8f..0000000 Binary files a/src/main/webapp/WEB-INF/lib/druid-1.1.6.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/httpclient-4.2.jar b/src/main/webapp/WEB-INF/lib/httpclient-4.2.jar deleted file mode 100644 index b6d4c1e..0000000 Binary files a/src/main/webapp/WEB-INF/lib/httpclient-4.2.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/log4j-1.2.17.jar b/src/main/webapp/WEB-INF/lib/log4j-1.2.17.jar deleted file mode 100644 index 1d425cf..0000000 Binary files a/src/main/webapp/WEB-INF/lib/log4j-1.2.17.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/mybatis-3.4.5.jar b/src/main/webapp/WEB-INF/lib/mybatis-3.4.5.jar deleted file mode 100644 index 7019806..0000000 Binary files a/src/main/webapp/WEB-INF/lib/mybatis-3.4.5.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/mybatis-spring-1.3.2.jar b/src/main/webapp/WEB-INF/lib/mybatis-spring-1.3.2.jar deleted file mode 100644 index a69335f..0000000 Binary files a/src/main/webapp/WEB-INF/lib/mybatis-spring-1.3.2.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-aop-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-aop-5.0.8.RELEASE.jar deleted file mode 100644 index 8abf669..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-aop-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-beans-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-beans-5.0.8.RELEASE.jar deleted file mode 100644 index 508921e..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-beans-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-context-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-context-5.0.8.RELEASE.jar deleted file mode 100644 index ae6cc1e..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-context-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-context-support-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-context-support-5.0.8.RELEASE.jar deleted file mode 100644 index 7a70033..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-context-support-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-core-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-core-5.0.8.RELEASE.jar deleted file mode 100644 index d64e57b..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-core-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-expression-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-expression-5.0.8.RELEASE.jar deleted file mode 100644 index 1ac23b5..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-expression-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-jcl-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-jcl-5.0.8.RELEASE.jar deleted file mode 100644 index cceb9bd..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-jcl-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-jdbc-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-jdbc-5.0.8.RELEASE.jar deleted file mode 100644 index f0b3107..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-jdbc-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-jms-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-jms-5.0.8.RELEASE.jar deleted file mode 100644 index aae9b74..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-jms-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-messaging-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-messaging-5.0.8.RELEASE.jar deleted file mode 100644 index 4931d49..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-messaging-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-tx-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-tx-5.0.8.RELEASE.jar deleted file mode 100644 index 91a0cc7..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-tx-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-web-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-web-5.0.8.RELEASE.jar deleted file mode 100644 index f6dc8bd..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-web-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/spring-webmvc-5.0.8.RELEASE.jar b/src/main/webapp/WEB-INF/lib/spring-webmvc-5.0.8.RELEASE.jar deleted file mode 100644 index ba99cfc..0000000 Binary files a/src/main/webapp/WEB-INF/lib/spring-webmvc-5.0.8.RELEASE.jar and /dev/null differ diff --git a/src/main/webapp/WEB-INF/lib/xbean-spring-3.16.jar b/src/main/webapp/WEB-INF/lib/xbean-spring-3.16.jar deleted file mode 100644 index d02e564..0000000 Binary files a/src/main/webapp/WEB-INF/lib/xbean-spring-3.16.jar and /dev/null differ