zoukankan      html  css  js  c++  java
  • sqlmap映射继承机制及映射字段顺序与SQL查询字段顺序无关

    <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查询语句相等,名称写错了会报错,因为映射找不到。

  • 相关阅读:
    Qt 查询字符串数据
    #include <stdint.h>
    滤波器设计-巴特沃尔斯低通滤波设计 转
    小波学习之二(单层一维离散小波变换DWT的Mallat算法C++实现优化)--转载
    机器学习之Bagging与随机森林笔记
    机器学习之决策树笔记
    机器学习之softmax回归笔记
    机器学习之逻辑回归(Logistic)笔记
    机器学习之模型拟合效果的判断笔记
    机器学习最小二乘法笔记
  • 原文地址:https://www.cnblogs.com/simpledev/p/3522650.html
Copyright © 2011-2022 走看看