src/com/marry/dao/TypeMapper.xml

(开头部分) 1KB

这里只显示每个文件的开头 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.marry.dao.TypeMapper">
  <resultMap id="BaseResultMap" type="com.marry.entity.Type" autoMapping="true"><id column="tid" property="tid"/>
  </resultMap>
  <sql id="Base_Column_List">
    tid, name, url, isDel
  </sql>
  <select id="select" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from type
    where tid = #{tid,jdbcType=INTEGER}
  </select>
  <insert id="insert" parameterType="com.marry.entity.Type">
    insert into type
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="tid != null">
        tid,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="isDel != null">
        isDel,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="tid != null">
        #{tid,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="isDel != null">
        #{isDel,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="update" parameterType="com.marry.entity.Type">
    update type
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="isDel != null">
        isDel = #{isDel,jdbcType=INTEGER},
      </if>
    </set>
    where tid = #{tid,jdbcType=INTEGER}
  </update>
后面还有 4 行代码,购买后查看完整代码

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

AI 解读 AI

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

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