|
@@ -14,10 +14,52 @@
|
|
|
<result column="creator" property="creator" />
|
|
|
<result column="mould_id" property="mouldId" />
|
|
|
</resultMap>
|
|
|
+ <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.PartVO">
|
|
|
+ <id column="id" property="id" />
|
|
|
+ <result column="part_no" property="partNo" />
|
|
|
+ <result column="part_name" property="partName" />
|
|
|
+ <result column="indate" property="indate" />
|
|
|
+ <result column="part_life" property="partLife" />
|
|
|
+ <result column="is_vulnerable" property="isVulnerable" />
|
|
|
+ <result column="creator_id" property="creatorId" />
|
|
|
+ <result column="creator" property="creator" />
|
|
|
+ <result column="mould_id" property="mouldId" />
|
|
|
+ <association property="part2dFile" javaType="com.hssx.cloudmodel.entity.MouldFile" column="id" select="getPart2dFileByPartId">
|
|
|
+ </association>
|
|
|
+ <association property="part3dFile" javaType="com.hssx.cloudmodel.entity.MouldFile" column="id" select="getPart3dFileByPartId">
|
|
|
+ </association>
|
|
|
+ </resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
id, part_no, part_name, indate, part_life, is_vulnerable, creator_id, creator, mould_id
|
|
|
</sql>
|
|
|
-
|
|
|
+ <select id="selectPartFileByMouldId" resultMap="BaseResultMapVO">
|
|
|
+ select
|
|
|
+ id, part_no, part_name, indate, part_life, is_vulnerable, creator_id, creator, mould_id
|
|
|
+ from
|
|
|
+ tb_mould_file
|
|
|
+ where
|
|
|
+ mould_id = #{userVO.mouldId}
|
|
|
+ </select>
|
|
|
+ <select id="getPart2dFileByPartId" resultType="com.hssx.cloudmodel.entity.MouldFile">
|
|
|
+ select
|
|
|
+ id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
|
+ project_id, file_url, file_name, blong_type, content, state,
|
|
|
+ file_type, file_size, dwg_type, part_id
|
|
|
+ from
|
|
|
+ tb_mould_file
|
|
|
+ where
|
|
|
+ part_id = #{id}
|
|
|
+ </select>
|
|
|
+ <select id="getPart3dFileByPartId" resultType="com.hssx.cloudmodel.entity.MouldFile">
|
|
|
+ select
|
|
|
+ id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
|
+ project_id, file_url, file_name, blong_type, content, state,
|
|
|
+ file_type, file_size, dwg_type, part_id
|
|
|
+ from
|
|
|
+ tb_mould_file
|
|
|
+ where
|
|
|
+ part_id = #{id}
|
|
|
+ </select>
|
|
|
</mapper>
|