Commit 2e6e2b27 by 杨林龙

V1.7.0需求开发

1 parent d678a06f
......@@ -251,13 +251,13 @@
</dependencies>
<configuration>
<!--username-->
<username>biz_neshield</username>
<username>dev_user</username>
<!--password-->
<password>9USarBaG</password>
<password>df234fl</password>
<!--driver-->
<driverClassName>com.mysql.cj.jdbc.Driver</driverClassName>
<!--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>
<!--打开文件输出目录-->
......
......@@ -5,6 +5,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;
/**
* 车辆设备绑定关系
......@@ -47,4 +48,33 @@ public class VehicleDevice extends BaseEntity {
@Column(name = "wire_type")
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
......@@ -37,9 +37,9 @@
</commentGenerator>
<!-- jdbc连接-->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.3.222:3307/neshield?serverTimeZone=Shanghai&amp;useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false"
userId="biz_neshield"
password="9USarBaG">
connectionURL="jdbc:mysql://192.168.3.190:3306/neshield?serverTimeZone=Shanghai&amp;useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false"
userId="dev_user"
password="df234fl">
<!--防止生成其他库同名表-->
<property name="nullCatalogMeansCurrent" value="true"/>
</jdbcConnection>
......@@ -68,6 +68,7 @@
</javaClientGenerator>
<!-- 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>
</generatorConfiguration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.glsx.admin.modules.mapper.VehicleDeviceMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.admin.modules.entity.VehicleDevice">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="vehicle_id" jdbcType="INTEGER" property="vehicleId"/>
<result column="sn" jdbcType="VARCHAR" property="sn"/>
<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="his_type" jdbcType="TINYINT" property="hisType"/>
<result column="wire_type" jdbcType="TINYINT" property="wireType"/>
<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 id="BaseResultMap" type="cn.com.glsx.admin.modules.entity.VehicleDevice">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="vehicle_id" jdbcType="INTEGER" property="vehicleId" />
<result column="sn" jdbcType="VARCHAR" property="sn" />
<result column="bind_status" jdbcType="TINYINT" property="bindStatus" />
<result column="trial_type" jdbcType="TINYINT" property="trialType" />
<result column="his_type" jdbcType="TINYINT" property="hisType" />
<result column="wire_type" jdbcType="TINYINT" property="wireType" />
<result column="active_location_date" jdbcType="TIMESTAMP" property="activeLocationDate" />
<result column="active_location_lng" jdbcType="VARCHAR" property="activeLocationLng" />
<result column="active_location_lat" jdbcType="VARCHAR" property="activeLocationLat" />
<result column="active_location_type" jdbcType="TINYINT" property="activeLocationType" />
<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>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, vehicle_id, sn, bind_status, trial_type, his_type, wire_type, active_location_date,
active_location_lng, active_location_lat, active_location_type, active_location_address,
del_flag, created_date, created_by, updated_date, updated_by
</sql>
<resultMap id="activeNumberMap" type="HashMap">
<result property="allActiveNumber" jdbcType="INTEGER" column="allActiveNumber"/>
<result property="activeNumForToday" jdbcType="VARCHAR" column="activeNumForToday"/>
<result column="allActiveNumber" jdbcType="INTEGER" property="allActiveNumber" />
<result column="activeNumForToday" jdbcType="VARCHAR" property="activeNumForToday" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, vehicle_id, sn, bind_status, trial_type, his_type, wire_type, del_flag, created_date, created_by, updated_date,
updated_by
</sql>
<sql id="common_where_if_condition">
<if test="vehicleDevice.sn !=null and vehicleDevice.sn != ''">
and tvd.sn=#{vehicleDevice.sn}
......@@ -46,7 +51,7 @@
<select id="selectBySnAndBindStatus" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
<include refid="Base_Column_List" />
from t_vehicle_device tvd
where tvd.del_flag = 0
and tvd.sn = #{sn}
......@@ -55,7 +60,7 @@
<select id="selectBindDeviceByVehicleId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
<include refid="Base_Column_List" />
from t_vehicle_device tvd
where tvd.del_flag = 0
and tvd.vehicle_id = #{vehicleId}
......@@ -64,7 +69,7 @@
<select id="selectAndBindDeviceByVehicleId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
<include refid="Base_Column_List" />
from t_vehicle_device tvd
where tvd.bind_status = 1
and tvd.vehicle_id = #{vehicleId}
......@@ -72,7 +77,7 @@
<select id="selectVehicleDeviceByUserId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
<include refid="Base_Column_List" />
from t_vehicle_device tvd
where tvd.del_flag = 0
and bind_status = 1
......@@ -126,7 +131,7 @@
<select id="getVehicleDeviceByVehicleAndSn" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
<include refid="Base_Column_List" />
from t_vehicle_device tvd
where tvd.sn=#{sn}
and tvd.vehicle_id=#{vehicleId}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!