<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. 转 Android中this、super的区别

    在Java中,this通常指当前对象,super则指父类的.当你想要引用当前对象的某种东西,比如当前对象的某个方法,或当前对象的某个成员,你便可以利用this来实现这个目 的,当然,this的另一个用 ...

  2. 微信之Android各版本列表

    微信在不断地更新迭代,ios微信下载点击这里立即开始(手机电脑都可以,电脑端要安装iTunes),每个版本都放出一些新的功能或修复相关错误,详情可以点击下面的版本链接进行查看.(这里有Android微 ...

  3. 那万恶的ssh真是麻烦

    设置为允许某组远程ssh ,key也放入相应的服务器了,死活提示,Permission denied (publickey). 而偏偏另外的用户相同的配置却又可以,这里找到答案,原来是跟目录的权限有关 ...

  4. OC第一天-Xcode、工程组成及运行状态

    Xcode 中iOS工程模版: 1.Application类型: Master-detail Application. 可以构建树形结构导航模式应用,生成的代码中包含了导航控制器和表示图控制器.(表示 ...

  5. Cocos2d-x中播放背景音乐

    背景音乐的播放与停止实例代码如下: SimpleAudioEngine::getInstance()->playBackgroundMusic("sound/Jazz.mp3" ...

  6. linux下进入root

    baoyu@ubuntu:~$ sudo password root sudo: password: command not found baoyu@ubuntu:~$ sudo passwd roo ...

  7. urllib2.urlopen超时

    urllib2.urlopen设置超时,可以解决read方法阻塞的问题 urllib2.urlopen(‘xxx’,timeout=30)

  8. WinSCP列出’/’目录项出错

    无法获得目录列表 如图所示,使用百度云虚拟机时,FTP连接服务器,出现错提示,官方给出的说法是使用其他的FTP进行连接,但是之前成功连接过,查找资料后说是打开过png,mp3等媒体文件,切换路径时出错 ...

  9. libnet发包例子(tcp udp arp广播)

    #include <libnet.h> int main() { libnet_t *handle; /* Libnet句柄 */ int packet_size; /* 构造的数据包大小 ...

  10. java将多个连续的空格转化成一个空格

    java将多个连续的空格转化成一个空格: System.out.println("a a".replaceAll(" + ", " ")); ...