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