Mybatis的xml配置实例

主表:
  
  
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.1//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- 软件信息数据查询相关 yangxuefeng@dnion.com -->
<mapper namespace="com.dnion.platform.dao.mybatis.DeploySoftwareInfoMapper">
<resultMap type="DeploySoftwareInfo" id="DeploySoftwareInfoResult">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="soft_name" jdbcType="VARCHAR" property="softName"/>
<result column="install_path" jdbcType="VARCHAR" property="installPath"/>
<result column="soft_desc" jdbcType="VARCHAR" property="softDesc"/>
<!-- 关联软件详情集合 -->
<collection property="deploySoftwareDetailList" ofType="deploySoftwareDetail"
column="id">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="sw_id" jdbcType="INTEGER" property="swId" />
<result column="version_code" jdbcType="VARCHAR" property="versionCode" />
<result column="release_date" jdbcType="VARCHAR" property="releaseDate" />
<result column="package_name" jdbcType="VARCHAR" property="packageName" />
<result column="package_size" jdbcType="INTEGER" property="packageSize" />
<result column="package_md5" jdbcType="VARCHAR" property="packageMD5" />
<result column="major_files" jdbcType="VARCHAR" property="majorFiles" />
<result column="release_note" jdbcType="VARCHAR" property="releaseNote" />
</collection>
</resultMap>
</mapper>
附属表:
   
   
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.1//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- 软件详情数据查询相关 yangxuefeng@dnion.com -->
<mapper namespace="com.dnion.platform.dao.mybatis.DeploySoftwareDetailMapper">
<!-- 软件详情查询数据封装 -->
<resultMap type="DeploySoftwareDetail" id="DeploySoftwareDetailResult">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="sw_id" jdbcType="INTEGER" property="swId" />
<result column="version_code" jdbcType="VARCHAR" property="versionCode" />
<result column="release_date" jdbcType="VARCHAR" property="releaseDate" />
<result column="package_name" jdbcType="VARCHAR" property="packageName" />
<result column="package_size" jdbcType="INTEGER" property="packageSize" />
<result column="package_md5" jdbcType="VARCHAR" property="packageMD5" />
<result column="major_files" jdbcType="VARCHAR" property="majorFiles" />
<result column="release_note" jdbcType="VARCHAR" property="releaseNote" />
</resultMap>
</mapper>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值