1
zj
2025-04-18 924d1f5a68d424e963e45dd82652bc65c6d25bea
src/main/resources/mapper/SiteNewsMapper.xml
@@ -35,111 +35,6 @@
                content
    </sql>
    <insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.nq.pojo.SiteNews">
        INSERT INTO site_news
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test ='null != type'>
                type,
            </if>
            <if test ='null != title'>
                title,
            </if>
            <if test ='null != sourceId'>
                source_id,
            </if>
            <if test ='null != sourceName'>
                source_name,
            </if>
            <if test ='null != views'>
                views,
            </if>
            <if test ='null != status'>
                status,
            </if>
            <if test ='null != showTime'>
                show_time,
            </if>
            <if test ='null != addTime'>
                add_time,
            </if>
            <if test ='null != updateTime'>
                update_time,
            </if>
            <if test ='null != imgurl'>
                imgurl,
            </if>
            <if test ='null != description'>
                description,
            </if>
            <if test ='null != content'>
                content
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test ='null != type'>
                #{type},
            </if>
            <if test ='null != title'>
                #{title},
            </if>
            <if test ='null != sourceId'>
                #{sourceId},
            </if>
            <if test ='null != sourceName'>
                #{sourceName},
            </if>
            <if test ='null != views'>
                #{views},
            </if>
            <if test ='null != status'>
                #{status},
            </if>
            <if test ='null != showTime'>
                #{showTime},
            </if>
            <if test ='null != addTime'>
                #{addTime},
            </if>
            <if test ='null != updateTime'>
                #{updateTime},
            </if>
            <if test ='null != imgurl'>
                #{imgurl},
            </if>
            <if test ='null != description'>
                #{description},
            </if>
            <if test ='null != content'>
                #{content}
            </if>
        </trim>
    </insert>
    <delete id="delete" >
        DELETE FROM site_news
        WHERE id = #{id}
    </delete>
    <update id="update" parameterType="com.nq.pojo.SiteNews">
        UPDATE site_news
        <set>
            <if test ='null != type'>type = #{type},</if>
            <if test ='null != title'>title = #{title},</if>
            <if test ='null != sourceId'>source_id = #{sourceId},</if>
            <if test ='null != sourceName'>source_name = #{sourceName},</if>
            <if test ='null != views'>views = #{views},</if>
            <if test ='null != status'>status = #{status},</if>
            <if test ='null != showTime'>show_time = #{showTime},</if>
            <if test ='null != addTime'>add_time = #{addTime},</if>
            <if test ='null != updateTime'>update_time = #{updateTime},</if>
            <if test ='null != imgurl'>imgurl = #{imgurl},</if>
            <if test ='null != description'>description = #{description},</if>
            <if test ='null != content'>content = #{content}</if>
        </set>
        WHERE id = #{id}
    </update>
    <select id="load" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />
        FROM site_news