Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53a5daab38 | ||
|
|
49a3ae397a |
No files matched your search
+37
@@ -20,3 +20,40 @@ apps/__pycache__/fix_up_color_two_a.cpython-310.pyc
|
|||||||
apps/__pycache__/ps_image_shadow_up_ag_two_a.cpython-310.pyc
|
apps/__pycache__/ps_image_shadow_up_ag_two_a.cpython-310.pyc
|
||||||
apps/__pycache__/white_purification_v3.cpython-310.pyc
|
apps/__pycache__/white_purification_v3.cpython-310.pyc
|
||||||
apps/__pycache__/white_purification_v4.cpython-310.pyc
|
apps/__pycache__/white_purification_v4.cpython-310.pyc
|
||||||
|
comfyui/util/__pycache__/utils.cpython-311.pyc
|
||||||
|
openapi/__pycache__/utils.cpython-311.pyc
|
||||||
|
test/275157.mtl
|
||||||
|
test/275157.obj
|
||||||
|
test/275157Tex1.jpg
|
||||||
|
test/exportsql.py
|
||||||
|
test/get_order_test.py
|
||||||
|
test/list.py
|
||||||
|
test/mir_download.py
|
||||||
|
test/mir_upload_url.go
|
||||||
|
test/mir_upload.py
|
||||||
|
test/test3.py
|
||||||
|
test/testUpload.py
|
||||||
|
test/upload.py
|
||||||
|
test/sql_structures/a_carts_structure.sql
|
||||||
|
test/sql_structures/customer_p3d_log_structure.sql
|
||||||
|
test/sql_structures/customer_shop_relation_structure.sql
|
||||||
|
test/sql_structures/customer_structure.sql
|
||||||
|
test/sql_structures/model_customer_service_structure.sql
|
||||||
|
test/sql_structures/model_repair_order_structure.sql
|
||||||
|
test/sql_structures/openapi_account_bind_structure.sql
|
||||||
|
test/sql_structures/openapi_account_structure.sql
|
||||||
|
test/sql_structures/openapi_log_structure.sql
|
||||||
|
test/sql_structures/openapi_token_structure.sql
|
||||||
|
test/sql_structures/order_structure.sql
|
||||||
|
test/sql_structures/order.sql
|
||||||
|
test/sql_structures/print_order_structure.sql
|
||||||
|
test/sql_structures/shoot_order_photo_model_peoples_structure.sql
|
||||||
|
test/sql_structures/shoot_order_photo_models_structure.sql
|
||||||
|
test/sql_structures/shop_structure.sql
|
||||||
|
test/sql_structures/sql.zip
|
||||||
|
test/sql_structures/sw_dealer_shop_relation_structure.sql
|
||||||
|
test/sql_structures/wechat_fans_structure.sql
|
||||||
|
openapi/__pycache__/utils.cpython-311.pyc
|
||||||
|
tools/pic_for_obj.zip
|
||||||
|
yj_local_build/xml.zip
|
||||||
|
openapi.zip
|
||||||
@@ -165,7 +165,7 @@ def team_check(r):
|
|||||||
print(f'{update_repair_status_url}?id={repair_id}')
|
print(f'{update_repair_status_url}?id={repair_id}')
|
||||||
res = requests.get(f'{update_repair_status_url}?id={repair_id}')
|
res = requests.get(f'{update_repair_status_url}?id={repair_id}')
|
||||||
print('更新团队审核状态:', res.text)
|
print('更新团队审核状态:', res.text)
|
||||||
#shutil.rmtree(os.path.join(workdir, 'print', pid,orderId), ignore_errors=True)
|
shutil.rmtree(os.path.join(workdir, 'print', pid,orderId), ignore_errors=True)
|
||||||
print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()), f'pid:{pid} 生成团队审核模型 end')
|
print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()), f'pid:{pid} 生成团队审核模型 end')
|
||||||
|
|
||||||
def get_p3d_info(pid):
|
def get_p3d_info(pid):
|
||||||
|
|||||||
+5
-2
@@ -1,6 +1,9 @@
|
|||||||
[account]
|
[account]
|
||||||
appId="1nt7j0w17ecd9duruc48m7050012r5a8"
|
#appId="1nt7j0w17ecd9duruc48m7050012r5a8"
|
||||||
appSecret="1nt7j0w17ecd9duruc48m70600m2a32r"
|
#appSecret="1nt7j0w17ecd9duruc48m70600m2a32r"
|
||||||
|
#shopId="1"
|
||||||
|
appId="xdezmm02857d9vp1s5j8f3i300r1ige1"
|
||||||
|
appSecret="xdezmm02857d9vp1s5j8gtd400ml1lwe"
|
||||||
shopId="1"
|
shopId="1"
|
||||||
|
|
||||||
[oss]
|
[oss]
|
||||||
|
|||||||
+18
-16
@@ -189,20 +189,22 @@ def main(imagePath = ""):
|
|||||||
os.remove(imagePath)
|
os.remove(imagePath)
|
||||||
return data,True
|
return data,True
|
||||||
|
|
||||||
|
def test():
|
||||||
|
utils.getToken()
|
||||||
|
|
||||||
|
test()
|
||||||
if __name__ == "__main__":
|
# if __name__ == "__main__":
|
||||||
#获取请求参数
|
# #获取请求参数
|
||||||
args = sys.argv[1:]
|
# args = sys.argv[1:]
|
||||||
if len(args) == 0:
|
# if len(args) == 0:
|
||||||
#需要二次确认是否要处理images目录下的所有图片
|
# #需要二次确认是否要处理images目录下的所有图片
|
||||||
confirmV = input("是否要处理images目录下的所有图片? (y/n)")
|
# confirmV = input("是否要处理images目录下的所有图片? (y/n)")
|
||||||
if confirmV == "y":
|
# if confirmV == "y":
|
||||||
imageFolder()
|
# imageFolder()
|
||||||
else:
|
# else:
|
||||||
print("请输入图片路径")
|
# print("请输入图片路径")
|
||||||
sys.exit(1)
|
# sys.exit(1)
|
||||||
else:
|
# else:
|
||||||
for imagePath in args:
|
# for imagePath in args:
|
||||||
main(imagePath)
|
# main(imagePath)
|
||||||
print(f"{args}")
|
# print(f"{args}")
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from utils import getToken
|
||||||
|
|
||||||
|
|
||||||
|
getToken()
|
||||||
@@ -1 +0,0 @@
|
|||||||
xdezmm0291gd9x7z89yj3um2709r55mu|1747365162
|
|
||||||
+3
-1
@@ -5,7 +5,8 @@ def cfg(keyName):
|
|||||||
try:
|
try:
|
||||||
with open('config.toml', 'r') as f:
|
with open('config.toml', 'r') as f:
|
||||||
config = toml.load(f)
|
config = toml.load(f)
|
||||||
|
|
||||||
|
print(config)
|
||||||
if "." in keyName:
|
if "." in keyName:
|
||||||
keyName = keyName.split(".")
|
keyName = keyName.split(".")
|
||||||
return config[keyName[0]][keyName[1]]
|
return config[keyName[0]][keyName[1]]
|
||||||
@@ -42,6 +43,7 @@ def getToken():
|
|||||||
return token.split("|")[0]
|
return token.split("|")[0]
|
||||||
|
|
||||||
#获取token
|
#获取token
|
||||||
|
print(cfg("api.domain"))
|
||||||
url = cfg("api.domain")+cfg("api.getToken")
|
url = cfg("api.domain")+cfg("api.getToken")
|
||||||
params = {
|
params = {
|
||||||
"appId":cfg("account.appId"),
|
"appId":cfg("account.appId"),
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
|
|
||||||
import requests
|
|
||||||
#url
|
|
||||||
#循环100次
|
|
||||||
for i in range(100):
|
|
||||||
url = "https://mp.api.suwa3d.com/api/oss/putSignURL?key_name=photos/233522/photo2/"+str(i)+".jpg"
|
|
||||||
#请求url
|
|
||||||
res = requests.get(url)
|
|
||||||
#打印结果
|
|
||||||
print(res.text)
|
|
||||||
#转json
|
|
||||||
res_json = res.json()
|
|
||||||
ossUrl = res_json['data']
|
|
||||||
print(f"当前是第几个:{i}, ossUrl: {ossUrl}")
|
|
||||||
# data 是一个 oss 的上传连接, 向这个上传连接发送一个文件
|
|
||||||
# 上传文件
|
|
||||||
try:
|
|
||||||
#with open("E:/microservice/make2/data/0.jpg", 'rb') as f:
|
|
||||||
file = open('E:/microservice/make2/data/0.jpg', 'rb')
|
|
||||||
response = requests.put(ossUrl, data=file, headers={"Content-Type": "application/octet-stream"})
|
|
||||||
print(response.status_code)
|
|
||||||
if response.status_code == 200:
|
|
||||||
upload_is_ok = True
|
|
||||||
else:
|
|
||||||
print(f"上传图片异常,状态码: {response.status_code}")
|
|
||||||
except RequestException as e:
|
|
||||||
print(f"上传异常: {str(e)}")
|
|
||||||
# file = open('E:/microservice/make2/data/0.jpg', 'rb')
|
|
||||||
# res = requests.put(ossUrl, data=file)
|
|
||||||
# print(res.text)
|
|
||||||
|
|
||||||
|
|
||||||
# url = "https://mp.api.suwa3d.com/api/oss/putSignURL?key_name=objs/photos/233522/a.jpg"
|
|
||||||
Reference in new issue
Block a user