ForestBlog-master/ForestBlog/target/ForestBlog-1.0.0-SNAPSHOT/WEB-INF/classes/mapper/CommentMapper.xml
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?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.liuyanzhao.ssm.blog.mapper.CommentMapper">
<resultMap id="BaseResultMap" type="com.liuyanzhao.ssm.blog.entity.Comment">
<id column="comment_id" property="commentId" jdbcType="INTEGER"/>
<result column="comment_pid" property="commentPid" jdbcType="INTEGER"/>
<result column="comment_pname" property="commentPname" jdbcType="VARCHAR"/>
<result column="comment_article_id" property="commentArticleId" jdbcType="INTEGER"/>
<result column="comment_author_name" property="commentAuthorName" jdbcType="VARCHAR"/>
<result column="comment_author_email" property="commentAuthorEmail" jdbcType="VARCHAR"/>
<result column="comment_author_url" property="commentAuthorUrl" jdbcType="VARCHAR"/>
<result column="comment_author_avatar" property="commentAuthorAvatar" jdbcType="VARCHAR"/>
<result column="comment_content" property="commentContent" jdbcType="VARCHAR"/>
<result column="comment_agent" property="commentAgent" jdbcType="VARCHAR"/>
<result column="comment_ip" property="commentIp" jdbcType="VARCHAR"/>
<result column="comment_create_time" property="commentCreateTime" jdbcType="TIMESTAMP"/>
<result column="comment_role" property="commentRole" jdbcType="INTEGER"/>
</resultMap>
<sql id="tb">comment</sql>
<sql id="Base_Column_List">
comment_id, comment_pid, comment_pname, comment_article_id, comment_author_name,
comment_author_email, comment_author_url, comment_author_avatar, comment_content, comment_agent,
comment_ip,comment_create_time, comment_role
</sql>
<select id="getCommentById" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
from
<include refid="tb"/>
where comment_id = #{commentId,jdbcType=INTEGER}
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
delete from
<include refid="tb"/>
where comment_id = #{commentId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.liuyanzhao.ssm.blog.entity.Comment" useGeneratedKeys="true" keyProperty="commentId">
insert into
<include refid="tb"/>
(comment_pid, comment_pname, comment_article_id,
comment_author_name, comment_author_email,
comment_author_url, comment_author_avatar, comment_content, comment_agent,
comment_ip, comment_create_time, comment_role)
values (#{commentPid,jdbcType=INTEGER}, #{commentPname,jdbcType=VARCHAR}, #{commentArticleId,jdbcType=INTEGER},
#{commentAuthorName,jdbcType=VARCHAR}, #{commentAuthorEmail,jdbcType=VARCHAR},
#{commentAuthorUrl,jdbcType=VARCHAR},#{commentAuthorAvatar}, #{commentContent,jdbcType=VARCHAR},
#{commentAgent,jdbcType=VARCHAR},
#{commentIp,jdbcType=VARCHAR}, #{commentCreateTime,jdbcType=TIMESTAMP}, #{commentRole,jdbcType=INTEGER})
</insert>
<update id="update" parameterType="com.liuyanzhao.ssm.blog.entity.Comment">
update
<include refid="tb"/>
<set>
<if test="commentPid != null">comment_pid = #{commentPid,jdbcType=INTEGER},</if>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
