|
|
@@ -0,0 +1,122 @@
|
|
|
+<?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.ExpenseAccountAccountsMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.ExpenseAccountAccounts">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
+ <result column="bank" jdbcType="VARCHAR" property="bank" />
|
|
|
+ <result column="accounts" jdbcType="VARCHAR" property="accounts" />
|
|
|
+ <result column="open_bank" jdbcType="VARCHAR" property="openBank" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, aid, `name`, bank, accounts, open_bank, `status`, create_time
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from expense_account_accounts
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from expense_account_accounts
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountAccounts" useGeneratedKeys="true">
|
|
|
+ insert into expense_account_accounts (aid, `name`, bank,
|
|
|
+ accounts, open_bank, `status`,
|
|
|
+ create_time)
|
|
|
+ values (#{aid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{bank,jdbcType=VARCHAR},
|
|
|
+ #{accounts,jdbcType=VARCHAR}, #{openBank,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountAccounts" useGeneratedKeys="true">
|
|
|
+ insert into expense_account_accounts
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ `name`,
|
|
|
+ </if>
|
|
|
+ <if test="bank != null">
|
|
|
+ bank,
|
|
|
+ </if>
|
|
|
+ <if test="accounts != null">
|
|
|
+ accounts,
|
|
|
+ </if>
|
|
|
+ <if test="openBank != null">
|
|
|
+ open_bank,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status`,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bank != null">
|
|
|
+ #{bank,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="accounts != null">
|
|
|
+ #{accounts,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="openBank != null">
|
|
|
+ #{openBank,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccountAccounts">
|
|
|
+ update expense_account_accounts
|
|
|
+ <set>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ `name` = #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="bank != null">
|
|
|
+ bank = #{bank,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="accounts != null">
|
|
|
+ accounts = #{accounts,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="openBank != null">
|
|
|
+ open_bank = #{openBank,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status` = #{status,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.ExpenseAccountAccounts">
|
|
|
+ update expense_account_accounts
|
|
|
+ set aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ `name` = #{name,jdbcType=VARCHAR},
|
|
|
+ bank = #{bank,jdbcType=VARCHAR},
|
|
|
+ accounts = #{accounts,jdbcType=VARCHAR},
|
|
|
+ open_bank = #{openBank,jdbcType=VARCHAR},
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|