ElectricInStoreMapper.xml
3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?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.stdinterface.modules.mapper.ElectricInStoreMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.stdinterface.modules.entity.ElectricInStoreDrive">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="sn" column="sn" jdbcType="VARCHAR"/>
<result property="fenceId" column="fence_id" jdbcType="INTEGER"/>
<result property="sveSystemId" column="sve_system_id" jdbcType="INTEGER"/>
<result property="positionState" column="position_state" jdbcType="TINYINT"/>
<result property="gpsState" column="gps_state" jdbcType="TINYINT"/>
<result property="gpsTime" column="gps_time" jdbcType="TIMESTAMP"/>
<result property="vdId" jdbcType="INTEGER" column="vd_id"/>
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
<result property="updatedTime" column="updated_time" jdbcType="TIMESTAMP"/>
</resultMap>
<resultMap id="ElectricInStoreMap" type="cn.com.glsx.stdinterface.dto.ElectricInStoreDto">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="sn" column="sn" jdbcType="VARCHAR"/>
<result property="fenceId" column="fence_id" jdbcType="INTEGER"/>
<result property="sveSystemId" column="sve_system_id" jdbcType="INTEGER"/>
<result property="positionState" column="position_state" jdbcType="TINYINT"/>
<result property="gpsState" column="gps_state" jdbcType="TINYINT"/>
<result property="gpsTime" column="gps_time" jdbcType="TIMESTAMP"/>
<result property="vdId" jdbcType="INTEGER" column="vd_id"/>
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
<result property="updatedTime" column="updated_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,sn,fence_id,
sve_system_id,position_state,gps_state,
gps_time,vd_id ,created_time,updated_time
</sql>
<select id="getElectricInStore" resultMap="ElectricInStoreMap">
select *
from t_electric_instore_drive teid
where teid.fence_id=#{fenceId}
and teid.sn=#{sn}
and teid.gps_time=#{gpsTime}
</select>
<select id="getAllTrialDriveSn" resultType="java.lang.String">
select td.sn
from t_device td
left join t_vehicle_device tvd on tvd.sn = td.sn
where tvd.trial_type = 1
and td.activate_time <= #{nowDayFormat}
</select>
<select id="getBigDataSn" resultType="java.lang.String">
select teid.sn
from t_electric_instore_drive teid
where left(teid.gps_time,10) = #{yesterDayFormat}
</select>
<select id="getAllSnVdIdMap" resultType="cn.com.glsx.stdinterface.modules.entity.VehicleDevice">
select sn ,id
from t_vehicle_device
where bind_status = 1
and trial_type = 1
and del_flag = 0
</select>
</mapper>