From 927dadd6d20319abe708d7370af27549a6049bfa Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 19 Jul 2021 10:23:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.5__add_tag_color.sql | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.5__add_tag_color.sql diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.5__add_tag_color.sql b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.5__add_tag_color.sql new file mode 100644 index 0000000000..fad88adfab --- /dev/null +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.5__add_tag_color.sql @@ -0,0 +1,37 @@ +#添加标签颜色字段 +ALTER TABLE `epmet_gov_voice`.`tag_default` + ADD COLUMN `TAG_COLOR` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '标签颜色' AFTER `TAG_NAME`, + DROP PRIMARY KEY, + ADD PRIMARY KEY (`ID`) USING BTREE; +ALTER TABLE `epmet_gov_voice`.`tag_customer` + ADD COLUMN `TAG_COLOR` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '标签颜色' AFTER `TAG_NAME`, + DROP PRIMARY KEY, + ADD PRIMARY KEY (`ID`) USING BTREE; +#给默认标签添加颜色 +update tag_default set tag_color='#E3271C' where id='6dd39a3dab9011ea8c52c03fd56f7847'; +update tag_default set tag_color='#FB7900' where id='6dd55595ab9011ea8c52c03fd56f7847'; +update tag_default set tag_color='#FFC100' where id='6dd6c2eeab9011ea8c52c03fd56f7847'; +update tag_default set tag_color='#0089FF' where id='6dd804d1ab9011ea8c52c03fd56f7847'; +update tag_default set tag_color='#17B886' where id='6dda6acaab9011ea8c52c03fd56f7847'; + +#给已有的客户默认标签 添加统一的颜色 +update tag_customer set tag_color='#E3271C' where TAG_NAME='发现榜样'; +update tag_customer set tag_color='#FB7900' where TAG_NAME='党建动态'; +update tag_customer set tag_color='#FFC100' where TAG_NAME='通知公告'; +update tag_customer set tag_color='#0089FF' where TAG_NAME='生活服务'; +update tag_customer set tag_color='#17B886' where TAG_NAME='党建要闻'; + +#手动去执行 +#获取有哪些客户的标签需要赋值颜色 +# SELECT CUSTOMER_ID ,COUNT(ID) c FROM tag_customer where tag_color IS NULL GROUP BY CUSTOMER_ID; +#按照时间顺序 依次更新5个颜色 +# update tag_customer set tag_color='#E3271C' where tag_color is null and customer_id = '上面sql客户Id' order by created_time desc limit 1; +# update tag_customer set tag_color='#FB7900' where tag_color is null and customer_id = '上面sql客户Id' order by created_time desc limit 1; +# update tag_customer set tag_color='#FFC100' where tag_color is null and customer_id = '上面sql客户Id' order by created_time desc limit 1; +# update tag_customer set tag_color='#0089FF' where tag_color is null and customer_id = '上面sql客户Id' order by created_time desc limit 1; +# update tag_customer set tag_color='#17B886' where tag_color is null and customer_id = '上面sql客户Id' order by created_time desc limit 1; + + + + + From 27718028ccfb1ac3cb22a4dae7439c93381195bb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 19 Jul 2021 10:40:36 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E3=80=90=E4=B8=93=E9=A2=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=80=91=E5=B7=B2=E6=9C=89=E4=B8=93=E9=A2=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BF=94=E5=8F=82=E5=A2=9E=E5=8A=A0tagColor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/WorkSpecialSubjectResultDTO.java | 5 +++++ .../src/main/resources/mapper/SpecialSubjectDao.xml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java index d82e148a93..823ecbed6a 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java @@ -23,6 +23,11 @@ public class WorkSpecialSubjectResultDTO implements Serializable { */ private String tagName; + /** + * 标签颜色 + */ + private String tagColor; + /** * true代表可以删除。false不可删除,隐藏减号 */ diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml index 706460004d..4cd83f8b3a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/SpecialSubjectDao.xml @@ -11,7 +11,8 @@