|
@@ -4,18 +4,18 @@
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMap" type="com.hssx.pcbms.entity.Goods">
|
|
|
- <id column="id" property="id" />
|
|
|
- <result column="name" property="name" />
|
|
|
- <result column="tag_id" property="tagId" />
|
|
|
- <result column="model_number" property="modelNumber" />
|
|
|
- <result column="unit" property="unit" />
|
|
|
- <result column="address" property="address" />
|
|
|
- <result column="factory" property="factory" />
|
|
|
- <result column="pic" property="pic" />
|
|
|
- <result column="service_life" property="serviceLife" />
|
|
|
- <result column="next_indate" property="nextIndate" />
|
|
|
- <result column="is_delete" property="isDelete" />
|
|
|
- <result column="creator_id" property="creatorId" />
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="name" property="name"/>
|
|
|
+ <result column="tag_id" property="tagId"/>
|
|
|
+ <result column="model_number" property="modelNumber"/>
|
|
|
+ <result column="unit" property="unit"/>
|
|
|
+ <result column="address" property="address"/>
|
|
|
+ <result column="factory" property="factory"/>
|
|
|
+ <result column="pic" property="pic"/>
|
|
|
+ <result column="service_life" property="serviceLife"/>
|
|
|
+ <result column="next_indate" property="nextIndate"/>
|
|
|
+ <result column="is_delete" property="isDelete"/>
|
|
|
+ <result column="creator_id" property="creatorId"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
@@ -25,30 +25,54 @@
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMapVO" type="com.hssx.pcbms.entity.vo.GoodsVO">
|
|
|
- <id column="id" property="id" />
|
|
|
- <result column="name" property="name" />
|
|
|
- <result column="tag_id" property="tagId" />
|
|
|
- <result column="model_number" property="modelNumber" />
|
|
|
- <result column="unit" property="unit" />
|
|
|
- <result column="address" property="address" />
|
|
|
- <result column="factory" property="factory" />
|
|
|
- <result column="pic" property="pic" />
|
|
|
- <result column="service_life" property="serviceLife" />
|
|
|
- <result column="next_indate" property="nextIndate" />
|
|
|
- <collection property="goodsNos" select="selectGoodsNoByGoodsId" javaType="java.util.List" column="{goodId = id}" ofType="com.hssx.pcbms.entity.GoodsNo">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="name" property="name"/>
|
|
|
+ <result column="tag_id" property="tagId"/>
|
|
|
+ <result column="model_number" property="modelNumber"/>
|
|
|
+ <result column="unit" property="unit"/>
|
|
|
+ <result column="address" property="address"/>
|
|
|
+ <result column="factory" property="factory"/>
|
|
|
+ <result column="pic" property="pic"/>
|
|
|
+ <result column="service_life" property="serviceLife"/>
|
|
|
+ <result column="next_indate" property="nextIndate"/>
|
|
|
+ <collection property="goodsNos" select="selectGoodsNoByGoodsId" javaType="java.util.List" column="{goodId = id}"
|
|
|
+ ofType="com.hssx.pcbms.entity.GoodsNo">
|
|
|
</collection>
|
|
|
<!--<collection property="goodsNos" ofType="com.hssx.pcbms.entity.GoodsNo">-->
|
|
|
- <!--<id column="nid" property="id" />-->
|
|
|
- <!--<result column="model_no" property="modelNo" />-->
|
|
|
- <!--<result column="division_code" property="divisionCode" />-->
|
|
|
- <!--<result column="suffix_code" property="suffixCode" />-->
|
|
|
- <!--<result column="state" property="state" />-->
|
|
|
- <!--<result column="indate" property="indate" />-->
|
|
|
- <!--<result column="goods_id" property="goodsId" />-->
|
|
|
- <!--<result column="user_id" property="userId" />-->
|
|
|
+ <!--<id column="nid" property="id" />-->
|
|
|
+ <!--<result column="model_no" property="modelNo" />-->
|
|
|
+ <!--<result column="division_code" property="divisionCode" />-->
|
|
|
+ <!--<result column="suffix_code" property="suffixCode" />-->
|
|
|
+ <!--<result column="state" property="state" />-->
|
|
|
+ <!--<result column="indate" property="indate" />-->
|
|
|
+ <!--<result column="goods_id" property="goodsId" />-->
|
|
|
+ <!--<result column="user_id" property="userId" />-->
|
|
|
<!--</collection>-->
|
|
|
</resultMap>
|
|
|
|
|
|
+ <!-- 通用查询映射结果 -->
|
|
|
+ <resultMap id="BaseResultMapDetail" type="com.hssx.pcbms.entity.vo.GoodsVO">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="name" property="name"/>
|
|
|
+ <result column="tag_id" property="tagId"/>
|
|
|
+ <result column="model_number" property="modelNumber"/>
|
|
|
+ <result column="unit" property="unit"/>
|
|
|
+ <result column="address" property="address"/>
|
|
|
+ <result column="factory" property="factory"/>
|
|
|
+ <result column="pic" property="pic"/>
|
|
|
+ <result column="service_life" property="serviceLife"/>
|
|
|
+ <result column="next_indate" property="nextIndate"/>
|
|
|
+ <collection property="goodsNos" ofType="com.hssx.pcbms.entity.GoodsNo">
|
|
|
+ <id column="nid" property="id"/>
|
|
|
+ <result column="model_no" property="modelNo"/>
|
|
|
+ <result column="division_code" property="divisionCode"/>
|
|
|
+ <result column="suffix_code" property="suffixCode"/>
|
|
|
+ <result column="state" property="state"/>
|
|
|
+ <result column="indate" property="indate"/>
|
|
|
+ <result column="goods_id" property="goodsId"/>
|
|
|
+ <result column="user_id" property="userId"/>
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
<select id="getListBycondition" resultMap="BaseResultMapVO">
|
|
|
select
|
|
|
id, name, tag_id, model_number, unit, address, factory, pic, service_life, next_indate
|
|
@@ -72,9 +96,10 @@
|
|
|
where
|
|
|
goods_id = #{goodId}
|
|
|
</select>
|
|
|
- <select id="getDetail" resultMap="BaseResultMapVO">
|
|
|
+ <select id="getDetail" resultMap="BaseResultMapDetail">
|
|
|
select
|
|
|
- g.id, g.name, g.tag_id, g.model_number, g.unit,g.address, g.factory, g.pic, g.service_life, g.next_indate, g.is_delete,gn.id nid,
|
|
|
+ g.id, g.name, g.tag_id, g.model_number, g.unit,g.address, g.factory, g.pic, g.service_life, g.next_indate,
|
|
|
+ g.is_delete,gn.id nid,
|
|
|
gn.model_no, gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id, gn.user_id
|
|
|
from
|
|
|
goods g
|