target/MyBookStore/WEB-INF/classes/com/bookStore/admin/notice/dao/AdminNoticeDao.xml

(完整代码) 1KB

<?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.bookStore.admin.notice.dao.AdminNoticeDao">

    <select id="selectAdminNotice" resultType="Notice">
        select * from notice;
    </select>

    <insert id="insertNotice">
        insert into notice(title,details)
        values (#{title},#{details})
    </insert>

    <update id="updateNoticeById">
        update notice
        <set>
            <if test="title != null and title != ''">
                title = #{title},
            </if>
            <if test="details != null and details != ''">
                details = #{details}
            </if>
        </set>
        where id = #{id}
    </update>

    <select id="selectNoticeById" resultType="Notice">
        select * from notice where id = #{id}
    </select>

    <delete id="deleteNotice">
        delete from notice where id = #{id}
    </delete>
</mapper>

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。