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.

38 lines
872 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# pip install psycopg2
from Util.PgUtil import *
# 修改操作(插入、更新或删除)
sql = "INSERT INTO t_hy_model(model_id,model_name,memo,star,update_time,img_count,b_use,sort_id,model_type_id,style_id,is_cover) VALUES (%s,%s, %s,%s,now(),%s,1,1,%s,%s,%s);"
# 模型编号
model_id = 44
# 模型名称
model_name = '黏土世界'
# 提示信息
memo = '1、请上传正面半身照。; 2、确保脸部无遮挡3、图片要求不小于1.5MB(正常手机拍照即可)'
# 星级
star = 5
# 上传照片数量
img_count = 1
# 模板类型
# 1:SD TXT2IMG 2:SD IMG2IMG 3:COMFY_UI
model_type_id = 2
'''
1 卡通风格
2 儿童摄影
3 风格写真
4 双人系列
'''
style_id = 1
is_cover = 1
params = (model_id, model_name, memo, star, img_count, model_type_id, style_id, is_cover)
execute_modify(sql, params)