Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2e6e2b27
authored
May 06, 2022
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
V1.7.0需求开发
1 parent
d678a06f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
32 deletions
pom.xml
src/main/java/cn/com/glsx/admin/modules/entity/VehicleDevice.java
src/main/resources/config/generatorConfig.xml
src/main/resources/mapper/VehicleDeviceMapper.xml
pom.xml
View file @
2e6e2b2
...
@@ -251,13 +251,13 @@
...
@@ -251,13 +251,13 @@
</dependencies>
</dependencies>
<configuration>
<configuration>
<!--username-->
<!--username-->
<username>
biz_neshield
</username>
<username>
dev_user
</username>
<!--password-->
<!--password-->
<password>
9USarBaG
</password>
<password>
df234fl
</password>
<!--driver-->
<!--driver-->
<driverClassName>
com.mysql.cj.jdbc.Driver
</driverClassName>
<driverClassName>
com.mysql.cj.jdbc.Driver
</driverClassName>
<!--jdbc url-->
<!--jdbc url-->
<jdbcUrl>
jdbc:mysql://192.168.3.
222:3307
/neshield
</jdbcUrl>
<jdbcUrl>
jdbc:mysql://192.168.3.
190:3306
/neshield
</jdbcUrl>
<!--生成文件类型-->
<!--生成文件类型-->
<fileType>
HTML
</fileType>
<fileType>
HTML
</fileType>
<!--打开文件输出目录-->
<!--打开文件输出目录-->
...
...
src/main/java/cn/com/glsx/admin/modules/entity/VehicleDevice.java
View file @
2e6e2b2
...
@@ -5,6 +5,7 @@ import lombok.Data;
...
@@ -5,6 +5,7 @@ import lombok.Data;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
/**
* 车辆设备绑定关系
* 车辆设备绑定关系
...
@@ -47,4 +48,33 @@ public class VehicleDevice extends BaseEntity {
...
@@ -47,4 +48,33 @@ public class VehicleDevice extends BaseEntity {
@Column
(
name
=
"wire_type"
)
@Column
(
name
=
"wire_type"
)
private
Integer
wireType
;
private
Integer
wireType
;
/**
* 激活上点时间
*/
@Column
(
name
=
"active_location_date"
)
private
Date
activeLocationDate
;
/**
* 激活上点经度
*/
@Column
(
name
=
"active_location_lng"
)
private
String
activeLocationLng
;
/**
* 激活上点纬度
*/
@Column
(
name
=
"active_location_lat"
)
private
String
activeLocationLat
;
/**
* 激活上点类型 0、GPS,1、基站
*/
@Column
(
name
=
"active_location_type"
)
private
Byte
activeLocationType
;
/**
* 激活上点地址
*/
@Column
(
name
=
"active_location_address"
)
private
String
activeLocationAddress
;
}
}
\ No newline at end of file
\ No newline at end of file
src/main/resources/config/generatorConfig.xml
View file @
2e6e2b2
...
@@ -37,9 +37,9 @@
...
@@ -37,9 +37,9 @@
</commentGenerator>
</commentGenerator>
<!-- jdbc连接-->
<!-- jdbc连接-->
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
connectionURL=
"jdbc:mysql://192.168.3.
222:3307
/neshield?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
connectionURL=
"jdbc:mysql://192.168.3.
190:3306
/neshield?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
userId=
"
biz_neshield
"
userId=
"
dev_user
"
password=
"
9USarBaG
"
>
password=
"
df234fl
"
>
<!--防止生成其他库同名表-->
<!--防止生成其他库同名表-->
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
</jdbcConnection>
</jdbcConnection>
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
</javaClientGenerator>
</javaClientGenerator>
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<table
tableName=
"t_vehicle"
domainObjectName=
"Vehicle"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<!-- <table tableName="t_vehicle" domainObjectName="Vehicle" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>-->
<table
tableName=
"t_vehicle_device"
domainObjectName=
"VehicleDevice"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
\ No newline at end of file
\ No newline at end of file
src/main/resources/mapper/VehicleDeviceMapper.xml
View file @
2e6e2b2
...
@@ -5,33 +5,38 @@
...
@@ -5,33 +5,38 @@
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"vehicle_id"
jdbcType=
"INTEGER"
property=
"vehicleId"
/>
<result
column=
"vehicle_id"
jdbcType=
"INTEGER"
property=
"vehicleId"
/>
<result
column=
"sn"
jdbcType=
"VARCHAR"
property=
"sn"
/>
<result
column=
"sn"
jdbcType=
"VARCHAR"
property=
"sn"
/>
<result
column=
"bind_status"
jdbcType=
"TINYINT"
property=
"bindStatus"
/>
<result
column=
"bind_status"
jdbcType=
"TINYINT"
property=
"bindStatus"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"trial_type"
jdbcType=
"TINYINT"
property=
"trialType"
/>
<result
column=
"trial_type"
jdbcType=
"TINYINT"
property=
"trialType"
/>
<result
column=
"his_type"
jdbcType=
"TINYINT"
property=
"hisType"
/>
<result
column=
"his_type"
jdbcType=
"TINYINT"
property=
"hisType"
/>
<result
column=
"wire_type"
jdbcType=
"TINYINT"
property=
"wireType"
/>
<result
column=
"wire_type"
jdbcType=
"TINYINT"
property=
"wireType"
/>
<result
column=
"active_location_date"
jdbcType=
"TIMESTAMP"
property=
"activeLocationDate"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"active_location_lng"
jdbcType=
"VARCHAR"
property=
"activeLocationLng"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"active_location_lat"
jdbcType=
"VARCHAR"
property=
"activeLocationLat"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"active_location_type"
jdbcType=
"TINYINT"
property=
"activeLocationType"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
<result
column=
"active_location_address"
jdbcType=
"VARCHAR"
property=
"activeLocationAddress"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
</resultMap>
</resultMap>
<resultMap
id=
"activeNumberMap"
type=
"HashMap"
>
<result
property=
"allActiveNumber"
jdbcType=
"INTEGER"
column=
"allActiveNumber"
/>
<result
property=
"activeNumForToday"
jdbcType=
"VARCHAR"
column=
"activeNumForToday"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
id, vehicle_id, sn, bind_status, trial_type, his_type, wire_type, del_flag, created_date, created_by, updated_date,
id, vehicle_id, sn, bind_status, trial_type, his_type, wire_type, active_location_date,
updated_by
active_location_lng, active_location_lat, active_location_type, active_location_address,
del_flag, created_date, created_by, updated_date, updated_by
</sql>
</sql>
<resultMap
id=
"activeNumberMap"
type=
"HashMap"
>
<result
column=
"allActiveNumber"
jdbcType=
"INTEGER"
property=
"allActiveNumber"
/>
<result
column=
"activeNumForToday"
jdbcType=
"VARCHAR"
property=
"activeNumForToday"
/>
</resultMap>
<sql
id=
"common_where_if_condition"
>
<sql
id=
"common_where_if_condition"
>
<if
test=
"vehicleDevice.sn !=null and vehicleDevice.sn != ''"
>
<if
test=
"vehicleDevice.sn !=null and vehicleDevice.sn != ''"
>
and tvd.sn=#{vehicleDevice.sn}
and tvd.sn=#{vehicleDevice.sn}
...
@@ -46,7 +51,7 @@
...
@@ -46,7 +51,7 @@
<select
id=
"selectBySnAndBindStatus"
resultMap=
"BaseResultMap"
>
<select
id=
"selectBySnAndBindStatus"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_vehicle_device tvd
from t_vehicle_device tvd
where tvd.del_flag = 0
where tvd.del_flag = 0
and tvd.sn = #{sn}
and tvd.sn = #{sn}
...
@@ -55,7 +60,7 @@
...
@@ -55,7 +60,7 @@
<select
id=
"selectBindDeviceByVehicleId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectBindDeviceByVehicleId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_vehicle_device tvd
from t_vehicle_device tvd
where tvd.del_flag = 0
where tvd.del_flag = 0
and tvd.vehicle_id = #{vehicleId}
and tvd.vehicle_id = #{vehicleId}
...
@@ -64,7 +69,7 @@
...
@@ -64,7 +69,7 @@
<select
id=
"selectAndBindDeviceByVehicleId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectAndBindDeviceByVehicleId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_vehicle_device tvd
from t_vehicle_device tvd
where tvd.bind_status = 1
where tvd.bind_status = 1
and tvd.vehicle_id = #{vehicleId}
and tvd.vehicle_id = #{vehicleId}
...
@@ -72,7 +77,7 @@
...
@@ -72,7 +77,7 @@
<select
id=
"selectVehicleDeviceByUserId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectVehicleDeviceByUserId"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_vehicle_device tvd
from t_vehicle_device tvd
where tvd.del_flag = 0
where tvd.del_flag = 0
and bind_status = 1
and bind_status = 1
...
@@ -126,7 +131,7 @@
...
@@ -126,7 +131,7 @@
<select
id=
"getVehicleDeviceByVehicleAndSn"
resultMap=
"BaseResultMap"
>
<select
id=
"getVehicleDeviceByVehicleAndSn"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from t_vehicle_device tvd
from t_vehicle_device tvd
where tvd.sn=#{sn}
where tvd.sn=#{sn}
and tvd.vehicle_id=#{vehicleId}
and tvd.vehicle_id=#{vehicleId}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment