SellerGoodsStatusFlowMapper.xml 1.59 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.SellerGoodsStatusFlowMapper">
  <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.SellerGoodsStatusFlow">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="skup" jdbcType="INTEGER" property="skup" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="create_time" jdbcType="INTEGER" property="createTime" />
    <result column="order_code" jdbcType="BIGINT" property="orderCode" />
  </resultMap>
  <sql id="Base_Column_List">
    id, skup, status, create_time, order_code
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from seller_goods_status_flow
    where id = #{id,jdbcType=INTEGER}
  </select>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.SellerGoodsStatusFlow" useGeneratedKeys="true">
    insert into seller_goods_status_flow (skup, status, create_time, order_code
      )
    values (#{skup,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT}
      )
  </insert>


  <select id="selectByOrderCode" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from seller_goods_status_flow
    where order_code =  #{orderCode,jdbcType=BIGINT}
    limit 1
  </select>

</mapper>