|
@@ -8,7 +8,7 @@
|
|
|
<result column="name" property="name" />
|
|
|
<result column="tag_id" property="tagId" />
|
|
|
<result column="model_number" property="modelNumber" />
|
|
|
- <result column="company" property="company" />
|
|
|
+ <result column="unit" property="unit" />
|
|
|
<result column="address" property="address" />
|
|
|
<result column="factory" property="factory" />
|
|
|
<result column="pic" property="pic" />
|
|
@@ -19,45 +19,7 @@
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, name, tag_id, model_number, company, address, factory, pic, service_life, next_indate, is_delete
|
|
|
+ id, name, tag_id, model_number, unit, address, factory, pic, service_life, next_indate, is_delete
|
|
|
</sql>
|
|
|
- <!-- 通用查询映射结果 -->
|
|
|
- <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="company" property="company" />
|
|
|
- <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" column="{goodId = id}" ofType="com.hssx.pcbms.entity.GoodsNo">
|
|
|
- </collection>
|
|
|
- </resultMap>
|
|
|
|
|
|
- <select id="getListBycondition" resultMap="BaseResultMapVO">
|
|
|
- select
|
|
|
- id, name, tag_id, model_number, company, address, factory, pic, service_life, next_indate
|
|
|
- from
|
|
|
- goods
|
|
|
- <where>
|
|
|
- is_delete = 0
|
|
|
- <if test="keyName != null and keyName != ''">
|
|
|
- and name like concat('%',#{keyName},'%')
|
|
|
- </if>
|
|
|
- <if test="tagId != null">
|
|
|
- and tag_id = #{tagId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
- <select id="selectGoodsNoByGoodsId" resultType="com.hssx.pcbms.entity.GoodsNo">
|
|
|
- select
|
|
|
- id, model_no, state, indate, goods_id
|
|
|
- from
|
|
|
- goods_no
|
|
|
- where
|
|
|
- goods_id = #{goodId}
|
|
|
- </select>
|
|
|
</mapper>
|