更新数据格式
This commit is contained in:
@@ -82,7 +82,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="findComponentsByPlatformId" resultMap="VPlatformComponentMap">
|
<select id="findComponentsByPlatformId" resultMap="VPlatformComponentMap">
|
||||||
SELECT * FROM platform_component
|
SELECT * FROM platform_component
|
||||||
WHERE platform_id=#{platformId}
|
WHERE platform_id=#{platformId} AND platform_component.type = "comm"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<resultMap id="VPlatformMap" type="com.solution.rule.domain.Platform">
|
<resultMap id="VPlatformMap" type="com.solution.rule.domain.Platform">
|
||||||
@@ -96,14 +96,26 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="findPlatformComponents" resultMap="VPlatformMap"
|
<select id="findPlatformComponents" resultMap="VPlatformMap"
|
||||||
parameterType="java.lang.Integer">
|
parameterType="java.lang.Integer">
|
||||||
SELECT DISTINCT
|
<!-- SELECT DISTINCT-->
|
||||||
p.*,
|
<!-- p.*,-->
|
||||||
pc.*
|
<!-- pc.*-->
|
||||||
|
<!-- FROM platform p-->
|
||||||
|
<!-- LEFT JOIN platform_component pc ON p.id = pc.platform_id-->
|
||||||
|
<!-- WHERE pc.type = 'comm'-->
|
||||||
|
<!-- AND p.scenario_id = #{scenarioId}-->
|
||||||
|
<!-- ORDER BY p.name,pc.name-->
|
||||||
|
SELECT
|
||||||
|
p.id,
|
||||||
|
p.name,
|
||||||
|
p.description
|
||||||
FROM platform p
|
FROM platform p
|
||||||
LEFT JOIN platform_component pc ON p.id = pc.platform_id
|
WHERE p.scenario_id = #{scenarioId}
|
||||||
WHERE pc.type = 'comm'
|
AND EXISTS (
|
||||||
AND p.scenario_id = #{scenarioId}
|
SELECT 1 FROM platform_component pc
|
||||||
ORDER BY p.name,pc.name
|
WHERE pc.platform_id = p.id
|
||||||
|
AND pc.type = 'comm'
|
||||||
|
)
|
||||||
|
ORDER BY p.name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user