diff options
| -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 |
