src/main/resources/config/mybatis/Guest_SqlMap.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="studio.baxia.fo.dao.IGuestDao" >
  <resultMap id="BaseResultMap" type="studio.baxia.fo.pojo.Guest" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="email" property="email" jdbcType="VARCHAR" />
    <result column="nickname" property="nickname" jdbcType="VARCHAR" />
    <result column="personal_website" property="personalWebsite" jdbcType="VARCHAR" />
    <result column="access_ip" property="accessIp" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, email, nickname, personal_website, access_ip
  </sql>

  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from t_guest
    where id = #{id,jdbcType=INTEGER}
  </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from t_guest
    where id = #{id,jdbcType=INTEGER}
  </delete>

  <insert id="insert" parameterType="studio.baxia.fo.pojo.Guest" useGeneratedKeys="true" keyProperty="id" >
    insert into t_guest (id, email, nickname, 
      personal_website, access_ip)
    values (#{id,jdbcType=INTEGER}, #{email,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, 
      #{personalWebsite,jdbcType=VARCHAR}, #{accessIp,jdbcType=VARCHAR})
  </insert>

  <insert id="insertSelective" parameterType="studio.baxia.fo.pojo.Guest" >
    insert into t_guest
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="email != null" >
        email,
      </if>
      <if test="nickname != null" >
        nickname,
      </if>
      <if test="personalWebsite != null" >
        personal_website,
      </if>
      <if test="accessIp != null" >
        access_ip,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="email != null" >
        #{email,jdbcType=VARCHAR},
      </if>
      <if test="nickname != null" >
后面还有 39 行代码,解锁后查看完整代码

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

AI 解读

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

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