BuyerOrderStatusFlowMapper.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.BuyerOrderStatusFlowMapper">
  <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.BuyerOrderStatusFlow">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="order_code" jdbcType="BIGINT" property="orderCode" />
    <result column="status" jdbcType="TINYINT" property="status" />
    <result column="create_time" jdbcType="INTEGER" property="createTime" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    id, order_code, status, create_time, remark
  </sql>

  <insert id="insert" parameterType="com.yohoufo.dal.order.model.BuyerOrderStatusFlow">
    insert into buyer_order_status_flow ( order_code, status,create_time, remark)
    values ( #{orderCode,jdbcType=BIGINT}, #{status,jdbcType=TINYINT},#{createTime,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR})
  </insert>

  <select id="selectByStatus" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from buyer_order_status_flow
    where order_code = #{orderCode,jdbcType=BIGINT}
    and status = #{status,jdbcType=TINYINT}
    limit 1
  </select>

</mapper>