|
@@ -6,12 +6,12 @@
|
|
|
SELECT * FROM
|
|
SELECT * FROM
|
|
|
(
|
|
(
|
|
|
SELECT t.id,t.hostName,t.hostIp,t.hostMac,t.hostStatus,t.agentVersion,
|
|
SELECT t.id,t.hostName,t.hostIp,t.hostMac,t.hostStatus,t.agentVersion,
|
|
|
- h.org_id AS hostOrg,h.organize_name AS hostOrgName,h.mirror_version AS mirrorVersion,h.coreTimeStamp AS coreTimeStamp,
|
|
|
|
|
|
|
+ h.org_id AS hostOrg,h.org_name AS hostOrgName,h.coreTimeStamp,
|
|
|
t.register_date as registerDateTime,t.encryption,
|
|
t.register_date as registerDateTime,t.encryption,
|
|
|
z.zip_version as zipVersion,z.target_version as targetVersion,z.status as updateStatus,
|
|
z.zip_version as zipVersion,z.target_version as targetVersion,z.status as updateStatus,
|
|
|
IF ((( SELECT COUNT(*) FROM t_app_run_info WHERE app_type != 'Tool' and host_id = t.id AND running = 0 ) < 1), 1, 0) AS serverStatus
|
|
IF ((( SELECT COUNT(*) FROM t_app_run_info WHERE app_type != 'Tool' and host_id = t.id AND running = 0 ) < 1), 1, 0) AS serverStatus
|
|
|
FROM t_host_info t
|
|
FROM t_host_info t
|
|
|
- LEFT JOIN hv_host_organize h ON t.id = h.register_code
|
|
|
|
|
|
|
+ LEFT JOIN hv_host_org h ON t.id = h.register_code
|
|
|
LEFT JOIN t_host_zip_info z on t.id = z.host_id
|
|
LEFT JOIN t_host_zip_info z on t.id = z.host_id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="infoVo.zipVersion != '' and infoVo.zipVersion != null">
|
|
<if test="infoVo.zipVersion != '' and infoVo.zipVersion != null">
|
|
@@ -70,9 +70,8 @@
|
|
|
t.hostStatus,
|
|
t.hostStatus,
|
|
|
t.agentVersion,
|
|
t.agentVersion,
|
|
|
h.org_id AS hostOrg,
|
|
h.org_id AS hostOrg,
|
|
|
- h.organize_name AS hostOrgName,
|
|
|
|
|
- h.mirror_version AS mirrorVersion,
|
|
|
|
|
- h.coreTimeStamp AS coreTimeStamp,
|
|
|
|
|
|
|
+ h.org_name AS hostOrgName,
|
|
|
|
|
+ h.coreTimeStamp ,
|
|
|
t.register_date as registerDateTime,
|
|
t.register_date as registerDateTime,
|
|
|
z.zip_version as zipVersion,
|
|
z.zip_version as zipVersion,
|
|
|
z.target_version as targetVersion,
|
|
z.target_version as targetVersion,
|
|
@@ -81,7 +80,7 @@
|
|
|
IF ((( SELECT COUNT(*) FROM t_app_run_info WHERE app_type != 'Tool' and host_id = t.id AND running = 0 ) < 1), 1, 0) AS serverStatus
|
|
IF ((( SELECT COUNT(*) FROM t_app_run_info WHERE app_type != 'Tool' and host_id = t.id AND running = 0 ) < 1), 1, 0) AS serverStatus
|
|
|
FROM
|
|
FROM
|
|
|
t_host_info t
|
|
t_host_info t
|
|
|
- LEFT JOIN hv_host_organize h ON t.id = h.register_code
|
|
|
|
|
|
|
+ LEFT JOIN hv_host_org h ON t.id = h.register_code
|
|
|
LEFT JOIN t_host_zip_info z on t.id = z.host_id
|
|
LEFT JOIN t_host_zip_info z on t.id = z.host_id
|
|
|
where t.id = #{id}
|
|
where t.id = #{id}
|
|
|
</select>
|
|
</select>
|
|
@@ -119,8 +118,8 @@
|
|
|
h.hostStatus,h.accessToken,h.expiresIn,h.tokenType,h.scope,h.agentVersion,
|
|
h.hostStatus,h.accessToken,h.expiresIn,h.tokenType,h.scope,h.agentVersion,
|
|
|
h.isPush,h.tokenCreateTime,h.coreTimeStamp,h.frontTimeStamp,h.upload_version,h.encryption
|
|
h.isPush,h.tokenCreateTime,h.coreTimeStamp,h.frontTimeStamp,h.upload_version,h.encryption
|
|
|
from t_host_info h
|
|
from t_host_info h
|
|
|
- left join hv_host_organize v on h.id = v.register_code
|
|
|
|
|
- left join hv_organize o on v.org_id = o.organize_id
|
|
|
|
|
|
|
+ left join hv_host_org v on h.id = v.register_code
|
|
|
|
|
+ left join hv_org o on v.org_id = o.org_id
|
|
|
where 1 =1
|
|
where 1 =1
|
|
|
<if test="orgId != '' and orgId != null">
|
|
<if test="orgId != '' and orgId != null">
|
|
|
and o.is_deleted = 0 and o.path like concat('%#', #{orgId}, '#%' )
|
|
and o.is_deleted = 0 and o.path like concat('%#', #{orgId}, '#%' )
|
|
@@ -143,10 +142,10 @@
|
|
|
SELECT
|
|
SELECT
|
|
|
h.id,h.hostName,h.hostIp,h.hostSystem,h.hostFrame,h.hostMac,h.hostOrg,h.hostStatus,h.accessToken,h.expiresIn,h.tokenType,h.scope,h.agentVersion,
|
|
h.id,h.hostName,h.hostIp,h.hostSystem,h.hostFrame,h.hostMac,h.hostOrg,h.hostStatus,h.accessToken,h.expiresIn,h.tokenType,h.scope,h.agentVersion,
|
|
|
if(h.agentVersion=(SELECT h.agentVersion as version FROM t_host_info UNION SELECT package_version as version FROM t_package_info order by version DESC limit 1 ),0,1) as upgradeFlag,
|
|
if(h.agentVersion=(SELECT h.agentVersion as version FROM t_host_info UNION SELECT package_version as version FROM t_package_info order by version DESC limit 1 ),0,1) as upgradeFlag,
|
|
|
- h.isPush,h.tokenCreateTime, h.coreTimeStamp,h.frontTimeStamp,h.upload_version,h.encryption,v.organize_name AS orgName
|
|
|
|
|
|
|
+ h.isPush,h.tokenCreateTime, h.coreTimeStamp,h.frontTimeStamp,h.upload_version,h.encryption,v.org_name AS orgName
|
|
|
FROM t_host_info h
|
|
FROM t_host_info h
|
|
|
- LEFT JOIN hv_host_organize v ON h.id = v.register_code
|
|
|
|
|
- LEFT JOIN hv_organize o ON v.org_id = o.ORGANIZE_ID
|
|
|
|
|
|
|
+ LEFT JOIN hv_host_org v ON h.id = v.register_code
|
|
|
|
|
+ LEFT JOIN hv_org o ON v.org_id = o.org_id
|
|
|
<where>
|
|
<where>
|
|
|
<if test="info.hostOrg != '' and info.hostOrg != null">
|
|
<if test="info.hostOrg != '' and info.hostOrg != null">
|
|
|
o.IS_DELETED = 0 AND o.PATH LIKE CONCAT('%#', #{info.hostOrg}, '#%' )
|
|
o.IS_DELETED = 0 AND o.PATH LIKE CONCAT('%#', #{info.hostOrg}, '#%' )
|