日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Mybatis的resultMap

發(fā)布時間:2025/3/20 编程问答 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Mybatis的resultMap 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

resultMap

返回Map類型

屬性
可以是固有屬性、也可以定義擴展屬性

關(guān)聯(lián)
可以是其他表的字段,也可以關(guān)聯(lián)其他select查詢語句

<resultMap id="BaseResultMap" type="cn.com.hwasunsoft.lims.biz.model.extra.AssayOrderExt"><id column="ID" jdbcType="VARCHAR" property="id"/><result column="REG_NO" jdbcType="VARCHAR" property="regNo"/><result column="REG_WAY" jdbcType="VARCHAR" property="regWay"/><result column="REG_PEOPLE" jdbcType="VARCHAR" property="regPeople"/><result column="REG_TIME" jdbcType="TIMESTAMP" property="regTime"/><result column="REG_TEL" jdbcType="VARCHAR" property="regTel"/><result column="CUSTOMER_ID" jdbcType="VARCHAR" property="customerId"/><result column="SAMP_BIZ_MODE_ID" jdbcType="VARCHAR" property="sampBizModeId"/><result column="TEST_OBJECT_MODEL_ID" jdbcType="VARCHAR" property="testObjectModelId"/><result column="TEST_OBJECT_ID" jdbcType="VARCHAR" property="testObjectId"/><result column="LAB_ID" jdbcType="VARCHAR" property="labId"/><result column="ASSAY_TIME_LIMIT" jdbcType="NUMERIC" property="assayTimeLimit"/><result column="SAMPLE_SUBMIT_WAY" jdbcType="NUMERIC" property="sampleSubmitWay"/><result column="CONFIRMATION_STATUS" jdbcType="NUMERIC" property="confirmationStatus"/><result column="SAMPLING_WAY" jdbcType="NUMERIC" property="samplingWay"/><result column="NEED_SAMPLE_PREPARATION" jdbcType="NUMERIC" property="needSamplePreparation"/><result column="SAMP_REG_AMOUNT" jdbcType="NUMERIC" property="sampRegAmount"/><result column="TESTED_UNIT_ID" jdbcType="VARCHAR" property="testedUnitId"/><result column="SAMP_STAT" jdbcType="VARCHAR" property="sampStat"/><result column="ORDER_NAME" jdbcType="VARCHAR" property="orderName"/><result column="ORDER_REMARK" jdbcType="VARCHAR" property="orderRemark"/><result column="ORDER_NO" jdbcType="VARCHAR" property="orderNo"/><result column="DAILY_PLAN_NO" jdbcType="VARCHAR" property="dailyPlanNo"/><result column="CONTRACT_INFO_ID" jdbcType="VARCHAR" property="contractInfoId"/><result column="CONTRACT_CODE" jdbcType="VARCHAR" property="contractCode"/><result column="ORDER_DATE" jdbcType="TIMESTAMP" property="orderDate"/><result column="CUST_PHONE" jdbcType="VARCHAR" property="custPhone"/><result column="SAMPLE_DELIVERER_NAME" jdbcType="VARCHAR" property="sampleDelivererName"/><result column="SAMPLE_DELIVERER_PHONE" jdbcType="VARCHAR" property="sampleDelivererPhone"/><result column="ORDER_TYPE" jdbcType="NUMERIC" property="orderType"/><result column="SETTLEMENT_WAY" jdbcType="NUMERIC" property="settlementWay"/><result column="ASSAY_BIZ_CODE" jdbcType="VARCHAR" property="assayBizCode"/><result column="AUDIT_STATUS" jdbcType="NUMERIC" property="auditStatus"/><result column="SETTLE_STATUS" jdbcType="NUMERIC" property="settleStatus"/><result column="ASSAY_COST_COUNT" jdbcType="NUMERIC" property="assayCostCount"/><result column="ATTACHMENT" jdbcType="VARCHAR" property="attachment"/><result column="RECORD_STATUS" jdbcType="NUMERIC" property="recordStatus"/><result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/><result column="MODIFY_TIME" jdbcType="TIMESTAMP" property="modifyTime"/><result column="CONSOLIDATED_REPORT" jdbcType="NUMERIC" property="consolidatedReport"/><!-- ######################################### 擴展屬性 ###################################################--><!--采樣方式--><result column="SAMPLE_SUBMIT_WAY" jdbcType="NUMERIC" property="sampleSubmitWayEnum"typeHandler="cn.com.hwasunsoft.lims.core.enums.handler.CommonEnumHandler"/><!--記錄狀態(tài)--><result column="RECORD_STATUS" jdbcType="NUMERIC" property="recordStatusEnum"typeHandler="cn.com.hwasunsoft.lims.core.enums.handler.CommonEnumHandler"/><!--確認狀態(tài)--><result column="CONFIRMATION_STATUS" jdbcType="NUMERIC" property="confirmationStatusEnum"typeHandler="cn.com.hwasunsoft.lims.core.enums.handler.CommonEnumHandler"/><!--結(jié)算方式--><result column="SETTLEMENT_WAY" jdbcType="NUMERIC" property="settlementWayEnum"javaType="cn.com.hwasunsoft.lims.biz.enums.AccountingWayEnum"typeHandler="cn.com.hwasunsoft.lims.core.enums.handler.CommonEnumHandler"/><!--審核狀態(tài)--><result column="AUDIT_STATUS" jdbcType="NUMERIC" property="auditStatusEnum"typeHandler="cn.com.hwasunsoft.lims.core.enums.handler.CommonEnumHandler"/><!--結(jié)算狀態(tài)--><result column="SETTLE_STATUS" jdbcType="NUMERIC" property="settleStatusEnum"typeHandler="cn.com.hwasunsoft.lims.core.enums.handler.CommonEnumHandler"/><!--綜合報告顯示(1是,0否)--><result column="CONSOLIDATED_REPORT" jdbcType="NUMERIC" property="consolidatedReportEnum"typeHandler="cn.com.hwasunsoft.lims.core.enums.handler.CommonEnumHandler"/><association column="CUSTOMER_ID" jdbcType="VARCHAR" property="customer" select="getCustomer"/><association column="TEST_OBJECT_ID" jdbcType="VARCHAR" property="testObject" select="getTestObject"/><association column="CONTRACT_INFO_ID" jdbcType="VARCHAR" property="contractInfo" select="getContractInfo"/><association column="LAB_ID" jdbcType="VARCHAR" property="lab" select="getLab"/><association column="ASSAY_TASK_INFO_ID" jdbcType="VARCHAR" property="assayTaskInfo"javaType="cn.com.hwasunsoft.lims.biz.model.AssayTaskInfo"><result column="ASSAY_TASK_INFO_ID" jdbcType="VARCHAR" property="id"/><result column="sample_No" jdbcType="VARCHAR" property="sampleNo"/><result column="ASSAY_RESULT_AUDITOR" jdbcType="VARCHAR" property="assayResultAuditor"/></association><association column="sample_id" jdbcType="VARCHAR" property="assayOrderSample"javaType="cn.com.hwasunsoft.lims.biz.model.AssayOrderSample"><result column="sample_id" jdbcType="VARCHAR" property="id"/><result column="sample_No" jdbcType="VARCHAR" property="sampleNo"/><result column="LAB_ID" jdbcType="VARCHAR" property="labId"/><result column="SAMP_BIZ_MODE_ID" jdbcType="VARCHAR" property="sampBizModeId"/><result column="TEST_OBJECT_ID" jdbcType="VARCHAR" property="testObjectId"/></association><association column="SAMP_BIZ_MODE_ID" jdbcType="VARCHAR" property="sampleBusinessModel"javaType="cn.com.hwasunsoft.lims.biz.model.SampleBusinessModel"><result column="SAMP_BIZ_MODE_ID" jdbcType="VARCHAR" property="id"/><result column="SAMP_BIZ_MODE_NAME" jdbcType="VARCHAR" property="sampBizModeName"/></association> </resultMap><select id="getCustomer" parameterType="java.lang.String"resultType="cn.com.hwasunsoft.lims.biz.model.Customer">select * from INS_CUSTOMER where ID=#{id} </select> <select id="getTestObject" parameterType="java.lang.String"resultType="cn.com.hwasunsoft.lims.biz.model.TestObject">select * from DIC_TEST_OBJECT where ID=#{id} </select>

總結(jié)

以上是生活随笔為你收集整理的Mybatis的resultMap的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。