UPDATE: VERSION-20260314
This commit is contained in:
@@ -69,4 +69,39 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="VPlatformComponentMap" type="com.solution.rule.domain.PlatformComponent">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="platformId" column="platform_id"/>
|
||||
<result property="num" column="num"/>
|
||||
</resultMap>
|
||||
<select id="findComponentsByPlatformId" resultMap="VPlatformComponentMap">
|
||||
SELECT * FROM platform_component
|
||||
WHERE platform_id=#{platformId}
|
||||
</select>
|
||||
|
||||
<resultMap id="VPlatformMap" type="com.solution.rule.domain.Platform">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="description" column="description"/>
|
||||
<collection property="components"
|
||||
ofType="com.solution.rule.domain.PlatformComponent"
|
||||
column="id"
|
||||
select="findComponentsByPlatformId"/>
|
||||
</resultMap>
|
||||
<select id="findPlatformComponents" resultMap="VPlatformMap"
|
||||
parameterType="java.lang.Integer">
|
||||
SELECT
|
||||
p.*,
|
||||
pc.*
|
||||
FROM platform p
|
||||
LEFT JOIN platform_component pc ON p.id = pc.platform_id
|
||||
WHERE pc.type = "comm"
|
||||
AND p.scenario_id = #{scenarioId}
|
||||
GROUP BY p.id;
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user