| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?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>
|