<?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.VoucherSubjectFeeLogMapper">
|
|
<resultMap type="com.ruoyi.cwgl.domain.VoucherSubjectFeeLog" id="VoucherSubjectFeeLogResult">
|
<result property="id" column="id" />
|
<result property="subjectId" column="subject_id" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="operation" column="operation" />
|
</resultMap>
|
|
<sql id="selectVoucherSubjectFeeLogVo">
|
select thisTab.id, thisTab.subject_id, thisTab.create_by, thisTab.create_time, thisTab.operation from voucher_subject_fee_log AS thisTab
|
</sql>
|
<sql id="selectVoucherSubjectFeeLogVoCount">
|
select count(0) from voucher_subject_fee_log as thisTab
|
</sql>
|
|
<sql id="whereCondition">
|
<if test="subjectId != null "> and thisTab.subject_id = #{subjectId}</if>
|
<if test="operation != null and operation != ''"> and thisTab.operation = #{operation}</if>
|
</sql>
|
|
<!--查询-->
|
<select id="selectVoucherSubjectFeeLogById" parameterType="Integer" resultMap="VoucherSubjectFeeLogResult">
|
<include refid="selectVoucherSubjectFeeLogVo"/>
|
where id = #{id}
|
</select>
|
|
<select id="selectVoucherSubjectFeeLogCount" parameterType="com.ruoyi.cwgl.domain.VoucherSubjectFeeLog" resultType="int">
|
<include refid="selectVoucherSubjectFeeLogVoCount"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
</select>
|
|
<select id="selectVoucherSubjectFeeLogList" parameterType="com.ruoyi.cwgl.domain.VoucherSubjectFeeLog" resultMap="VoucherSubjectFeeLogResult">
|
<include refid="selectVoucherSubjectFeeLogVo"/>
|
<where>
|
<include refid="whereCondition"/>
|
</where>
|
order by thisTab.id desc
|
</select>
|
|
<!-- 新增 -->
|
<insert id="insertVoucherSubjectFeeLog" parameterType="com.ruoyi.cwgl.domain.VoucherSubjectFeeLog" useGeneratedKeys="true" keyProperty="id">
|
insert into voucher_subject_fee_log
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="subjectId != null">subject_id,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="operation != null">operation,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="subjectId != null">#{subjectId},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="operation != null">#{operation},</if>
|
</trim>
|
</insert>
|
|
<insert id="insertVoucherSubjectFeeLogBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
insert into voucher_subject_fee_log
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
id,subject_id,create_by,create_time,operation,
|
</trim>
|
<foreach item="item" index="index" collection="list" separator=",">
|
<trim prefix="(" suffix=") " suffixOverrides=",">
|
#{item.id},#{item.subjectId},#{item.createBy},#{item.createTime},#{item.operation},
|
</trim>
|
</foreach>
|
</insert>
|
|
<!-- 修改 -->
|
<update id="updateVoucherSubjectFeeLog" parameterType="com.ruoyi.cwgl.domain.VoucherSubjectFeeLog">
|
update voucher_subject_fee_log
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="operation != null">operation = #{operation},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
<!-- 修改 -->
|
<update id="updateVoucherSubjectFeeLogBatch" parameterType="java.util.List">
|
<foreach collection="list" item="item" index="index" separator=";">
|
update voucher_subject_fee_log
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="item.subjectId != null">subject_id = #{item.subjectId},</if>
|
<if test="item.createBy != null">create_by = #{item.createBy},</if>
|
<if test="item.createTime != null">create_time = #{item.createTime},</if>
|
<if test="item.operation != null">operation = #{item.operation},</if>
|
</trim>
|
where id = #{item.id}
|
</foreach>
|
</update>
|
|
<!--删除-->
|
<delete id="deleteVoucherSubjectFeeLogById" parameterType="Integer">
|
delete from voucher_subject_fee_log where id = #{id}
|
</delete>
|
<delete id="deleteVoucherSubjectFeeLogByIds" parameterType="Integer">
|
delete from voucher_subject_fee_log where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
</mapper>
|