From a113499a467dd8cdcb1c1a02d4c346c816a98f0d Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Mon, 20 Oct 2025 09:53:48 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=A1=A8text=E7=B1=BB=E5=9E=8B=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=9A=84SQL=E8=AF=AD=E5=8F=A5=E5=8A=A0=E4=B8=8AtypeHandler=3DC?= =?UTF-8?q?ompressHandler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1405671310852096]数据库表text类型字段的SQL语句加上typeHandler=CompressHandler http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1405671310852096 --- .../dao/mapper/ci/CiTopoTemplateMapper.xml | 4 ++-- .../module/cmdb/dao/mapper/ci/RelMapper.xml | 2 +- .../cientity/CiEntitySnapshotMapper.xml | 2 +- .../mapper/customview/CustomViewMapper.xml | 10 +++++----- .../mapper/globalattr/GlobalAttrMapper.xml | 4 ++-- .../cmdb/dao/mapper/group/GroupMapper.xml | 2 +- .../resourcecenter/ResourceAccountMapper.xml | 6 +++--- .../resourcecenter/ResourceEntityMapper.xml | 20 +++++++++---------- .../resourcecenter/ResourceTagMapper.xml | 4 ++-- .../cmdb/dao/mapper/sync/SyncMapper.xml | 4 ++-- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/CiTopoTemplateMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/CiTopoTemplateMapper.xml index b67c40e0..2258f6a7 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/CiTopoTemplateMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/CiTopoTemplateMapper.xml @@ -41,7 +41,7 @@ set name = #{name}, is_active = #{isActive}, is_default = #{isDefault}, - config = #{configStr} + config = #{configStr, typeHandler=CompressHandler} where id = #{id} @@ -57,7 +57,7 @@ #{name}, #{isDefault}, #{isActive}, - #{configStr}) + #{configStr, typeHandler=CompressHandler}) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/RelMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/RelMapper.xml index 0f020686..1a1f7052 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/RelMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/ci/RelMapper.xml @@ -570,7 +570,7 @@ along with this program. If not, see .--> insert ignore into cmdb_relativerel (rel_id, relative_rel_id, from_path, to_path, path_hash) - values (#{relId}, #{relativeRelId}, #{fromPath}, #{toPath}, #{hash}) + values (#{relId}, #{relativeRelId}, #{fromPath, typeHandler=CompressHandler}, #{toPath, typeHandler=CompressHandler}, #{hash}) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/cientity/CiEntitySnapshotMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/cientity/CiEntitySnapshotMapper.xml index 45d405e0..e69f9248 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/cientity/CiEntitySnapshotMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/cientity/CiEntitySnapshotMapper.xml @@ -9,6 +9,6 @@ INSERT IGNORE INTO `cmdb_cientity_snapshot` (`hash`, `content`) - VALUES (#{hash}, #{content}); + VALUES (#{hash}, #{content, typeHandler=CompressHandler}); diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/customview/CustomViewMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/customview/CustomViewMapper.xml index 61a82d99..ce3a6c6e 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/customview/CustomViewMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/customview/CustomViewMapper.xml @@ -569,10 +569,10 @@ along with this program. If not, see .--> INSERT INTO cmdb_customview_template (`customview_id`, `name`, `template`, `config`, `is_active`) - VALUES (#{customViewId}, #{name}, #{template}, #{config}, #{isActive}) + VALUES (#{customViewId}, #{name}, #{template, typeHandler=CompressHandler}, #{config, typeHandler=CompressHandler}, #{isActive}) ON DUPLICATE KEY UPDATE `name` = #{name}, - `template` = #{template}, - `config` = #{config}, + `template` = #{template, typeHandler=CompressHandler}, + `config` = #{config, typeHandler=CompressHandler}, `is_active` = #{isActive} @@ -663,7 +663,7 @@ along with this program. If not, see .--> #{sort}, #{isHidden}, #{isPrimary}, - #{conditionStr}) + #{conditionStr, typeHandler=CompressHandler}) @@ -687,7 +687,7 @@ along with this program. If not, see .--> #{sort}, #{isHidden}, #{isPrimary}, - #{conditionStr}) + #{conditionStr, typeHandler=CompressHandler}) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/globalattr/GlobalAttrMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/globalattr/GlobalAttrMapper.xml index e41bb272..e6833e22 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/globalattr/GlobalAttrMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/globalattr/GlobalAttrMapper.xml @@ -250,7 +250,7 @@ along with this program. If not, see .--> set label = #{label}, is_active = #{isActive}, is_multiple = #{isMultiple}, - description = #{description} + description = #{description, typeHandler=CompressHandler} where id = #{id} @@ -280,7 +280,7 @@ along with this program. If not, see .--> #{label}, #{isActive}, #{isMultiple}, - #{description}, + #{description, typeHandler=CompressHandler}, 0) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/group/GroupMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/group/GroupMapper.xml index 624d9b9b..011d1ed1 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/group/GroupMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/group/GroupMapper.xml @@ -332,7 +332,7 @@ along with this program. If not, see .--> update cmdb_group set status = #{status}, server_id = #{serverId}, - error = #{error} + error = #{error, typeHandler=CompressHandler} where id = #{id} diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceAccountMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceAccountMapper.xml index a4690981..fbadf8ca 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceAccountMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceAccountMapper.xml @@ -493,7 +493,7 @@ along with this program. If not, see .--> a.`account` = #{account}, - a.`password` = #{passwordCipher}, + a.`password` = #{passwordCipher, typeHandler=CompressHandler}, a.protocol_id = #{protocolId}, @@ -506,7 +506,7 @@ along with this program. If not, see .--> update `cmdb_resourcecenter_account` - set password = #{password} + set password = #{password, typeHandler=CompressHandler} where id = #{id} @@ -537,7 +537,7 @@ along with this program. If not, see .--> #{name}, #{account}, - #{passwordCipher}, + #{passwordCipher, typeHandler=CompressHandler}, #{protocolId}, #{type}, diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceEntityMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceEntityMapper.xml index cf225bf1..f7e1a11c 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceEntityMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceEntityMapper.xml @@ -86,22 +86,22 @@ along with this program. If not, see .--> INSERT INTO cmdb_resourcecenter_entity (`name`, `label`, `status`, `error`, `init_time`, `ci_id`, `config`, `description`) - VALUES (#{name}, #{label}, #{status}, #{error}, NOW(3), #{ciId}, #{configStr}, #{description}) + VALUES (#{name}, #{label}, #{status}, #{error, typeHandler=CompressHandler}, NOW(3), #{ciId}, #{configStr, typeHandler=CompressHandler}, #{description, typeHandler=CompressHandler}) ON DUPLICATE KEY UPDATE `label` = #{label}, - `error` = #{error}, + `error` = #{error, typeHandler=CompressHandler}, `status` = #{status}, - `config` = #{configStr}, + `config` = #{configStr, typeHandler=CompressHandler}, - `description`= #{description}, + `description`= #{description, typeHandler=CompressHandler}, `ci_id` = #{ciId}, @@ -156,9 +156,9 @@ along with this program. If not, see .--> UPDATE cmdb_resourcecenter_entity SET `status` = #{status}, `label` = #{label}, - `error` = #{error}, - `config` = #{configStr}, - `description`= #{description}, + `error` = #{error, typeHandler=CompressHandler}, + `config` = #{configStr, typeHandler=CompressHandler}, + `description`= #{description, typeHandler=CompressHandler}, `init_time` = NOW(3) WHERE `name` = #{name} @@ -167,7 +167,7 @@ along with this program. If not, see .--> parameterType="neatlogic.framework.cmdb.dto.resourcecenter.config.ResourceEntityVo"> UPDATE cmdb_resourcecenter_entity SET `status` = #{status}, - `error` = #{error}, + `error` = #{error, typeHandler=CompressHandler}, `init_time` = NOW(3) WHERE `name` = #{name} @@ -177,8 +177,8 @@ along with this program. If not, see .--> UPDATE cmdb_resourcecenter_entity SET `label`= #{label}, - `description`= #{description}, - `config`= #{configStr}, + `description`= #{description, typeHandler=CompressHandler}, + `config`= #{configStr, typeHandler=CompressHandler}, `ci_id`= #{ciId}, `init_time` = NOW(3) WHERE `name` = #{name} diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceTagMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceTagMapper.xml index 6c3f0382..336b2ecd 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceTagMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceTagMapper.xml @@ -174,7 +174,7 @@ along with this program. If not, see .--> update `cmdb_tag` set `name` = #{name}, - `description` = #{description} + `description` = #{description, typeHandler=CompressHandler} where `id` = #{id} @@ -184,7 +184,7 @@ along with this program. If not, see .--> `description`) values (#{id}, #{name}, - #{description}) + #{description, typeHandler=CompressHandler}) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/sync/SyncMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/sync/SyncMapper.xml index 39b6bff2..475d3d4d 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/sync/SyncMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/sync/SyncMapper.xml @@ -532,7 +532,7 @@ along with this program. If not, see .--> update cmdb_sync_policy set ci_collection_id = #{ciCollectionId}, is_active = #{isActive}, - `condition` = #{conditionStr}, + `condition` = #{conditionStr, typeHandler=CompressHandler}, name = #{name} WHERE id = #{id} @@ -564,7 +564,7 @@ along with this program. If not, see .--> insert into cmdb_sync_policy (id, ci_id, ci_collection_id, is_active, `condition`, name) - VALUES (#{id}, #{ciId}, #{ciCollectionId}, #{isActive}, #{conditionStr}, #{name}) + VALUES (#{id}, #{ciId}, #{ciCollectionId}, #{isActive}, #{conditionStr, typeHandler=CompressHandler}, #{name}) -- Gitee