AddressMapper.xml 1.41 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.huaheng.pc.config.address.mapper.AddressMapper">
  <resultMap id="BaseResultMap" type="com.huaheng.pc.config.address.domain.Address">
    <!--@mbg.generated-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
<!--    <result column="number" jdbcType="INTEGER" property="number" />-->
    <result column="param" jdbcType="VARCHAR" property="param" />
    <result column="url" jdbcType="VARCHAR" property="url" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, warehouseCode,number, param,url
  </sql>


  <select id="selectEntity"  resultType="com.huaheng.pc.config.address.domain.Address">
    select id,warehouseCode,param,url,number from address
    <where>
      <if test="id != null">
        AND id = #{id}
      </if>
      <if test="warehouseCode != null and warehouseCode != ''">
        AND warehouseCode = #{warehouseCode}
      </if>
      <if test="param != null and param != ''">
        AND param = #{param}
      </if>
      <if test="url != null and url != ''">
        AND url = #{url}
      </if>
      <if test="number != null and number != ''">
        AND number = #{number}
      </if>
    </where>
    limit 1
  </select>
</mapper>