src/com/shop/mapper/OsAddressMapper.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.shop.dao.OsAddressMapper">
  <resultMap id="BaseResultMap" type="com.shop.po.OsAddress">
    <id column="address_id" jdbcType="BIGINT" property="addressId" />
    <result column="user_id" jdbcType="BIGINT" property="userId" />
    <result column="user_name" jdbcType="VARCHAR" property="userName" />
    <result column="user_tag" jdbcType="VARCHAR" property="userTag" />
    <result column="user_phone" jdbcType="VARCHAR" property="userPhone" />
    <result column="user_adress" jdbcType="VARCHAR" property="userAdress" />
    <result column="user_zipcode" jdbcType="INTEGER" property="userZipcode" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  </resultMap>
  <sql id="Base_Column_List">
    address_id, user_id, user_name, user_tag, user_phone, user_adress, user_zipcode, 
    create_time, update_time
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from os_address
    where address_id = #{addressId,jdbcType=BIGINT}
  </select>

  <select id="selectByUserId" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from os_address
    where user_id = #{userId,jdbcType=BIGINT}
  </select>

  <select id="selectByAddressId" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from os_address
    where address_id = #{addressId,jdbcType=BIGINT}
  </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from os_address
    where address_id = #{addressId,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.shop.po.OsAddress">
    insert into os_address (address_id, user_id, user_name, 
      user_tag, user_phone, user_adress, 
      user_zipcode, create_time, update_time
      )
    values (#{addressId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{userName,jdbcType=VARCHAR}, 
      #{userTag,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, #{userAdress,jdbcType=VARCHAR}, 
      #{userZipcode,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.shop.po.OsAddress">
    insert into os_address
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="addressId != null">
        address_id,
      </if>
      <if test="userId != null">
后面还有 97 行代码,购买后查看完整代码

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

AI 解读 AI

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

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