build/classes/com/xx/supermarket/xml/ProductMapper.xml

(开头部分) 11KB

这里只显示每个文件的开头 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.xx.supermarket.entity.Product">

     <!-- 实体类与数据库映射字段部分  start -->
	<resultMap id="ResultMapProduct" type="com.xx.supermarket.entity.Product">
        <result property="id" column="id"  jdbcType="INTEGER"/>
        <result property="image" column="image"  jdbcType="VARCHAR"/>
        <result property="isDelete" column="isDelete"  jdbcType="INTEGER"/>
        <result property="name" column="name"  jdbcType="VARCHAR"/>
        <result property="price" column="price"  jdbcType="DOUBLE"/>
        <result property="remark" column="remark"  jdbcType="VARCHAR"/>
        <result property="categorySecId" column="categorySecId"  jdbcType="INTEGER"/>
          <result property="cid" column="cid"  jdbcType="INTEGER"/>
	</resultMap>
	 <!-- 实体类与数据库映射字段部分  end -->
	 
	 <!-- 声明数据库字段 -->
	<sql id="Product_field">
           id,
           image,
           isDelete,
           name,
           price,
           remark,
           categorySecId
	</sql>
	 <!-- 声明数据库字段 -->
	<sql id="Product_field1">
           p.id,
           p.image,
           p.isDelete,
           p.name,
           p.price,
           p.remark,
           p.categorySecId
	</sql>
	
	<!-- 实体类属性  -->
	<sql id="Product_insert">
        	#{id} ,
        	#{image} ,
        	#{isDelete} ,
        	#{name} ,
        	#{price} ,
        	#{remark} ,
        	#{categorySecId} 
	</sql>
	
	<!-- 执行修改时 数据库字段和表字段比较 -->
	<sql id="Product_update">
		    <if test="image != null" >
	            image = #{image} ,
	        </if>
		    <if test="isDelete != null" >
	            isDelete = #{isDelete} ,
	        </if>
后面还有 342 行代码,购买后查看完整代码

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

AI 解读 AI

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

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