wujianwei
2026-01-13 486b62e149dab20c2bbfcdd6f262dd8f88a317d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?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.PayableFeeManagementLogMapper">
 
    <resultMap type="com.ruoyi.cwgl.domain.PayableFeeManagementLog" id="PayableFeeManagementLogResult">
        <result property="id"    column="id"    />
        <result property="payableFeeId"    column="payable_fee_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="selectPayableFeeManagementLogVo">
        select thisTab.id, thisTab.payable_fee_id, thisTab.operator, thisTab.operation_time, thisTab.operation_desc, thisTab.create_time from payable_fee_management_log AS thisTab
    </sql>
    <sql id="selectPayableFeeManagementLogVoCount">
        select count(0) from payable_fee_management_log as thisTab
    </sql>
 
    <sql id="whereCondition">
        <if test="payableFeeId != null "> and thisTab.payable_fee_id = #{payableFeeId}</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="selectPayableFeeManagementLogById" parameterType="Integer" resultMap="PayableFeeManagementLogResult">
        <include refid="selectPayableFeeManagementLogVo"/>
        where id = #{id}
    </select>
 
    <select id="selectPayableFeeManagementLogCount" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagementLog" resultType="int">
        <include refid="selectPayableFeeManagementLogVoCount"/>
        <where>
            <include refid="whereCondition"/>
        </where>
    </select>
 
    <select id="selectPayableFeeManagementLogList" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagementLog" resultMap="PayableFeeManagementLogResult">
        <include refid="selectPayableFeeManagementLogVo"/>
        <where>
            <include refid="whereCondition"/>
        </where>
        order by thisTab.id desc
    </select>
 
    <!-- 新增 -->
    <insert id="insertPayableFeeManagementLog" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagementLog"  useGeneratedKeys="true" keyProperty="id">
        insert into payable_fee_management_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="payableFeeId != null">payable_fee_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="payableFeeId != null">#{payableFeeId},</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="insertPayableFeeManagementLogBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into payable_fee_management_log
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,payable_fee_id,operator,operation_time,operation_desc,create_time,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.payableFeeId},#{item.operator},#{item.operationTime},#{item.operationDesc},#{item.createTime},
            </trim>
        </foreach>
    </insert>
 
    <!-- 修改 -->
    <update id="updatePayableFeeManagementLog" parameterType="com.ruoyi.cwgl.domain.PayableFeeManagementLog">
        update payable_fee_management_log
        <trim prefix="SET" suffixOverrides=",">
            <if test="payableFeeId != null">payable_fee_id = #{payableFeeId},</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="updatePayableFeeManagementLogBatch" parameterType="java.util.List">
        <foreach collection="list" item="item" index="index" separator=";">
            update payable_fee_management_log
            <trim prefix="SET" suffixOverrides=",">
                <if test="item.payableFeeId != null">payable_fee_id = #{item.payableFeeId},</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="deletePayableFeeManagementLogById" parameterType="Integer">
        delete from payable_fee_management_log where id = #{id}
    </delete>
    <delete id="deletePayableFeeManagementLogByIds" parameterType="Integer">
        delete from payable_fee_management_log where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
 
</mapper>