From 31c2e366e339a3565d3fd1bdd42184d517f8598c Mon Sep 17 00:00:00 2001 From: pengshiyu <1940607002@qq.com> Date: Thu, 1 Feb 2024 23:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=9F=9F=E5=90=8Dicp?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain_admin/migrate/migrate_config.py | 4 ++-- domain_admin/service/domain_info_service.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/domain_admin/migrate/migrate_config.py b/domain_admin/migrate/migrate_config.py index 12a2ebc925..bf7a013294 100644 --- a/domain_admin/migrate/migrate_config.py +++ b/domain_admin/migrate/migrate_config.py @@ -308,8 +308,8 @@ 'migrate_func': migrate_1533_to_1534.execute_migrate, 'update_version': VersionEnum.Version_1534 }, - # 2023-11-28 - # 1.5.33 => 1.5.34 + # 2024-01-28 + # 1.5.34 => 1.6.2 { 'local_versions': [ VersionEnum.Version_1534, diff --git a/domain_admin/service/domain_info_service.py b/domain_admin/service/domain_info_service.py index 83844a121c..effeb5c65f 100644 --- a/domain_admin/service/domain_info_service.py +++ b/domain_admin/service/domain_info_service.py @@ -229,6 +229,11 @@ def add_domain_from_file(filename, user_id): 'comment': item.get('comment'), 'group_id': group_map.get(item.get('group_name'), 0), 'tags_raw': json.dumps(item.get('tags'), ensure_ascii=False), + 'domain_start_time': item.get('domain_start_date'), + 'domain_expire_time': item.get('domain_expire_date'), + 'domain_expire_days': item.get('real_domain_expire_days') or 0, + 'icp_company': item.get('icp_company'), + 'icp_licence': item.get('icp_licence'), 'user_id': user_id, } for item in lst if item.get('root_domain') ] @@ -376,7 +381,8 @@ def handle_auto_import_domain_info(current_user_id): # icp信息 for row in lst: - update_domain_row_icp(row) + if not row.icp_company: + update_domain_row_icp(row) # 导入子域名 for row in lst: