You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
919 B
23 lines
919 B
# -*- coding: utf-8 -*-
|
|
"""bruno 错误码 67012 同步(票 01 验收):create/quickCreate 错误码清单各加一行。"""
|
|
import io, sys
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
|
|
OLD = " - 67001 入参非法\n - 67003 信用代码撞码\n"
|
|
NEW = " - 67001 入参非法\n - 67003 信用代码撞码\n - 67012 销售负责人不存在、已停用或已离职\n"
|
|
|
|
TARGETS = [
|
|
r"D:\code\crm-api-docs\A4 客户管理\我的客户\新增客户.bru",
|
|
r"D:\code\crm-api-docs\A4 客户管理\我的客户\快速创建客户.bru",
|
|
]
|
|
|
|
for path in TARGETS:
|
|
txt = open(path, 'r', encoding='utf-8').read()
|
|
if "67012" in txt:
|
|
print(f"SKIP (已有 67012): {path}")
|
|
continue
|
|
if OLD not in txt:
|
|
print(f"ANCHOR NOT FOUND: {path}")
|
|
continue
|
|
open(path, 'w', encoding='utf-8', newline='').write(txt.replace(OLD, NEW, 1))
|
|
print(f"OK: {path}")
|
|
|