|
|
@@ -1,10 +1,246 @@
|
|
|
-from PIL import Image
|
|
|
-from settings import recordDataPoint
|
|
|
+# from PIL import Image
|
|
|
+# from settings import recordDataPoint
|
|
|
|
|
|
-result = recordDataPoint(
|
|
|
- token="7a6d7d43419df1f98bf00efa100f94b5f6e33c43",
|
|
|
- uuid="1000548b-5a5e-5ff5-d322-0842bf2beb86",
|
|
|
- page="抠图完成",
|
|
|
- goods_art_no="12345"
|
|
|
-)
|
|
|
-print("result", result.json())
|
|
|
+# result = recordDataPoint(
|
|
|
+# token="7a6d7d43419df1f98bf00efa100f94b5f6e33c43",
|
|
|
+# uuid="1000548b-5a5e-5ff5-d322-0842bf2beb86",
|
|
|
+# page="抠图完成",
|
|
|
+# goods_art_no="12345"
|
|
|
+# )
|
|
|
+# print("result", result.json())
|
|
|
+"""
|
|
|
+[
|
|
|
+ "skuList" => [
|
|
|
+ [
|
|
|
+ "originalPrice" => 37.5, //市场价
|
|
|
+ "newSkuWeight" => 100, //重量
|
|
|
+ "skuMainImageUrl" => "https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png",
|
|
|
+ "skuName" => "颜色:经典紫",
|
|
|
+ "sellingPrice" => 100, //售价(未划线价)
|
|
|
+ "quantity" => 1000, //库存
|
|
|
+ "skuNo" => "AGB00002", //规格编码-货号
|
|
|
+ "showOrder" => "1"
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "originalPrice" => 37.5,
|
|
|
+ "newSkuWeight" => 100,
|
|
|
+ "skuMainImageUrl" => "https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png",
|
|
|
+ "skuName" => "颜色:魔力红",
|
|
|
+ "sellingPrice" => 100,
|
|
|
+ "quantity" => 1000, //库存
|
|
|
+ "skuNo" => "AGB00003",
|
|
|
+ "showOrder" => "2"
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ "itemSkuImageList" => [
|
|
|
+ [
|
|
|
+ "propName" => "颜色",
|
|
|
+ "skuPropValueList" => [
|
|
|
+ [
|
|
|
+ "imageJson" => [
|
|
|
+ [
|
|
|
+ "imageUrl" => "https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png",
|
|
|
+ "imageType" => 1,
|
|
|
+ "showOrder" => 1
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ "propValue" => "经典绿",
|
|
|
+ "showOrder" => 1
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "imageJson" => [
|
|
|
+ [
|
|
|
+ "imageUrl" => "https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png",
|
|
|
+ "imageType" => 1,
|
|
|
+ "showOrder" => 1
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ "propValue" => "经典红",
|
|
|
+ "showOrder" => 2
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ "isImageProp" => 1,
|
|
|
+ "propShowOrder" => 1
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ "catePathName" => "流行男鞋>>休闲鞋>>时尚休闲鞋", //分类
|
|
|
+ "itemName" => "经典潮流时尚运动商品标题鞋多场合-测试", //商品标题
|
|
|
+ "brandName" => "惠利玛@拼多多", //品牌名称
|
|
|
+ "sellingPrice" => 998, //售价(未划线价)
|
|
|
+ "originalPrice" => 999,//划线价
|
|
|
+ "quantity" => 100, //重量
|
|
|
+ "propInfoList" => [
|
|
|
+ [
|
|
|
+ "propName" => "品牌",
|
|
|
+ "propIndex" => 2,
|
|
|
+ "propValue" => "Vali"
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "propName" => "平台类目",
|
|
|
+ "propIndex" => 3,
|
|
|
+ "propValue" => "运动鞋>>运动拖鞋>>运动拖鞋"
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ "wapDescription" => "<img src=\"https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png\"/>", //wap端详情
|
|
|
+ "pcDescription" => "<img src=\"https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png\"/>", //这个是电脑端详情
|
|
|
+ "itemImageInfoList" => [
|
|
|
+ [
|
|
|
+ "imageUrl" => "https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png",
|
|
|
+ "imageType" => 0,
|
|
|
+ "imageItem" => 0,
|
|
|
+ "imageIndex" => 10
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "imageUrl" => "https://ossimg.valimart.net/uploads/vali_ai/20250619/175031982841045.png",
|
|
|
+ "imageType" => 0,
|
|
|
+ "imageItem" => 1,
|
|
|
+ "imageIndex" => 10
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+
|
|
|
+"""
|
|
|
+tempData = {
|
|
|
+ "code": 0,
|
|
|
+ "message": "",
|
|
|
+ "data": {
|
|
|
+ "error_folder_list": [],
|
|
|
+ "goods_no_dict": {
|
|
|
+ "A22234CC": {
|
|
|
+ "款号": "A22234CC",
|
|
|
+ "货号资料": [
|
|
|
+ {
|
|
|
+ "货号": "A22234CC11",
|
|
|
+ "文件夹名称": "A22234CC11",
|
|
|
+ " 编号": "",
|
|
|
+ "颜色名称": "黑色",
|
|
|
+ "pics": {
|
|
|
+ "俯视-抠图": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(1)_俯视_抠图.png",
|
|
|
+ "俯视-阴影": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(1)_俯视_阴影.png",
|
|
|
+ "侧视-抠图": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(2)_侧视_抠图.png",
|
|
|
+ "侧视-阴影": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(2)_侧视_阴影.png",
|
|
|
+ "后跟-抠图": "output/2025-08-19/A22234CC11/阴影图处 理/A22234CC11(3)_后跟_抠图.png",
|
|
|
+ "后跟-阴影": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(3)_后跟_阴影.png",
|
|
|
+ "鞋底-抠图": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(4)_鞋底_抠图.png",
|
|
|
+ "鞋底-阴影": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(4)_鞋底_阴影.png",
|
|
|
+ "内里-抠图": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(5)_内里_抠图.png",
|
|
|
+ "内里-阴影": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(5)_内里_阴影.png",
|
|
|
+ "其他1-抠图": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(6)_其他1_抠图.png",
|
|
|
+ "其他1-阴影": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(6)_其他1_阴影.png",
|
|
|
+ "其他0-抠图": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(7)_其他0_抠图.png",
|
|
|
+ "其他0-阴影": "output/2025-08-19/A22234CC11/阴影图处理/A22234CC11(7)_其他0_阴影.png",
|
|
|
+ },
|
|
|
+ "800x800": [
|
|
|
+ "output/2025-08-19/A22234CC11/800x800/A22234CC11(1)_800.png",
|
|
|
+ "output/2025-08-19/A22234CC11/800x800/A22234CC11(2)_800.png",
|
|
|
+ "output/2025-08-19/A22234CC11/800x800/A22234CC11(3)_800.png",
|
|
|
+ "output/2025-08-19/A22234CC11/800x800/A22234CC11(4)_800.png",
|
|
|
+ "output/2025-08-19/A22234CC11/800x800/A22234CC11(5)_800.png",
|
|
|
+ "output/2025-08-19/A22234CC11/800x800/A22234CC11(6)_800.png",
|
|
|
+ "output/2025-08-19/A22234CC11/800x800/A22234CC11(7)_800.png",
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "商品面料": "",
|
|
|
+ "商品内里": "",
|
|
|
+ "商品鞋底": "",
|
|
|
+ "鞋垫": "",
|
|
|
+ "商品标题": "女单鞋",
|
|
|
+ "商品价格": "300.00",
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "succeed_folder_list": ["A22234CC11"],
|
|
|
+ "temp_name": "huilima-1",
|
|
|
+ "temp_name_list": [
|
|
|
+ "huilima-1",
|
|
|
+ "huilima-2",
|
|
|
+ "huilima-3",
|
|
|
+ "huilima-4",
|
|
|
+ "xinnuo-1",
|
|
|
+ "xinnuo-2",
|
|
|
+ "xinnuo-3",
|
|
|
+ "huilima-6",
|
|
|
+ "xinjunlue-1",
|
|
|
+ "qingyangyizhan-1",
|
|
|
+ ],
|
|
|
+ "assigned_page_dict": {},
|
|
|
+ "excel_temp_goods_no_data": {},
|
|
|
+ "finally_goods_no_need_temps": {"A22234CC": ["huilima-1"]},
|
|
|
+ "config_data": {
|
|
|
+ "image_dir": "output/2025-08-19",
|
|
|
+ "image_order": "俯视,侧视,后跟,鞋底,内里,组合,组合2",
|
|
|
+ "goods_art_no": "",
|
|
|
+ "goods_art_nos": ["A22234CC11"],
|
|
|
+ "is_check_number": False,
|
|
|
+ "resize_image_view": "后跟",
|
|
|
+ "cutout_mode": 1,
|
|
|
+ "logo_path": "",
|
|
|
+ "special_goods_art_no_folder_line": "",
|
|
|
+ "is_use_excel": False,
|
|
|
+ "excel_path": "",
|
|
|
+ "is_check_color_is_all": False,
|
|
|
+ "cutout_is_pass": True,
|
|
|
+ "assigned_page_dict": {},
|
|
|
+ "detail_is_pass": True,
|
|
|
+ "upload_is_pass": False,
|
|
|
+ "upload_is_enable": True,
|
|
|
+ "is_filter": False,
|
|
|
+ "temp_class": {
|
|
|
+ "huilima-1": "custom_plugins.plugins.detail_template.huilima.detail_huilima1.DetailPicGet",
|
|
|
+ "huilima-2": "custom_plugins.plugins.detail_template.huilima.detail_huilima2.DetailPicGet",
|
|
|
+ "huilima-3": "custom_plugins.plugins.detail_template.huilima.detail_huilima3.DetailPicGet",
|
|
|
+ "huilima-4": "custom_plugins.plugins.detail_template.huilima.detail_huilima4.DetailPicGet",
|
|
|
+ "xinnuo-1": "custom_plugins.plugins.detail_template.xinnuo.detail_xinnuo1.DetailPicGet",
|
|
|
+ "xinnuo-2": "custom_plugins.plugins.detail_template.xinnuo.detail_xinnuo2.DetailPicGet",
|
|
|
+ "xinnuo-3": "custom_plugins.plugins.detail_template.xinnuo.detail_xinnuo3.DetailPicGet",
|
|
|
+ "huilima-6": "custom_plugins.plugins.detail_template.huilima.detail_huilima6.DetailPicGet",
|
|
|
+ "xinjunlue-1": "custom_plugins.plugins.detail_template.xinjunlue.detail_xinjunlue1.DetailPicGet",
|
|
|
+ "qingyangyizhan-1": "custom_plugins.plugins.detail_template.qingyangyizhan.detail_qingyangyizhan1.DetailPicGet",
|
|
|
+ },
|
|
|
+ "temp_name": "huilima-1",
|
|
|
+ "temp_name_list": [
|
|
|
+ "huilima-1",
|
|
|
+ "huilima-2",
|
|
|
+ "huilima-3",
|
|
|
+ "huilima-4",
|
|
|
+ "xinnuo-1",
|
|
|
+ "xinnuo-2",
|
|
|
+ "xinnuo-3",
|
|
|
+ "huilima-6",
|
|
|
+ "xinjunlue-1",
|
|
|
+ "qingyangyizhan-1",
|
|
|
+ ],
|
|
|
+ "target_error_folder": "output/2025-08-19/软件-生成详情错误",
|
|
|
+ "success_handler": [],
|
|
|
+ "sign_text": "",
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|
|
|
+goods_no_dict = tempData["data"]["goods_no_dict"]
|
|
|
+params = []
|
|
|
+for goods_no in goods_no_dict.keys():
|
|
|
+ """
|
|
|
+ "catePathName" => "流行男鞋>>休闲鞋>>时尚休闲鞋", //分类
|
|
|
+ "itemName" => "经典潮流时尚运动商品标题鞋多场合-测试", //商品标题
|
|
|
+ "brandName" => "惠利玛@拼多多", //品牌名称
|
|
|
+ "sellingPrice" => 998, //售价(未划线价)
|
|
|
+ "originalPrice" => 999,//划线价
|
|
|
+ "quantity" => 100, //重量
|
|
|
+ """
|
|
|
+ goods_data = goods_no_dict[goods_no]
|
|
|
+ goods_title = goods_data.get("商品标题", "")
|
|
|
+ if goods_title == "":
|
|
|
+ continue
|
|
|
+ goods_price = goods_data.get("商品价格", 0)
|
|
|
+ if goods_title == 0:
|
|
|
+ continue
|
|
|
+ itemData = {
|
|
|
+ "catePathName": "流行男鞋>>休闲鞋>>时尚休闲鞋", # 分类
|
|
|
+ "itemName": goods_title, # 商品标题
|
|
|
+ "brandName": "vali", # 品牌名称
|
|
|
+ "sellingPrice": float(goods_price), # 售价(未划线价)
|
|
|
+ "originalPrice": float(goods_price), # 划线价
|
|
|
+ "quantity": 9999, # 库存数量
|
|
|
+ }
|
|
|
+ params.append(itemData)
|
|
|
+print(params)
|