QualityCheckMapper.xml
1.79 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="com.yohoufo.dal.order.QualityCheckMapper">
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.QualityCheck">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_code" jdbcType="BIGINT" property="orderCode" />
<result column="check_text" jdbcType="VARCHAR" property="checkText" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="image_url" jdbcType="VARCHAR" property="imageUrl" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List">
id, order_code, check_text, type, status, image_url,create_time,update_time
</sql>
<select id="selectByOrderCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from quality_check where order_code = #{orderCode}
</select>
<update id="updateByOrderCode">
update quality_check
set status = #{status},update_time=#{updateTime}
where order_code = #{orderCode}
</update>
<insert id="insert" parameterType="com.yohoufo.dal.order.model.QualityCheck">
insert into quality_check (id, order_code, check_text,
type, status, image_url,create_time,update_time
)
values (#{id,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT}, #{checkText,jdbcType=VARCHAR},
#{type,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{imageUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}
)
</insert>
</mapper>