|
|
@@ -0,0 +1,204 @@
|
|
|
+<?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.ExpenseAccountMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.ExpenseAccount">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="prid" jdbcType="INTEGER" property="prid" />
|
|
|
+ <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
+ <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
+ <result column="aname" jdbcType="VARCHAR" property="aname" />
|
|
|
+ <result column="type" jdbcType="INTEGER" property="type" />
|
|
|
+ <result column="type_other" jdbcType="VARCHAR" property="typeOther" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
+ <result column="process_status" jdbcType="INTEGER" property="processStatus" />
|
|
|
+ <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
|
|
|
+ <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
|
|
|
+ <result column="apply_dep" jdbcType="VARCHAR" property="applyDep" />
|
|
|
+ <result column="pay_dep" jdbcType="VARCHAR" property="payDep" />
|
|
|
+ <result column="eaaid" jdbcType="INTEGER" property="eaaid" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, prid, order_no, aid, aname, `type`, type_other, `status`, process_status, total_amount,
|
|
|
+ attachment_url, apply_dep, pay_dep, eaaid, create_time
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from expense_account
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from expense_account
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
|
|
|
+ insert into expense_account (prid, order_no, aid,
|
|
|
+ aname, `type`, type_other,
|
|
|
+ `status`, process_status, total_amount,
|
|
|
+ attachment_url, apply_dep, pay_dep,
|
|
|
+ eaaid, create_time)
|
|
|
+ values (#{prid,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
+ #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{typeOther,jdbcType=VARCHAR},
|
|
|
+ #{status,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
|
|
|
+ #{attachmentUrl,jdbcType=VARCHAR}, #{applyDep,jdbcType=VARCHAR}, #{payDep,jdbcType=VARCHAR},
|
|
|
+ #{eaaid,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
|
|
|
+ insert into expense_account
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="prid != null">
|
|
|
+ prid,
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no,
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
+ <if test="aname != null">
|
|
|
+ aname,
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ `type`,
|
|
|
+ </if>
|
|
|
+ <if test="typeOther != null">
|
|
|
+ type_other,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status`,
|
|
|
+ </if>
|
|
|
+ <if test="processStatus != null">
|
|
|
+ process_status,
|
|
|
+ </if>
|
|
|
+ <if test="totalAmount != null">
|
|
|
+ total_amount,
|
|
|
+ </if>
|
|
|
+ <if test="attachmentUrl != null">
|
|
|
+ attachment_url,
|
|
|
+ </if>
|
|
|
+ <if test="applyDep != null">
|
|
|
+ apply_dep,
|
|
|
+ </if>
|
|
|
+ <if test="payDep != null">
|
|
|
+ pay_dep,
|
|
|
+ </if>
|
|
|
+ <if test="eaaid != null">
|
|
|
+ eaaid,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="prid != null">
|
|
|
+ #{prid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ #{orderNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aname != null">
|
|
|
+ #{aname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="typeOther != null">
|
|
|
+ #{typeOther,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="processStatus != null">
|
|
|
+ #{processStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="totalAmount != null">
|
|
|
+ #{totalAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="attachmentUrl != null">
|
|
|
+ #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="applyDep != null">
|
|
|
+ #{applyDep,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payDep != null">
|
|
|
+ #{payDep,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="eaaid != null">
|
|
|
+ #{eaaid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccount">
|
|
|
+ update expense_account
|
|
|
+ <set>
|
|
|
+ <if test="prid != null">
|
|
|
+ prid = #{prid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aname != null">
|
|
|
+ aname = #{aname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="typeOther != null">
|
|
|
+ type_other = #{typeOther,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="processStatus != null">
|
|
|
+ process_status = #{processStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="totalAmount != null">
|
|
|
+ total_amount = #{totalAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="attachmentUrl != null">
|
|
|
+ attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="applyDep != null">
|
|
|
+ apply_dep = #{applyDep,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="payDep != null">
|
|
|
+ pay_dep = #{payDep,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="eaaid != null">
|
|
|
+ eaaid = #{eaaid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ExpenseAccount">
|
|
|
+ update expense_account
|
|
|
+ set prid = #{prid,jdbcType=INTEGER},
|
|
|
+ order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ aname = #{aname,jdbcType=VARCHAR},
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
+ type_other = #{typeOther,jdbcType=VARCHAR},
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
+ process_status = #{processStatus,jdbcType=INTEGER},
|
|
|
+ total_amount = #{totalAmount,jdbcType=DECIMAL},
|
|
|
+ attachment_url = #{attachmentUrl,jdbcType=VARCHAR},
|
|
|
+ apply_dep = #{applyDep,jdbcType=VARCHAR},
|
|
|
+ pay_dep = #{payDep,jdbcType=VARCHAR},
|
|
|
+ eaaid = #{eaaid,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|