diff options
| author | zhangshuai <[email protected]> | 2024-09-10 16:18:39 +0800 |
|---|---|---|
| committer | zhangshuai <[email protected]> | 2024-09-10 16:18:39 +0800 |
| commit | 6698bc6a66bcaaca8e401087ec31765230ca20fa (patch) | |
| tree | 7cad871550254356b139bc8a4d680c778f928f2c | |
| parent | 584cce162966d28ee15fa986a6f6d4160d295f9c (diff) | |
fix: mgt list 接口 返回 workspaces 参数
| -rw-r--r-- | src/main/resources/db/mapper/device/EnvironmentMapper.xml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/resources/db/mapper/device/EnvironmentMapper.xml b/src/main/resources/db/mapper/device/EnvironmentMapper.xml index 92acaba..639cf76 100644 --- a/src/main/resources/db/mapper/device/EnvironmentMapper.xml +++ b/src/main/resources/db/mapper/device/EnvironmentMapper.xml @@ -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 |
