DevSplitMapper.xml
1.73 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
<?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.DevSplitMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.stdinterface.modules.entity.DevSplit">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="vid" jdbcType="INTEGER" property="vid"/>
<result column="vin" jdbcType="VARCHAR" property="vin"/>
<result column="split_flag" jdbcType="TINYINT" property="splitFlag"/>
<result column="begin_time" jdbcType="TIMESTAMP" property="beginTime"/>
<result column="del_flag" jdbcType="INTEGER" 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, vid, vin, split_flag, begin_time, del_flag, created_date, created_by, updated_date, updated_by
</sql>
<update id="logicDeleteDevsplit">
UPDATE t_dev_split SET del_flag = -1 WHERE del_flag = 0;
</update>
<select id="findByVidAndBeginTime" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_dev_split WHERE vid = #{vid}
AND DATE_FORMAT(begin_time, '%Y-%m-%d')= #{beginTime} AND del_flag = 0
ORDER BY id DESC LIMIT 1;
</select>
</mapper>