src/com/marry/dao/GrapherMapper.xml

(开头部分) 2KB

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

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

AI 解读 AI

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

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