src/com/mapper/PersonMapper.xml

(开头部分) 7KB

这里只显示每个文件的开头 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.PersonMapper" >
  <resultMap id="BaseResultMap" type="com.entity.Person" >
    <id column="perid" property="perid" jdbcType="INTEGER" />
    <result column="pernumber" property="pernumber" jdbcType="VARCHAR" />
    <result column="perpass" property="perpass" jdbcType="VARCHAR" />
    <result column="pername" property="pername" jdbcType="VARCHAR" />
    <result column="pertel" property="pertel" jdbcType="VARCHAR" />
    <result column="peraddress" property="peraddress" jdbcType="VARCHAR" />
    <result column="perdepart" property="perdepart" jdbcType="VARCHAR" />
    <result column="perwages" property="perwages" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    perid, pernumber, perpass, pername, pertel, peraddress, perdepart, perwages
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from person
    where perid = #{perid,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from person
    where perid = #{perid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.entity.Person" >
    insert into person (perid, pernumber, perpass, 
      pername, pertel, peraddress, 
      perdepart, perwages)
    values (#{perid,jdbcType=INTEGER}, #{pernumber,jdbcType=VARCHAR}, #{perpass,jdbcType=VARCHAR}, 
      #{pername,jdbcType=VARCHAR}, #{pertel,jdbcType=VARCHAR}, #{peraddress,jdbcType=VARCHAR}, 
      #{perdepart,jdbcType=VARCHAR}, #{perwages,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.entity.Person" >
    insert into person
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="perid != null" >
        perid,
      </if>
      <if test="pernumber != null" >
        pernumber,
      </if>
      <if test="perpass != null" >
        perpass,
      </if>
      <if test="pername != null" >
        pername,
      </if>
      <if test="pertel != null" >
        pertel,
      </if>
      <if test="peraddress != null" >
        peraddress,
      </if>
      <if test="perdepart != null" >
        perdepart,
      </if>
      <if test="perwages != null" >
        perwages,
后面还有 120 行代码,购买后查看完整代码

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

AI 解读

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

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