19 lines
482 B
Python
19 lines
482 B
Python
from DBHelper.MongoHelperInstance import DB_TEST
|
|
from Utils.CommonUtil import CommonUtils
|
|
|
|
|
|
class ScoreModelUtils(object):
|
|
|
|
@staticmethod
|
|
def make_new_cid():
|
|
new_cid = CommonUtils.random_code(8)
|
|
case = DB_TEST.find_single_column(
|
|
"模型数据",
|
|
"打分模型",
|
|
{"模型ID": new_cid},
|
|
"模型ID"
|
|
) is not None
|
|
while case:
|
|
new_cid = CommonUtils.random_code(8)
|
|
return new_cid
|