From 0645eb4b4aa66c2319c3f268e182f5091db45a33 Mon Sep 17 00:00:00 2001
From: hejianhao <15708179461@qq.com>
Date: 星期四, 20 八月 2026 12:49:51 +0800
Subject: [PATCH] feat0806: 注册诊所时不同步给微赞&提交项目介绍表
---
tcm-training-admin-backend/src/main/java/com/tcm/training/admin/app/register/service/AppRegisterService.java | 26 +++++++++++++-------------
tcm-training-admin-backend/sql/20260806_admin.sql | 26 ++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 13 deletions(-)
diff --git a/tcm-training-admin-backend/sql/20260806_admin.sql b/tcm-training-admin-backend/sql/20260806_admin.sql
index e564d1c..58df591 100644
--- a/tcm-training-admin-backend/sql/20260806_admin.sql
+++ b/tcm-training-admin-backend/sql/20260806_admin.sql
@@ -98,3 +98,29 @@
INSERT INTO sys_menu (id, parent_id, name, menu_code, type, path, component, icon, sort, status, visible, permission_key, remark, deleted)
VALUES (6013, 6010, '删除项目介绍', 'live_project_introduction_delete', 'B', NULL, NULL, NULL, 3, 1, 1, 'live:project-introduction:delete', '项目介绍删除按钮', 0)
ON DUPLICATE KEY UPDATE parent_id = VALUES(parent_id), name = VALUES(name), menu_code = VALUES(menu_code), type = VALUES(type), sort = VALUES(sort), status = VALUES(status), visible = VALUES(visible), permission_key = VALUES(permission_key), remark = VALUES(remark), deleted = 0;
+
+-- ----------------------------
+-- 项目介绍表
+-- ----------------------------
+CREATE TABLE IF NOT EXISTS `tcm_project_introduction` (
+ `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
+ `title` VARCHAR(128) NOT NULL COMMENT '标题',
+ `cover_img` VARCHAR(512) DEFAULT NULL COMMENT '封面图',
+ `category` VARCHAR(32) NOT NULL COMMENT '类别:平台介绍、营销模式、营销动作',
+ `content_type` TINYINT NOT NULL COMMENT '类型:1图文 2视频',
+ `content` MEDIUMTEXT COMMENT '图文内容(富文本HTML)',
+ `video_url` VARCHAR(512) DEFAULT NULL COMMENT '视频地址',
+ `video_file_name` VARCHAR(255) DEFAULT NULL COMMENT '视频文件名',
+ `click_count` INT NOT NULL DEFAULT 0 COMMENT '点击量',
+ `status` TINYINT NOT NULL DEFAULT 1 COMMENT '状态:1启用 0禁用',
+ `deleted` TINYINT(1) NOT NULL DEFAULT 0,
+ `created_by` VARCHAR(64) NOT NULL DEFAULT '系统' COMMENT '创建人',
+ `updated_by` VARCHAR(64) NOT NULL DEFAULT '系统' COMMENT '更新人',
+ `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`id`),
+ KEY `idx_category` (`category`),
+ KEY `idx_content_type` (`content_type`),
+ KEY `idx_status` (`status`),
+ KEY `idx_created_at` (`created_at`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目介绍表';
diff --git a/tcm-training-admin-backend/src/main/java/com/tcm/training/admin/app/register/service/AppRegisterService.java b/tcm-training-admin-backend/src/main/java/com/tcm/training/admin/app/register/service/AppRegisterService.java
index 62e1752..0640522 100644
--- a/tcm-training-admin-backend/src/main/java/com/tcm/training/admin/app/register/service/AppRegisterService.java
+++ b/tcm-training-admin-backend/src/main/java/com/tcm/training/admin/app/register/service/AppRegisterService.java
@@ -194,19 +194,19 @@
user.setClinicId(clinic.getId());
userMapper.insert(user);
- Integer provinceCode = parseRegionCode(clinic.getProvinceCode(), "省编码");
- Integer cityCode = parseRegionCode(clinic.getCityCode(), "市编码");
- Integer areaCode = parseRegionCode(clinic.getDistrictCode(), "区县编码");
- log.info("调用微赞创建门店,入参 title={}, provinceCode={}, cityCode={}, areaCode={}, address={}, telephone={}",
- clinic.getName(), provinceCode, cityCode, areaCode, clinic.getAddress(), clinic.getContactPhone());
- try {
- JsonNode vzanResponse = vzanHttpUtil.createStore(clinic.getName(), provinceCode, cityCode, areaCode, clinic.getAddress(), clinic.getContactPhone());
- log.info("微赞创建门店成功,出参={}", vzanResponse);
- } catch (RuntimeException ex) {
- log.error("微赞创建门店失败,本地事务将回滚,入参 title={}, provinceCode={}, cityCode={}, areaCode={}, address={}, telephone={}",
- clinic.getName(), provinceCode, cityCode, areaCode, clinic.getAddress(), clinic.getContactPhone(), ex);
- throw new IllegalStateException("微赞创建门店失败", ex);
- }
+// Integer provinceCode = parseRegionCode(clinic.getProvinceCode(), "省编码");
+// Integer cityCode = parseRegionCode(clinic.getCityCode(), "市编码");
+// Integer areaCode = parseRegionCode(clinic.getDistrictCode(), "区县编码");
+// log.info("调用微赞创建门店,入参 title={}, provinceCode={}, cityCode={}, areaCode={}, address={}, telephone={}",
+// clinic.getName(), provinceCode, cityCode, areaCode, clinic.getAddress(), clinic.getContactPhone());
+// try {
+// JsonNode vzanResponse = vzanHttpUtil.createStore(clinic.getName(), provinceCode, cityCode, areaCode, clinic.getAddress(), clinic.getContactPhone());
+// log.info("微赞创建门店成功,出参={}", vzanResponse);
+// } catch (RuntimeException ex) {
+// log.error("微赞创建门店失败,本地事务将回滚,入参 title={}, provinceCode={}, cityCode={}, areaCode={}, address={}, telephone={}",
+// clinic.getName(), provinceCode, cityCode, areaCode, clinic.getAddress(), clinic.getContactPhone(), ex);
+// throw new IllegalStateException("微赞创建门店失败", ex);
+// }
clearDraft(request.getRegisterTicket());
return createLoginResponse(user);
--
Gitblit v1.7.1