fix: mgt list 接口 返回 workspaces 参数

This commit is contained in:
zhangshuai
2024-09-10 16:18:39 +08:00
parent 584cce1629
commit 6698bc6a66

View File

@@ -33,6 +33,11 @@
<result property="name" column="name"/>
<result property="userName" column="user_name"/>
</association>
<collection property="workspaces" columnPrefix="ws_" ofType="net.geedge.asw.module.workspace.entity.WorkspaceEntity">
<result property="id" column="id"/>
<result property="name" column="name"/>
</collection>
</resultMap>
<select id="queryList" resultMap="deviceResult">
@@ -45,12 +50,16 @@
uu.id AS uu_id,
uu.name AS uu_name,
uu.user_name AS uu_user_name
uu.user_name AS uu_user_name,
ws.id AS ws_id,
ws.name AS ws_name
FROM environment e
LEFT JOIN sys_user cu ON e.create_user_id = cu.id
LEFT JOIN sys_user uu ON e.update_user_id = uu.id
LEFT JOIN environment_session es ON e.id = es.env_id
LEFT JOIN environment_workspace ew ON e.id = ew.env_id
LEFT JOIN workspace ws ON ws.id = ew.workspace_id
<where>
<if test="params.ids != null and params.ids != ''">
e.id in