src/com/marry/dao/OrderMapper.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.OrderMapper">
  <resultMap id="BaseResultMap" type="com.marry.entity.Order" autoMapping="true">
    <id column="oid" property="oid"/>
    <association property="user" column="uid" select="selectUser"/>
    <association property="grapher" column="gid" select="selectGrapher"/>
  </resultMap>
  <select id="selectUser" parameterType="java.lang.Integer" resultType="com.marry.entity.User">
  select *
  from user where uid=#{id}
  </select>

  <select id="selectGrapher" parameterType="java.lang.Integer" resultType="com.marry.entity.Grapher">
    select *
    from grapher
    where gid = #{id}
  </select>
  <select id="select" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select *
    from order
    where oid = #{oid,jdbcType=INTEGER}
  </select>
  <delete id="delete" parameterType="java.lang.Integer">
    delete from order
    where oid = #{oid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.marry.entity.Order">
    insert into `order`
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="oid != null">
        oid,
      </if>
      <if test="time != null">
        time,
      </if>
      <if test="gid != null">
        gid,
      </if>
      <if test="uid != null">
        uid,
      </if>
      <if test="mark != null">
        mark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="oid != null">
        #{oid,jdbcType=INTEGER},
      </if>
      <if test="time != null">
        #{time,jdbcType=TIMESTAMP},
      </if>
      <if test="gid != null">
        #{gid,jdbcType=INTEGER},
      </if>
      <if test="uid != null">
        #{uid,jdbcType=INTEGER},
      </if>
      <if test="mark != null">
后面还有 37 行代码,购买后查看完整代码

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

AI 解读 AI

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

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