This commit is contained in:
ping 2025-08-19 20:08:27 +08:00
parent 3fc5a36988
commit a4e012dd9d
3 changed files with 19 additions and 10 deletions

View File

@ -1113,7 +1113,7 @@ detailDataLJS = {
{ {
"title": "NVIDIA-4090-48G", "title": "NVIDIA-4090-48G",
"description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.", "description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.",
"price": "8800", "price": "8000",
"pre_price": None, "pre_price": None,
"price_unit": "台/月", "price_unit": "台/月",
"discount": None, "discount": None,
@ -1207,7 +1207,7 @@ detailDataLJS = {
{ {
"title": "NVIDIA-4090", "title": "NVIDIA-4090",
"description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.", "description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.",
"price": "7200", "price": "6500",
"pre_price": None, "pre_price": None,
"price_unit": "台/月", "price_unit": "台/月",
"discount": None, "discount": None,
@ -1254,7 +1254,7 @@ detailDataLJS = {
{ {
"title": "NVIDIA-4090", "title": "NVIDIA-4090",
"description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.", "description": "High-performance GPU server with powerful computing capabilities, suitable for AI training, deep learning, etc.",
"price": "7000", "price": "6200",
"pre_price": None, "pre_price": None,
"price_unit": "台/月", "price_unit": "台/月",
"discount": None, "discount": None,
@ -1263,31 +1263,31 @@ detailDataLJS = {
{ {
"id": 1, "id": 1,
"name": "CPU", "name": "CPU",
"content": "AMD EPYC 7502/32核心/2.5GHz *1", "content": "AMD EPYC 7542 32Core * 2",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png" "icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/ssc2x.png"
}, },
{ {
"id": 2, "id": 2,
"name": "内存", "name": "内存",
"content": "64GB DDR4-3200ECCREG RDIMM *16", "content": "512G / 64G 3200 MT/s DDR4*8",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png" "icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/cpu2x.png"
}, },
{ {
"id": 3, "id": 3,
"name": "GPU", "name": "GPU",
"content": "Geforce RTX4090 24GPCI-e 涡轮GPU卡 *8", "content": "Geforce RTX4090 24GPCI-e *8",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png" "icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/sdcard2x.png"
}, },
{ {
"id": 4, "id": 4,
"name": "系统盘", "name": "系统盘",
"content": "2.5\"480G SATA 读取密集 SSD *1", "content": " 2.5"960G SATA SSD *2",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png" "icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/servermini2x.png"
}, },
{ {
"id": 5, "id": 5,
"name": "数据盘", "name": "数据盘",
"content": "NVMe-SSD 3.84T *2", "content": "NVMe-SSD 3.84T *1",
"icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png" "icon": "https://www.kaiyuancloud.cn/idfile?path=firstpagehot/serverpath2x.png"
}, },
{ {

View File

@ -12,7 +12,16 @@ async def enterprise_audit_info_add(ns={}):
'status': False, 'status': False,
'msg': 'user not found' 'msg': 'user not found'
} }
orgid = user_list[0]['orgid'] orgid = user_list[0]['orgid']
# 检查orgid在数据库是否存在
orgid_exist = await sor.R('enterprise_audit_info', {'orgid': orgid, 'del_flg': '0'})
if orgid_exist:
return {
'status': False,
'msg': 'orgid info already exists'
}
ns_dic = { ns_dic = {
'id': uuid(), 'id': uuid(),
'orgid': orgid, 'orgid': orgid,

View File

@ -57,7 +57,7 @@ async def enterprise_audit_info_search(ns={}):
orgid = user_list[0]['orgid'] orgid = user_list[0]['orgid']
user_role = await get_user_role({'userid': userid, 'sor': sor}) user_role = await get_user_role({'userid': userid, 'sor': sor})
try: try:
if user_role == '客户': # 客户查询 if user_role == '客户' or user_role == '管理员': # 客户查询
count_sql = """SELECT COUNT(*) AS total_count FROM enterprise_audit_info WHERE orgid = '%s' AND del_flg = '0';""" % orgid count_sql = """SELECT COUNT(*) AS total_count FROM enterprise_audit_info WHERE orgid = '%s' AND del_flg = '0';""" % orgid
find_sql = """SELECT * FROM enterprise_audit_info WHERE orgid = '%s' AND del_flg = '0';""" % orgid find_sql = """SELECT * FROM enterprise_audit_info WHERE orgid = '%s' AND del_flg = '0';""" % orgid
else: # 运营查询 enterprise_audit_info和organization表关联查询 enterprise_audit_info中的orgid和organization表中的id关联查询 else: # 运营查询 enterprise_audit_info和organization表关联查询 enterprise_audit_info中的orgid和organization表中的id关联查询