testMaven/WebRoot/WEB-INF/classes/com/neusoft/mapper/CarMapper.xml
(开头部分) 10KB这里只显示每个文件的开头 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">
<!-- 不使用namespace的话sql搜索定位会比较方便-->
<mapper namespace="com.neusoft.mapper.CarMapper">
<!-- 实体类与数据库映射字段部分 start -->
<resultMap id="ResultMapCar" type="com.neusoft.po.Car">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="itemId" column="item_id" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="num" column="num" jdbcType="INTEGER"/>
<result property="total" column="total" jdbcType="VARCHAR"/>
<result property="price" column="price" jdbcType="DECIMAL"/>
</resultMap>
<resultMap id="ResultMapCarDto" type="com.neusoft.po.Car">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="itemId" column="item_id" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="num" column="num" jdbcType="INTEGER"/>
<result property="total" column="total" jdbcType="VARCHAR"/>
<result property="price" column="price" jdbcType="DECIMAL"/>
<association property="item" column="item_id" select="com.neusoft.mapper.ItemMapper.load"/>
</resultMap>
<!-- 实体类与数据库映射字段部分 end -->
<!-- 声明数据库字段 -->
<sql id="Car_field">
id,
item_id,
user_id,
num,
total,
price
</sql>
<!-- 实体类属性 -->
<sql id="Car_insert">
#{id} ,
#{itemId} ,
#{userId} ,
#{num} ,
#{total} ,
#{price}
</sql>
<!-- 执行修改时 数据库字段和表字段比较 -->
<sql id="Car_update">
<if test="itemId != null" >
item_id = #{itemId} ,
</if>
<if test="userId != null" >
user_id = #{userId} ,
</if>
<if test="num != null" >
num = #{num} ,
</if>
<if test="total != null" >
后面还有 319 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
