From fc9745cd8939721eea48bbb203ec8c92417b0c08 Mon Sep 17 00:00:00 2001 From: rogersun Date: Tue, 21 Apr 2026 09:51:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- product/models.py | 2 ++ update/utils/client_util_custom.py | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/product/models.py b/product/models.py index 16a8fef..94b7ca0 100644 --- a/product/models.py +++ b/product/models.py @@ -3,7 +3,9 @@ from django.db import models # class ProjectStatus(models.TextChoices): # KICKOUT = 'KICKOUT','立项' # DESIGN = 'DESIGN', '产品设计' +# WAIT_DEV = 'WAIT_DEV', '开发排期中' # DEV = 'DEV', '开发中' +# WAIT_TEST = 'WAIT_TEST', '测试排期中' # TEST = 'TEST', '测试中' # FINISH = 'FINISH', '结测待上线' # ONLINE = 'ONLINE', '已上线' diff --git a/update/utils/client_util_custom.py b/update/utils/client_util_custom.py index 32681d2..56f82ec 100644 --- a/update/utils/client_util_custom.py +++ b/update/utils/client_util_custom.py @@ -74,8 +74,19 @@ class ClientUtilCustom: local_file.close() # 关闭smb服务 self.smb_disconnect() + self.fix_data() return True + def fix_data(self): + print('fix_data') + fix_client_data = ClientRelease.objects.filter(is_cached=False).order_by('-id').all()[:5] + local_file_list = list(os.walk(self.local_path))[0][2] + for client in fix_client_data: + if client.origin_name in local_file_list: + client.is_cached = True + client.file_name = client.origin_name + + def handle_client_data_format(self, client_data_list): print('handle_client_data_format') for data in client_data_list: