| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <?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.ExpenseAccountLogMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.ExpenseAccountLog">
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="eaid" jdbcType="INTEGER" property="eaid" />
- <result column="process_status" jdbcType="INTEGER" property="processStatus" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="remarks" jdbcType="VARCHAR" property="remarks" />
- <result column="auditor" jdbcType="VARCHAR" property="auditor" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="show_status" jdbcType="INTEGER" property="showStatus" />
- </resultMap>
- <sql id="Base_Column_List">
- id, eaid, process_status, `status`, remarks, auditor, create_time, show_status
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from expense_account_log
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from expense_account_log
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountLog" useGeneratedKeys="true">
- insert into expense_account_log (eaid, process_status, `status`,
- remarks, auditor, create_time,
- show_status)
- values (#{eaid,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
- #{remarks,jdbcType=VARCHAR}, #{auditor,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{showStatus,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountLog" useGeneratedKeys="true">
- insert into expense_account_log
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="eaid != null">
- eaid,
- </if>
- <if test="processStatus != null">
- process_status,
- </if>
- <if test="status != null">
- `status`,
- </if>
- <if test="remarks != null">
- remarks,
- </if>
- <if test="auditor != null">
- auditor,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="showStatus != null">
- show_status,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="eaid != null">
- #{eaid,jdbcType=INTEGER},
- </if>
- <if test="processStatus != null">
- #{processStatus,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- #{status,jdbcType=INTEGER},
- </if>
- <if test="remarks != null">
- #{remarks,jdbcType=VARCHAR},
- </if>
- <if test="auditor != null">
- #{auditor,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="showStatus != null">
- #{showStatus,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccountLog">
- update expense_account_log
- <set>
- <if test="eaid != null">
- eaid = #{eaid,jdbcType=INTEGER},
- </if>
- <if test="processStatus != null">
- process_status = #{processStatus,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- `status` = #{status,jdbcType=INTEGER},
- </if>
- <if test="remarks != null">
- remarks = #{remarks,jdbcType=VARCHAR},
- </if>
- <if test="auditor != null">
- auditor = #{auditor,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="showStatus != null">
- show_status = #{showStatus,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ExpenseAccountLog">
- update expense_account_log
- set eaid = #{eaid,jdbcType=INTEGER},
- process_status = #{processStatus,jdbcType=INTEGER},
- `status` = #{status,jdbcType=INTEGER},
- remarks = #{remarks,jdbcType=VARCHAR},
- auditor = #{auditor,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- show_status = #{showStatus,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <select id="selectByEaid" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountLog">
- select a.id,a.eaid ,a.status ,a.remarks ,a.auditor ,b.name auditorName,a.process_status processStatus,
- date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,a.create_time createTime,a.show_status showStatus
- from expense_account_log a left join admin b on a.auditor =b.id
- where a.eaid= #{eaid}
- order by a.create_time,process_status
- </select>
- <update id="updateUseLogByUseId" parameterType="java.lang.Integer">
- update expense_account_log
- set eaid = #{id}
- where eaid = #{useId}
- </update>
- <delete id="deleteByeaid" parameterType="java.lang.Integer">
- delete from expense_account_log
- where eaid = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insertBatch" >
- insert into expense_account_log (eaid, process_status, `status`,
- remarks, auditor, create_time,show_status
- )
- values
- <foreach collection="list" item="item" index="index" separator=",">
- (#{item.eaid,jdbcType=INTEGER}, #{item.processStatus,jdbcType=INTEGER}, #{item.status,jdbcType=INTEGER},
- #{item.remarks,jdbcType=VARCHAR}, #{item.auditor,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
- #{item.showStatus,jdbcType=INTEGER})
- </foreach>
- </insert>
- </mapper>
|