<typeAlias alias="TblSpPartsinfo" type="com.bn.car.biz.supply.dao.po.PartsInfoPO"/>
<resultMap class="TblSpPartsinfo" id="TblSpPartsinfoResultMap">
<result property="id" column="id"/>
<result property="partsCode" column="parts_code"/>
<result property="partsName" column="parts_name"/>
<result property="bigTitle" column="big_title"/>
<result property="smallTitle" column="small_title"/>
<result property="storeNum" column="store_num"/>
<result property="grade" column="grade"/>
<result property="costPrice" column="cost_price"/>
<result property="marketPrice" column="market_price"/>
<result property="retailPrice" column="retail_price"/>
<result property="weight" column="weight"/>
<result property="weightUnit" column="weight_unit"/>
<result property="vol" column="vol"/>
<result property="volUnit" column="vol_unit"/>
<result property="partsIntroduce" column="parts_introduce"/>
<result property="specification" column="specification"/>
<result property="packagingList" column="packaging_list"/>
<result property="brandIntroduce" column="brand_introduce"/>
<result property="usage" column="usage"/>
<result property="aftersaleService" column="aftersale_service"/>
<result property="createdDate" column="created_date"/>
<result property="creater" column="creater"/>
<result property="modifiedDate" column="modified_date"/>
<result property="modifier" column="modifier"/>
<result property="flag" column="flag"/>
<result property="fPartsbrandId" column="f_partsbrand_id"/> <result property="fPartstypeId" column="f_partstype_id"/>
<result property="fSupplyinfoId" column="f_supplyinfo_id"/>
<result property="updown" column="updown"/>
<result property="recommend" column="recommend"/>
<result property="partsSource" column="parts_source"/>
<result property="fPartstypeId2" column="f_partstype_id2"/>
<result property="unionFlag" column="union_flag"/>
</resultMap>
<!-- 组合产品子产品 -->
<resultMap class="TblSpPartsinfo" id="TblSpPartsinfoResultMapWithUnion" extends="TblSpPartsinfoResultMap">
<result property="lessPrice" column="less_price"/>
<result property="newPrice" column="new_price"/>
</resultMap>
<resultMap class="TblSpPartsinfo" id="TblSpPartsinfoResultMapBaoyang" extends="TblSpPartsinfoResultMap">
<result property="fCareId" column="f_care_id"/>
<result property="fCareItemId" column="f_care_item_id"/>
</resultMap>

注意:extends="TblSpPartsinfoResultMap" 表示继承关系。

映射的字段顺序无关~!!,但是数量,名称与sql查询语句相等,名称写错了会报错,因为映射找不到。

sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关的更多相关文章

  1. Mybatis按SQL查询字段的顺序返回查询结果

    在SpringMVC+Mybatis的开发过程中,可以通过指定resultType="hashmap"来获得查询结果,但其输出是没有顺序的.如果要按照SQL查询字段的顺序返回查询结 ...

  2. sql查询字段是否为空

    sql 查询某字段为空 select * from 表名 where 字段名 is null sql 查询某字段不为空 select * from 表名 where 字段名 is not null s ...

  3. Mybatis按照SQL查询字段的顺序返回查询结果,使用resultType="java.util.LinkedHashMap"

    在使用Mybatis开发时,Mybatis返回的结果集就是个map,当返回map时只需要做好SQL映射就好了,减少了代码量,简单便捷,缺点是不太方便维护,但是写大量的vo类去返回也挺累的,这个看你个人 ...

  4. SQL查询字段,起别名,列参与数学运算

    13.简单查询 13.1.查询一个字段? select 字段名 from 表名: 其中要注意: select和from都是关键字 字段名和表名都是标识符. 强调: 对于SQL语句说,是通用的 所有的S ...

  5. sql 查询字段是中文/英文/数字 正则表达式

    一.包含中文字符 select * from 表名 where 列名 like '%[吖-座]%' 二.包含英文字符 select * from 表名 where 列名 like '%[a-z]%' ...

  6. SQL 查询字段为值不为空

      方法一sql="select   *   from   table   where   id<>null   "     or   sql="select ...

  7. sql 查询字段如果为null 则返回0的写法

    oracle select nvl(字段名,0) from 表名; ----------------------------------- sqlserver select isnull(字段名,0) ...

  8. sql查询字段中的值长度最大的记录

    SELECT max(length(字段)) FROM 表名;

  9. sql查询字段值长度判断是否18位

    SELECT * FROM 表名 WHERE LENGTH(字段)= OR 字段为null IS NULL OR 字段为空='' SELECT * FROM 表名 WHERE LENGTH(字段)&g ...

随机推荐

  1. VS2010与QT的集成开发环境

    http://blog.csdn.net/hbsong75/article/details/9293773 QT与Java有点类似,也是一种跨平台的软件(当然在windows平台和Linux平台需要安 ...

  2. python字符串操作2

    在python有各种各样的string操作函数.在历史上string类在python中经历了一段轮回的历史.在最开始的时候,python有一个专 门的string的module,要使用string的方 ...

  3. JAVA 基础加强学习笔记

    一.面向对象 (一)继承  1.继承的好处: (1) 提高了代码的复用性. (2) 让类与类之间产生了关系,提供了另一个特征多态的前提. 注意: 子类中所有的构造函数都会默认访问父类中的空参数的构造函 ...

  4. ### OpenCV安装(Linux)

    ### OpenCV安装(Linux) @(gr_self)[ffmpeg | openCV] #@author: gr #@date: 2015-09-02 #@email: forgerui@gm ...

  5. 选用 get 与 post 的一些建议

    1.http的请求方法:get  post 2. get:会把请求的内容  放到链接地址里面(数据请求的时候  默认的是get请求) 例:www.baidu.com/user/login?userna ...

  6. PDA库位商品出库适配算法

    功能描述 代码实现 算法需求 回到顶部 功能描述   在PDA上面,通过扫描订单号,查询该商品的款号,尺码,订单数:同时适配仓库库位商品[SKU],显示该商品所在库位,库存数量,适配数. 因为PDA界 ...

  7. class不想被复制的两个做法

    1,当一个class不想被复制的时候,可以将copy构造函数和copy assignment操作符声明为private.(只声明不定义,因此可以不指定函数参数) 2,或者,继承一个专门为了阻止copy ...

  8. (转)jquery ajax使用及跨域访问解决办法

    原文地址:***/UIweb/jquery_ajax_kuayujiejue.html 最近开发中,设计到智能手机项目,给领导做几个demo.主要是用jquery和jqeury mobile. 越来越 ...

  9. Winform ComboBox控件高亮显示

    //重绘下拉表单窗口,需要在窗口设计代码中加入下面这一句 this.cmdChannelName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawF ...

  10. python(三)一个文件读写操作的小程序

    我们要实现一个文件读写操作的小程序 首先我们有一个文件 我们要以"============"为界限,每一个角色分割成一个独立的txt文件,按照分割线走的话是分成 xiaoNa_1. ...