src/com/mapper/ConsumerMapper.xml

(开头部分) 5KB

这里只显示每个文件的开头 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.ConsumerDao" >
  <resultMap id="BaseResultMap" type="com.entity.Consumer" >
    <id column="csid" property="csid" jdbcType="INTEGER" />
    <result column="csnumber" property="csnumber" jdbcType="VARCHAR" />
    <result column="cspassword" property="cspassword" jdbcType="VARCHAR" />
    <result column="csname" property="csname" jdbcType="VARCHAR" />
    <result column="cstelphone" property="cstelphone" jdbcType="VARCHAR" />
    <result column="csaddress" property="csaddress" jdbcType="VARCHAR" />
    <result column="cswechat" property="cswechat" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    csid, csnumber, cspassword, csname, cstelphone, csaddress, cswechat
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from consumer
    where csid = #{csid,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from consumer
    where csid = #{csid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.entity.Consumer" >
    insert into consumer (csid, csnumber, cspassword, 
      csname, cstelphone, csaddress, 
      cswechat)
    values (#{csid,jdbcType=INTEGER}, #{csnumber,jdbcType=VARCHAR}, #{cspassword,jdbcType=VARCHAR}, 
      #{csname,jdbcType=VARCHAR}, #{cstelphone,jdbcType=VARCHAR}, #{csaddress,jdbcType=VARCHAR}, 
      #{cswechat,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.entity.Consumer" >
    insert into consumer
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="csid != null" >
        csid,
      </if>
      <if test="csnumber != null" >
        csnumber,
      </if>
      <if test="cspassword != null" >
        cspassword,
      </if>
      <if test="csname != null" >
        csname,
      </if>
      <if test="cstelphone != null" >
        cstelphone,
      </if>
      <if test="csaddress != null" >
        csaddress,
      </if>
      <if test="cswechat != null" >
        cswechat,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="csid != null" >
后面还有 83 行代码,购买后查看完整代码

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

AI 解读 AI

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

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