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.

15 lines
604 B

1 day ago
# -*- coding: utf-8 -*-
"""列 Customer 实体 NOT NULL 且无 default 的列(导入预检必填修复面,票 03)。"""
import io
import re
import sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
p = r'e:\code\crm-backend-matt\crm-customer\src\main\java\com\crm\customer\domain\entity\Customer.java'
t = open(p, encoding='utf-8').read()
pat = re.compile(r'@Column\(columnDefinition\s*=\s*"([^"]+)"[^)]*\)(?:\s*@\w+(?:\([^)]*\))?)*\s*private\s+\w+\s+(\w+);')
for cd, name in pat.findall(t):
if 'not null' in cd and 'default' not in cd:
print(name, '=>', cd[:90])