api-datamanager/Modules/Functions/FinIndex/FinIndexUtils.py

19 lines
484 B
Python
Raw Normal View History

from DBHelper.MongoHelperInstance import DB_TEST
from Utils.CommonUtil import CommonUtils
class FinanceIndexUtils(object):
@staticmethod
def make_new_cid():
new_cid = CommonUtils.random_code(8)
case = DB_TEST.find_single_column(
"模型数据",
2022-07-04 10:13:52 +08:00
"计算接口",
{"接口ID": new_cid},
"接口ID"
) is not None
while case:
new_cid = CommonUtils.random_code(8)
return new_cid