From 045f02accb0f7366bf71bae876432003cbf6f532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AD=A6=E5=B3=B0?= Date: Fri, 9 Sep 2022 11:27:04 +0800 Subject: [PATCH] feature: add executor for product --- models/product_model.py | 3 ++- services/product_service.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/models/product_model.py b/models/product_model.py index 7364a3c..52f5bcb 100644 --- a/models/product_model.py +++ b/models/product_model.py @@ -11,7 +11,8 @@ class TestProduct(CommonModel): desc = Column(String(256), nullable=True, comment='产品描述') test_method = Column(String(256), nullable=True, comment='测试方法') test_requirement = Column(String(256), nullable=True, comment='测试要求') - owner = Column(String(256), nullable=False, comment='测试产品执行人') + owner = Column(String(256), nullable=False, comment='测试产品负责人') + executor = Column(String(256), nullable=False, comment='测试产品执行人') class ProductCategory(CommonModel): diff --git a/services/product_service.py b/services/product_service.py index cbe701b..3e5e3d3 100644 --- a/services/product_service.py +++ b/services/product_service.py @@ -66,6 +66,8 @@ async def run_check(test_product_id, user_infos): test_product = await TestProduct.query_obj_one(TestProduct.id == test_product_id) if not test_product: return ERROR_UN_EXISTED_PRODUCT, False + test_product.executor = user_infos['user_name'] + await test_product.update() origin_plan = await Plan.query_obj_one(Plan.id == test_product.origin_plan_id) if not origin_plan: return ERROR_UN_EXISTED_TASK, False -- Gitee