<?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.buy507.mall.mapper.OmsExpressCompanyMapper">
  <resultMap id="BaseResultMap" type="com.buy507.mall.model.OmsExpressCompany">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="sort" jdbcType="INTEGER" property="sort" />
   	<result column="status" jdbcType="INTEGER" property="status" typeHandler="org.apache.ibatis.type.EnumOrdinalTypeHandler" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="changer" jdbcType="VARCHAR" property="changer" />
    <result column="change_time" jdbcType="TIMESTAMP" property="changeTime" />
    <result column="creater" jdbcType="VARCHAR" property="creater" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  </resultMap>
  
  <select id="selectAll" resultMap="BaseResultMap">
    SELECT *
      FROM oms_express_company
  </select>
  
  <select id="selectOneByName" parameterType="java.lang.String" resultMap="BaseResultMap">
    SELECT *
      FROM oms_express_company
     WHERE name = #{name}
  </select>
  
</mapper>