cgf
2025-08-23 9ec0a61f90ac2464eebc643bfe2d93ac9ba6e569
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
<?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="smallProgramAdvertHistoryServiceDaoImpl">
 
    <sql id="Base_Column_List">
        id,
        adverts_id as 'advertsId',
        content,
        operation,
        operate_time as 'operateTime',
        operate_user_id as 'operateUserId'
    </sql>
 
    <select id="selectHistoryByAdvertsId" parameterType="Map" resultType="Map">
        select
        <include refid="Base_Column_List" />
        from business_small_program_advertisement_history
        where adverts_id = #{advertsId}
    </select>
 
    <insert id="saveAdvertsHistory" parameterType="Map">
        insert into business_small_program_advertisement_history
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="advertsId != null">
                adverts_id,
            </if>
            <if test="content != null">
                content,
            </if>
            <if test="operation != null">
                operation,
            </if>
            <if test="operateTime != null">
                operate_time,
            </if>
            <if test="operateUserId != null">
                operate_user_id,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=VARCHAR},
            </if>
            <if test="advertsId != null">
                #{advertsId,jdbcType=VARCHAR},
            </if>
            <if test="content != null">
                #{content,jdbcType=VARCHAR},
            </if>
            <if test="operation != null">
                #{operation,jdbcType=VARCHAR},
            </if>
            <if test="operateTime != null">
                #{operateTime,jdbcType=TIMESTAMP},
            </if>
            <if test="operateUserId != null">
                #{operateUserId,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
 
 
</mapper>