更新
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- 诊单编辑页:查看完整手机号(无此权限时仅脱敏,需点击展开)
|
||||
-- 将按钮挂在「中医诊单」菜单下(perms = tcm.diagnosis/lists);若库中结构不同请改 pid。
|
||||
INSERT INTO `zyt_system_menu` (`pid`, `type`, `name`, `icon`, `sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_cache`, `is_show`, `is_disable`, `create_time`, `update_time`)
|
||||
SELECT `id`, 'A', '手机号明文', '', 21, 'tcm.diagnosis/phonePlain', '', '', '', '', 0, 1, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
|
||||
FROM `zyt_system_menu` WHERE `perms` = 'tcm.diagnosis/lists' LIMIT 1;
|
||||
@@ -0,0 +1,3 @@
|
||||
-- 处方:系统代开标记(如医生在挂号列表点「完成」后自动生成、无药材配方)
|
||||
ALTER TABLE `zyt_tcm_prescription`
|
||||
ADD COLUMN `is_system_auto` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '系统代开:1=完成挂号等自动生成' AFTER `is_shared`;
|
||||
@@ -0,0 +1,22 @@
|
||||
-- 企业微信「客户联系」事件流水表
|
||||
-- 用途:
|
||||
-- 1) 记录每一次 change_external_contact 推送,用于"今天进来多少人(=add_external_contact 次数)"等精确统计;
|
||||
-- 2) 独立于 zyt_qywx_external_contact(会被软删/UPSERT 覆盖),保证统计零误差;
|
||||
-- 3) 企微对非 2xx 响应最多重试 3 次,(change_type, user_id, external_userid, event_time) 唯一键保证幂等。
|
||||
CREATE TABLE IF NOT EXISTS `zyt_qywx_external_contact_event` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`change_type` varchar(32) NOT NULL DEFAULT '' COMMENT 'change_external_contact 下的子类型,如 add_external_contact/del_external_contact/del_follow_user/transfer_fail 等',
|
||||
`user_id` varchar(64) NOT NULL DEFAULT '' COMMENT '企业员工 userid(可能为空)',
|
||||
`external_userid` varchar(64) NOT NULL DEFAULT '' COMMENT '外部联系人 external_userid(可能为空,如渠道活码尚未产生客户)',
|
||||
`state` varchar(128) NOT NULL DEFAULT '' COMMENT '企微 State(推广渠道自定义参数),用于分渠道统计',
|
||||
`fail_reason` varchar(64) NOT NULL DEFAULT '' COMMENT 'transfer_fail 等事件的失败原因',
|
||||
`welcome_code` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT '是否带欢迎码(1=带;不落 code 原文以免泄漏)',
|
||||
`event_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '企微 CreateTime(事件发生时间戳,秒)',
|
||||
`create_time` int(10) unsigned NOT NULL DEFAULT 0 COMMENT '本地入库时间(秒)',
|
||||
`raw` text DEFAULT NULL COMMENT '事件原文 JSON(调试用,可定期清理)',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_change_user_ext_time` (`change_type`, `user_id`, `external_userid`, `event_time`),
|
||||
KEY `idx_change_time` (`change_type`, `event_time`),
|
||||
KEY `idx_event_time` (`event_time`),
|
||||
KEY `idx_state` (`state`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业微信外部联系人事件流水(用于进入计数)';
|
||||
Reference in New Issue
Block a user