wip: 客户评级弹窗化/公司信息精简/参数中文化/品牌站点同步(基于 927592b)
This commit is contained in:
1 parent
927592b472
commit
27533eb465
43 files changed
+2959
-434
No files matched your search
@@ -32,8 +32,9 @@ def list_all(session: Session, *, for_update: bool = False) -> list[CustomerRati
|
||||
def get_by_id(session: Session, grade_id: int) -> CustomerRatingGrade | None:
|
||||
"""按主键查询。
|
||||
|
||||
等级表无下游引用(评级是纯计算器不落评分记录),无需 ``for_update``
|
||||
锁行 —— product_repository 锁行防的是并发引用悬空,此处不存在该风险。
|
||||
等级表对客户评级无**外键**引用(评级行快照固化等级名),无需
|
||||
``for_update`` 锁行 —— product_repository 锁行防的是并发引用悬空,
|
||||
此处不存在该风险。
|
||||
"""
|
||||
return session.get(CustomerRatingGrade, grade_id)
|
||||
|
||||
@@ -60,6 +61,6 @@ def create(session: Session, grade: CustomerRatingGrade) -> CustomerRatingGrade:
|
||||
|
||||
|
||||
def delete(session: Session, grade: CustomerRatingGrade) -> None:
|
||||
"""物理删除等级。等级表无下游引用,调用方无需引用保护校验。"""
|
||||
"""物理删除等级。等级表对客户评级无外键引用,调用方无需引用保护校验。"""
|
||||
session.delete(grade)
|
||||
session.flush()
|
||||
Reference in new issue
Block a user