NMMS_CUSTOM_WAYDECLARATIONMapper.xml 5.0 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.sunyo.wlpt.base.dao.NMMS_CUSTOM_WAYDECLARATIONMapper" >
  <resultMap id="BaseResultMap" type="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" >
    <result column="carrier" property="carrier" jdbcType="VARCHAR" />
    <result column="flightNo" property="flightno" jdbcType="VARCHAR" />
    <result column="flightDate" property="flightdate" jdbcType="DATE" />
    <result column="originStation" property="originstation" jdbcType="VARCHAR" />
    <result column="destinationStation" property="destinationstation" jdbcType="VARCHAR" />
    <result column="awba" property="awba" jdbcType="VARCHAR" />
    <result column="awbh" property="awbh" jdbcType="VARCHAR" />
    <result column="piece" property="piece" jdbcType="INTEGER" />
    <result column="weight" property="weight" jdbcType="DECIMAL" />
    <result column="customCode" property="customcode" jdbcType="VARCHAR" />
    <result column="acTime" property="actime" jdbcType="TIMESTAMP" />
    <result column="status" property="status" jdbcType="VARCHAR" />
    <result column="stype" property="stype" jdbcType="VARCHAR" />
  </resultMap>
  <insert id="insert" parameterType="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" >
    insert into NMMS_WAYDECLARATION (carrier, flightNo, flightDate, 
      originStation, destinationStation, awba, 
      awbh, piece, weight, 
      customCode, acTime, status, 
      stype)
    values (#{carrier,jdbcType=VARCHAR}, #{flightno,jdbcType=VARCHAR}, #{flightdate,jdbcType=DATE}, 
      #{originstation,jdbcType=VARCHAR}, #{destinationstation,jdbcType=VARCHAR}, #{awba,jdbcType=VARCHAR}, 
      #{awbh,jdbcType=VARCHAR}, #{piece,jdbcType=INTEGER}, #{weight,jdbcType=DECIMAL}, 
      #{customcode,jdbcType=VARCHAR}, #{actime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, 
      #{stype,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" >
    insert into NMMS_WAYDECLARATION
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="carrier != null" >
        carrier,
      </if>
      <if test="flightno != null" >
        flightNo,
      </if>
      <if test="flightdate != null" >
        flightDate,
      </if>
      <if test="originstation != null" >
        originStation,
      </if>
      <if test="destinationstation != null" >
        destinationStation,
      </if>
      <if test="awba != null" >
        awba,
      </if>
      <if test="awbh != null" >
        awbh,
      </if>
      <if test="piece != null" >
        piece,
      </if>
      <if test="weight != null" >
        weight,
      </if>
      <if test="customcode != null" >
        customCode,
      </if>
      <if test="actime != null" >
        acTime,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="stype != null" >
        stype,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="carrier != null" >
        #{carrier,jdbcType=VARCHAR},
      </if>
      <if test="flightno != null" >
        #{flightno,jdbcType=VARCHAR},
      </if>
      <if test="flightdate != null" >
        #{flightdate,jdbcType=DATE},
      </if>
      <if test="originstation != null" >
        #{originstation,jdbcType=VARCHAR},
      </if>
      <if test="destinationstation != null" >
        #{destinationstation,jdbcType=VARCHAR},
      </if>
      <if test="awba != null" >
        #{awba,jdbcType=VARCHAR},
      </if>
      <if test="awbh != null" >
        #{awbh,jdbcType=VARCHAR},
      </if>
      <if test="piece != null" >
        #{piece,jdbcType=INTEGER},
      </if>
      <if test="weight != null" >
        #{weight,jdbcType=DECIMAL},
      </if>
      <if test="customcode != null" >
        #{customcode,jdbcType=VARCHAR},
      </if>
      <if test="actime != null" >
        #{actime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null" >
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="stype != null" >
        #{stype,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="selectWaydeclaration" parameterType="com.sunyo.wlpt.base.model.NMMS_CUSTOM_WAYDECLARATION" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from NMMS_WAYDECLARATION
    where 1=1
    <if test="awba !=null and awba != ''">
      and awba=#{awba,jdbcType=VARCHAR}
    </if>
    <if test="carrier !=null and carrier !=''">
      AND carrier = #{carrier,jdbcType=VARCHAR}
    </if>
    <if test="flightno !=null and flightno !=''">
      AND flightNo = #{flightno,jdbcType=VARCHAR}
    </if>
    <if test="flightdate !=null">
      AND flightDate = #{flightdate,jdbcType=DATE}
    </if>
    <if test="status !=null and status !=''">
      AND status = #{status,jdbcType=VARCHAR}
    </if>
    <if test="stype !=null and stype !=''">
      AND stype = #{stype,jdbcType=VARCHAR}
    </if>
  </select>
</mapper>