Commit 4d8b953f by 杨林龙

1.28.1 开发围栏报警数量统计功能 优化项目配置

1 parent d8051cd9
......@@ -315,5 +315,17 @@
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
......@@ -28,8 +28,12 @@ import java.util.List;
@Mapper
public interface VehicleDeviceMapper extends CommonBaseMapper<VehicleDevice> {
@Select("select * from t_vehicle_device where sn = #{sn} and bind_status = 1 and del_flag = 0 limit 1")
@ResultMap(value = "BaseResultMap")
/**
* 根据设备号查询绑定设备
*
* @param sn 设备号
* @return
*/
VehicleDevice selectBindDeviceBySn(@Param("sn") String sn);
/**
......
#\u9879\u76EE\u540D\u79F0
spring.application.name=ne-shield-trialdrive-admin
#\u65E5\u5FD7\u8DEF\u5F84\uFF08logback-spring.xml\u8BFB\u53D6\uFF0C\u4E0D\u8981\u52A0\u5165\u914D\u7F6E\u4E2D\u5FC3\uFF09
logging.path=/data/java_log/jetty/${spring.application.name}/${spring.application.name}.log
#nacos\u914D\u7F6E\u4E2D\u5FC3
spring.cloud.nacos.config.server-addr=192.168.0.63:8858
#spring.cloud.nacos.discovery.server-addr=192.168.0.63:8858
#\u8054\u8C03\u6D4B\u8BD5\u7684\u65F6\u5019\u4F7F\u7528
#spring.cloud.nacos.config.server-addr=192.168.0.63:8848
#nacos\u914D\u7F6Eid\uFF0C\u5B8C\u6574dataId=${spring.cloud.nacos.config.prefix}-${spring.profiles.active}.${file-extension\uFF08\u7531\u65B0\u589E\u914D\u7F6E\u65F6\u9009\u7684\u6587\u4EF6\u7C7B\u578B\u51B3\u5B9A\uFF09}
#\u793A\u4F8B\uFF1Ahttp://192.168.0.63:8848/nacos/v1/cs/configs?dataId=glsx-rest-admin.properties&group=DEV_GROUP
spring.cloud.nacos.config.group=NESHIELD_DEV_GROUP
#\u914D\u7F6Eprefix\uFF0C\u9ED8\u8BA4\u503C\u540C${spring.application.name}
spring.cloud.nacos.config.prefix=${spring.application.name}
......@@ -18,15 +16,13 @@ spring.cloud.nacos.config.prefix=${spring.application.name}
spring.profiles.active=dev
#\u914D\u7F6E\u683C\u5F0F
spring.cloud.nacos.config.file-extension=properties
#\u5FAE\u670D\u52A1sentinel\u3001zipkin\u3001actuator\u7B49\u516C\u5171\u914D\u7F6E
spring.cloud.nacos.config.shared-configs[0].data-id=glsx-rest-microservice-share.properties
spring.cloud.nacos.config.shared-configs[0].group=DEV_GROUP
spring.cloud.nacos.config.shared-configs[0].refresh=true
#\u6570\u636E\u5E93\u3001redis\u7B49\u516C\u5171\u914D\u7F6E
spring.cloud.nacos.config.shared-configs[1].group=NESHIELD_DEV_GROUP
spring.cloud.nacos.config.shared-configs[1].data-id=glsx-ne-shield-share-dev.properties
spring.cloud.nacos.config.shared-configs[1].refresh=true
#mybatis.configuration.log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
#mybatis.configuration.log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mybatis.typeAliasesPackage=cn.com.glsx.admin.modules.entity
\ No newline at end of file
......@@ -319,4 +319,13 @@
order by activateTime desc, deviceId desc
</select>
<select id="selectBindDeviceBySn" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_vehicle_device
where sn = #{sn}
and bind_status = 1
and del_flag = 0 limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -215,9 +215,14 @@ public class ElectricFenceServiceTest {
@Test
public void testGetFenceAlarmCount() {
List<String> sns = vehicleMapper.getAllDeviceSnByAuth();
List<String> sns = Lists.newArrayList("13123123");
Integer fenceAlarmCount = electricFenceService.getFenceAlarmCount(sns);
System.out.println("fenceAlarmCount = " + fenceAlarmCount);
}
@Test
public void testGetAllDeviceSnByAuth() {
List<String> sns = vehicleMapper.getAllDeviceSnByAuth();
System.out.println("sns = " + JSONUtil.toJsonStr(sns));
}
}
\ No newline at end of file
......@@ -150,4 +150,10 @@ public class RegionalSearchServiceTest {
// vehicleDeviceMapper.get
}
@Test
public void testSelectBindDeviceBySn() {
VehicleDevice vehicleDeviceBySn = vehicleDeviceMapper.selectBindDeviceBySn("3710005891");
System.out.println("vehicleDeviceBySn = " + JSONUtil.toJsonStr(vehicleDeviceBySn));
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!