src/com/mapper/NoticeMapper.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.dao.NoticeDao" >
  <resultMap id="BaseResultMap" type="com.entity.Notice" >
    <id column="noticeid" property="noticeid" jdbcType="INTEGER" />
    <result column="noticename" property="noticename" jdbcType="VARCHAR" />
    <result column="noticetime" property="noticetime" jdbcType="VARCHAR" />
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.entity.Notice" extends="BaseResultMap" >
    <result column="noticecontent" property="noticecontent" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    noticeid, noticename, noticetime
  </sql>
  <sql id="Blob_Column_List" >
    noticecontent
  </sql>
  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from notice
    where noticeid = #{noticeid,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from notice
    where noticeid = #{noticeid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.entity.Notice" >
    insert into notice (noticeid, noticename, noticetime, 
      noticecontent)
    values (#{noticeid,jdbcType=INTEGER}, #{noticename,jdbcType=VARCHAR}, #{noticetime,jdbcType=VARCHAR}, 
      #{noticecontent,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.entity.Notice" >
    insert into notice
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="noticeid != null" >
        noticeid,
      </if>
      <if test="noticename != null" >
        noticename,
      </if>
      <if test="noticetime != null" >
        noticetime,
      </if>
      <if test="noticecontent != null" >
        noticecontent,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="noticeid != null" >
        #{noticeid,jdbcType=INTEGER},
      </if>
      <if test="noticename != null" >
        #{noticename,jdbcType=VARCHAR},
      </if>
      <if test="noticetime != null" >
        #{noticetime,jdbcType=VARCHAR},
后面还有 46 行代码,购买后查看完整代码

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

AI 解读

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

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