| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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.goafanti.common.dao.TOrderApprovalMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderApproval">
- <id property="id" column="id" jdbcType="INTEGER"/>
- <result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
- <result property="type" column="type" jdbcType="INTEGER"/>
- <result property="typeExplain" column="type_explain" jdbcType="VARCHAR"/>
- </resultMap>
- <sql id="Base_Column_List">
- id,order_no,type,
- type_explain
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_order_approval
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from t_order_approval
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderApproval" useGeneratedKeys="true">
- insert into t_order_approval
- ( id,order_no,type
- ,type_explain)
- values (#{id,jdbcType=INTEGER},#{orderNo,jdbcType=VARCHAR},#{type,jdbcType=INTEGER}
- ,#{typeExplain,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderApproval" useGeneratedKeys="true">
- insert into t_order_approval
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="orderNo != null">order_no,</if>
- <if test="type != null">type,</if>
- <if test="typeExplain != null">type_explain,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id,jdbcType=INTEGER},</if>
- <if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
- <if test="type != null">#{type,jdbcType=INTEGER},</if>
- <if test="typeExplain != null">#{typeExplain,jdbcType=VARCHAR},</if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderApproval">
- update t_order_approval
- <set>
- <if test="orderNo != null">
- order_no = #{orderNo,jdbcType=VARCHAR},
- </if>
- <if test="type != null">
- type = #{type,jdbcType=INTEGER},
- </if>
- <if test="typeExplain != null">
- type_explain = #{typeExplain,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderApproval">
- update t_order_approval
- set
- order_no = #{orderNo,jdbcType=VARCHAR},
- type = #{type,jdbcType=INTEGER},
- type_explain = #{typeExplain,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <delete id="deleteByOderNo">
- delete from t_order_approval
- where order_no= #{orderNo}
- </delete>
- <select id="selectByOrderNo" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_order_approval
- where order_no= #{orderNo}
- </select>
- </mapper>
|