<?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.ruoyi.cwgl.mapper.InvoiceManageLogMapper">
|
|
<resultMap type="com.ruoyi.cwgl.domain.InvoiceManageLog" id="InvoiceManageLogResult">
|
<result property="id" column="id" />
|
<result property="invoiceManageId" column="invoice_manage_id" />
|
<result property="operator" column="operator" />
|
<result property="operationTime" column="operation_time" />
|
<result property="operationDesc" column="operation_desc" />
|
<result property="createTime" column="create_time" />
|
</resultMap>
|
|
<sql id="selectInvoiceManageLogVo">
|
select thisTab.id, thisTab.invoice_manage_id, thisTab.operator, thisTab.operation_time, thisTab.operation_desc, thisTab.create_time from invoice_manage_log AS thisTab
|
</sql>
|
<sql id="selectInvoiceManageLogVoCount">
|
select count(0) from invoice_manage_log as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="invoiceManageId != null "> and thisTab.invoice_manage_id = #{invoiceManageId}</if>
|
<if test="operator != null and operator != ''"> and thisTab.operator = #{operator}</if>
|
<if test="operationTime != null "> and thisTab.operation_time = #{operationTime}</if>
|
<if test="operationDesc != null and operationDesc != ''"> and thisTab.operation_desc = #{operationDesc}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectInvoiceManageLogById" parameterType="Integer" resultMap="InvoiceManageLogResult">
|
<include refid="selectInvoiceManageLogVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectInvoiceManageLogCount" parameterType="com.ruoyi.cwgl.domain.InvoiceManageLog" resultType="int">
|
<include refid="selectInvoiceManageLogVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectInvoiceManageLogList" parameterType="com.ruoyi.cwgl.domain.InvoiceManageLog" resultMap="InvoiceManageLogResult">
|
<include refid="selectInvoiceManageLogVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertInvoiceManageLog" parameterType="com.ruoyi.cwgl.domain.InvoiceManageLog" useGeneratedKeys="true" keyProperty="id">
|
insert into invoice_manage_log
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="invoiceManageId != null">invoice_manage_id,</if>
|
<if test="operator != null and operator != ''">operator,</if>
|
<if test="operationTime != null">operation_time,</if>
|
<if test="operationDesc != null and operationDesc != ''">operation_desc,</if>
|
<if test="createTime != null">create_time,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="invoiceManageId != null">#{invoiceManageId},</if>
|
<if test="operator != null and operator != ''">#{operator},</if>
|
<if test="operationTime != null">#{operationTime},</if>
|
<if test="operationDesc != null and operationDesc != ''">#{operationDesc},</if>
|
<if test="createTime != null">#{createTime},</if>
|
</trim>
|
</insert>
|
|
<insert id="insertInvoiceManageLogBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into invoice_manage_log
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,invoice_manage_id,operator,operation_time,operation_desc,create_time,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.id},#{item.invoiceManageId},#{item.operator},#{item.operationTime},#{item.operationDesc},#{item.createTime},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateInvoiceManageLog" parameterType="com.ruoyi.cwgl.domain.InvoiceManageLog">
|
update invoice_manage_log
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="invoiceManageId != null">invoice_manage_id = #{invoiceManageId},</if>
|
<if test="operator != null and operator != ''">operator = #{operator},</if>
|
<if test="operationTime != null">operation_time = #{operationTime},</if>
|
<if test="operationDesc != null and operationDesc != ''">operation_desc = #{operationDesc},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateInvoiceManageLogBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update invoice_manage_log
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.invoiceManageId != null">invoice_manage_id = #{item.invoiceManageId},</if>
|
<if test="item.operator != null and item.operator != ''">operator = #{item.operator},</if>
|
<if test="item.operationTime != null">operation_time = #{item.operationTime},</if>
|
<if test="item.operationDesc != null and item.operationDesc != ''">operation_desc = #{item.operationDesc},</if>
|
<if test="item.createTime != null">create_time = #{item.createTime},</if>
|
</trim>
|
where id = #{item.id}
|
</foreach>
|
</update>
|
|
<!--删除-->
|
<delete id="deleteInvoiceManageLogById" parameterType="Integer">
|
delete from invoice_manage_log where id = #{id}
|
</delete>
|
<delete id="deleteInvoiceManageLogByIds" parameterType="Integer">
|
delete from invoice_manage_log where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|