重构终端功能.

This commit is contained in:
lijiahang
2024-07-23 10:47:59 +08:00
parent 4bd2de4ce2
commit 3a8eac4d4a
5 changed files with 25 additions and 54 deletions

View File

@@ -43,7 +43,7 @@ public enum OutputTypeEnum {
/**
* SFTP 文件列表
*/
SFTP_LIST("ls", "${type}|${sessionId}|${path}|${result}|${body}"),
SFTP_LIST("ls", "${type}|${sessionId}|${path}|${result}|${msg}|${body}"),
/**
* SFTP 创建文件夹
@@ -78,12 +78,12 @@ public enum OutputTypeEnum {
/**
* SFTP 下载文件夹展开文件
*/
SFTP_DOWNLOAD_FLAT_DIRECTORY("df", "${type}|${sessionId}|${currentPath}|${body}"),
SFTP_DOWNLOAD_FLAT_DIRECTORY("df", "${type}|${sessionId}|${currentPath}|${result}|${msg}|${body}"),
/**
* SFTP 获取文件内容
*/
SFTP_GET_CONTENT("gc", "${type}|${sessionId}|${path}|${result}|${content}"),
SFTP_GET_CONTENT("gc", "${type}|${sessionId}|${path}|${result}|${msg}|${content}"),
/**
* SFTP 修改文件内容

View File

@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.orion.visor.module.asset.dao.HostConfigDAO">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.orion.visor.module.asset.entity.domain.HostConfigDO">
<id column="id" property="id"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="creator" property="creator"/>
<result column="updater" property="updater"/>
<result column="deleted" property="deleted"/>
<result column="host_id" property="hostId"/>
<result column="type" property="type"/>
<result column="status" property="status"/>
<result column="config" property="config"/>
<result column="version" property="version"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, host_id, type, status, config, version, create_time, update_time, creator, updater, deleted
</sql>
<update id="setKeyIdWithNull">
UPDATE host_config
SET version = version + 1,
config = JSON_REMOVE(config, '$.keyId')
WHERE deleted = 0
<foreach collection="keyIdList" item="item" separator="OR" open="AND (" close=")">
JSON_CONTAINS(config, JSON_OBJECT('keyId', #{item}))
</foreach>
</update>
<update id="setIdentityIdWithNull">
UPDATE host_config
SET version = version + 1,
config = JSON_REMOVE(config, '$.identityId')
WHERE deleted = 0
<foreach collection="identityIdList" item="item" separator="OR" open="AND (" close=")">
JSON_CONTAINS(config, JSON_OBJECT('identityId', #{item}))
</foreach>
</update>
</mapper>