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.
42 lines
1.3 KiB
42 lines
1.3 KiB
# pip install psycopg2
|
|
|
|
from Util.PgUtil import *
|
|
|
|
# 模板
|
|
model_id = 28
|
|
# MODEL_TYPE_ID 1:WEB_UI 2:COMFY_UI 3:Midjourney
|
|
model_type_id = 3
|
|
|
|
# 修改操作(插入、更新或删除)
|
|
sql = (
|
|
"INSERT INTO t_hy_task(user_id,create_time,model_id,source_img_url,finish_flag,count,task_type_code,task_type_id,model_type_id) "
|
|
"VALUES (%s,now(),%s, %s,%s,%s,%s,%s,%s);")
|
|
|
|
# 系统管理员
|
|
user_id = '16380C30-B1EA-4BFF-B5E6-4F3928CE36F3'
|
|
#source_img_url = 'http://hzkc.oss-cn-beijing.aliyuncs.com/Images/Upload/mote_boy.png,http://image.hzkjai.com/Images/Upload/mote.png'
|
|
source_img_url = 'http://hzkc.oss-cn-beijing.aliyuncs.com/Images/Upload/mote.png'
|
|
task_type_code = 'System'
|
|
task_type_id = 1
|
|
|
|
# 普通用户
|
|
# user_id = 'ca3e280e-12f0-33ff-c92e-4d56724b0fa1'
|
|
# source_img_url = 'http://hzkc.oss-cn-beijing.aliyuncs.com/Images/Upload/wife.jpg'
|
|
# #source_img_url = 'http://hzkc.oss-cn-beijing.aliyuncs.com/Images/Upload/00060-2341778124_wife.jpg'
|
|
# task_type_code = 'User'
|
|
# task_type_id = 2
|
|
|
|
|
|
# 其它参数
|
|
finish_flag = 0
|
|
count = 1
|
|
|
|
params = (
|
|
user_id, model_id, source_img_url, finish_flag, count, task_type_code, task_type_id,model_type_id)
|
|
execute_modify(sql, params)
|
|
|
|
# 查询一下
|
|
sql = "select * from t_hy_task"
|
|
results = execute_query(sql)
|
|
print(results)
|