|
|
@@ -39,6 +39,30 @@
|
|
|
ofType="com.hssx.pcbms.entity.GoodsNo">
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
+ <!-- 我的资产查询映射结果 -->
|
|
|
+ <resultMap id="BaseResultMapMyList" 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"/>
|
|
|
+ <result column="is_maintain" property="isMaintain" />
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
<resultMap id="BaseResultMapDetail" type="com.hssx.pcbms.entity.vo.GoodsVO">
|
|
|
@@ -79,9 +103,6 @@
|
|
|
<if test="tagId != null">
|
|
|
and tag_id = #{tagId}
|
|
|
</if>
|
|
|
- <if test="uid != null">
|
|
|
- and creator_id = #{uid}
|
|
|
- </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="selectGoodsNoByGoodsId" resultType="com.hssx.pcbms.entity.GoodsNo">
|
|
|
@@ -108,4 +129,24 @@
|
|
|
g.id = #{id}
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectMyList" resultMap="BaseResultMapMyList">
|
|
|
+ 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,
|
|
|
+ gn.model_no, gn.division_code, gn.suffix_code, gn.state, gn.indate, gn.goods_id, gn.user_id,u.name username,gn.is_maintain,u.phone
|
|
|
+ from
|
|
|
+ goods g
|
|
|
+ left join
|
|
|
+ goods_no gn
|
|
|
+ on g.id = gn.goods_id
|
|
|
+ left join user u
|
|
|
+ on u.id = gn.user_id
|
|
|
+ <where>
|
|
|
+ AND gn.user_id = #{uid,jdbcType=INTEGER}
|
|
|
+ </where>
|
|
|
+ <if test="start != null and pageSize != null">
|
|
|
+ limit #{start,jdbcType=INTEGER} ,#{pageSize,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|