QualityCheckMapper.xml
1.33 KB
<?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>
</mapper>