Ver Fonte

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

guq há 6 anos atrás
pai
commit
a1ccbd7e59

+ 1 - 0
applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/DeviceClientApplication.java

@@ -1,6 +1,7 @@
 package com.usoftchina.smartschool.device.client;
 
 import com.usoftchina.smartschool.device.client.config.DeviceServerProperties;
+import com.usoftchina.smartschool.device.context.SpringContextHolder;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;

+ 5 - 1
applications/device/device-client/src/main/java/com/usoftchina/smartschool/device/client/init/IcCardInitializer.java

@@ -24,7 +24,11 @@ public class IcCardInitializer implements CommandLineRunner {
     public void run(String... args) throws Exception {
         IcCard card = icCardService.find();
         if (null != card) {
-            dynamicDataSourceRegister.createDataSource(card);
+            try {
+                dynamicDataSourceRegister.createDataSource(card);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
     }
 }

+ 3 - 3
applications/device/device-client/src/main/resources/application.yml

@@ -4,10 +4,10 @@ device:
     connect-time: 10000
   server:
   # 门禁事件的服务端接口
-    accessControlEvent: https://school-api.ubtob.com/api/device/accesscontrol/event
+    accessControlEvent: https://school-api.ydyhz.com/api/device/accesscontrol/event
   # IC卡传输的服务端接口
   icCard:
-    icCardUrl: https://school-api.ubtob.com/api/device/iccard/consume/record
+    icCardUrl: https://school-api.ydyhz.com/api/device/iccard/consume/record
 server:
   tomcat:
     uri-encoding: UTF-8
@@ -32,4 +32,4 @@ spring:
 logging:
   path: ${user.home}/.device-client/logs/
   level:
-    com.usoftchina.smartschool.device.client: debug
+    com.usoftchina.smartschool: debug

+ 1 - 11
applications/device/device-client/src/main/resources/logback-spring.xml

@@ -31,15 +31,6 @@
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 
-    <appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>${log.level.console}</level>
-        </filter>
-        <encoder>
-            <pattern>${common-pattern}</pattern>
-        </encoder>
-    </appender>
-
     <appender name="ROOT_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${log.path}/root.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
@@ -56,9 +47,8 @@
     <logger name="org.springframework" level="INFO"/>
     <logger name="com.usoftchina.smartschool" level="DEBUG"/>
 
-    <root level="WARN">
+    <root level="INFO">
         <appender-ref ref="ROOT_APPENDER"/>
-        <appender-ref ref="CONSOLE_APPENDER"/>
     </root>
 
 </configuration>

+ 1 - 1
applications/device/device-core/src/main/java/com/usoftchina/smartschool/device/context/SpringContextHolder.java

@@ -36,6 +36,6 @@ public class SpringContextHolder {
 
     public static String getMessage(String code, Object[] args, Locale locale) {
         Assert.notNull(context, "spring context not ready");
-        return context.getMessage(code, args, locale);
+        return context.getMessage(code, args, code, locale);
     }
 }

+ 0 - 0
applications/device/device-core/src/main/resources/message_zh_CN.properties → applications/device/device-core/src/main/resources/messages.properties


+ 2 - 0
applications/device/device-core/src/main/resources/messages_zh_CN.properties

@@ -0,0 +1,2 @@
+ERROR_UNKNOWN=\u672a\u77e5\u5f02\u5e38
+ERROR_IP_PORT_EXIST=IP\u548c\u7aef\u53e3\u5df2\u5b58\u5728

+ 1 - 1
frontend/wechat-web/src/modules/hiPages/accessnoticedetail/AccessNoticeDetail.jsx

@@ -59,7 +59,7 @@ class AccessNoticeDetail extends Component {
 
                 <div className='access-notice-img-layout'>
                     <img className='access-notice-img'
-                         src={_host + '/api/file/download?path=' + pic}/>
+                         src={pic}/>
                 </div>
             </div>
         )