|
|
@@ -0,0 +1,75 @@
|
|
|
+<?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.Long" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_order_approval
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ 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>
|
|
|
+</mapper>
|