AbnormalOrderMapper.xml
1.53 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.yoho.order.dal.AbnormalOrderMapper">
<resultMap id="BaseResultMap" type="com.yoho.order.model.AbnormalOrder">
<result column="id" property="id" jdbcType="INTEGER" />
<result column="order_code" property="orderCode" jdbcType="BIGINT" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="operate_uid" property="operateUid" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List">
id, order_code, type, create_time, operate_uid, update_time
</sql>
<insert id="insert" parameterType="com.yoho.order.model.AbnormalOrder">
insert into abnormal_order(order_code, type, create_time, operate_uid, update_time)
values (#{orderCode}, #{type}, #{createTime}, #{operateUid}, #{updateTime})
</insert>
<select id="selectByOrderCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from abnormal_order where order_code = #{orderCode}
</select>
<update id="update" parameterType="com.yoho.order.model.AbnormalOrder">
update abnormal_order set type=#{type}, operate_uid=#{operateUid}, update_time=#{updateTime}
where order_code=#{orderCode}
</update>
</mapper>