ey-commerce-lib 1.0.21__tar.gz → 1.0.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ey-commerce-lib might be problematic. Click here for more details.
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/PKG-INFO +1 -1
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/pyproject.toml +1 -1
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/main.py +49 -1
- ey_commerce_lib-1.0.23/src/ey_commerce_lib/dxm/parser/export_template.py +17 -0
- ey_commerce_lib-1.0.23/src/ey_commerce_lib/dxm/schemas/export_package.py +23 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/main.py +3 -2
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/takesend/main.py +11 -6
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/tests/dxm/test_purchase.py +23 -6
- ey_commerce_lib-1.0.21/src/ey_commerce_lib/dxm/order.py +0 -2
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/.gitignore +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/.python-version +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/README.md +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/pytest.ini +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/constant/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/constant/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/exception/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/exception/common.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/common.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/count.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/ebay_product.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/purchase.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/tracking.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/warehouse.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/common.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/dxm_commodity_product.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/ebay_product.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/tracking.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/warehouse.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/utils/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/utils/dxm_commodity_product.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/utils/mark.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/constant/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/constant/response.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/parser/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/parser/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/schemas/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/schemas/query/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/schemas/query/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/schemas/vo/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/schemas/vo/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/main.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/query/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/query/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/query/product.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/response/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/response/order.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/response/product.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/model.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/py.typed +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/takesend/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/takesend/config.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/utils/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/utils/close.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/utils/dxm.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/utils/float.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/utils/list_util.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/utils/str.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/tests/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/tests/dxm/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/tests/kogan/__init__.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/tests/kogan/test_client.py +0 -0
- {ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/uv.lock +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import time
|
|
3
2
|
import traceback
|
|
4
3
|
|
|
5
4
|
from httpx import AsyncClient, Timeout
|
|
@@ -8,6 +7,7 @@ from playwright.async_api import async_playwright
|
|
|
8
7
|
from ey_commerce_lib.dxm.constant.order import DxmOrderRuleType
|
|
9
8
|
from ey_commerce_lib.dxm.parser.common import get_page_info, get_purchase_pagination_info, get_tracking_page_info
|
|
10
9
|
from ey_commerce_lib.dxm.parser.count import parse_count
|
|
10
|
+
from ey_commerce_lib.dxm.parser.export_template import parse_list_export_template
|
|
11
11
|
from ey_commerce_lib.dxm.parser.order import list_order_base_by_html, list_order_rule, get_rule_detail, \
|
|
12
12
|
get_order_detail_by_html, parse_comm_search_list_html_get_authid_dict
|
|
13
13
|
from ey_commerce_lib.dxm.parser.purchase import list_purchasing_all, list_1688_purchase_order_number, \
|
|
@@ -17,6 +17,7 @@ from ey_commerce_lib.dxm.parser.warehouse import list_warehouse_product
|
|
|
17
17
|
from ey_commerce_lib.dxm.schemas.common import Page
|
|
18
18
|
from ey_commerce_lib.dxm.schemas.dxm_commodity_product import ViewDxmCommodityProductResponse
|
|
19
19
|
from ey_commerce_lib.dxm.schemas.ebay_product import DxmEbayProductModel
|
|
20
|
+
from ey_commerce_lib.dxm.schemas.export_package import ExportPackageOrderModel
|
|
20
21
|
from ey_commerce_lib.dxm.schemas.order import DxmOrderSearchForm, DxmJsonResponse, DxmCheckProcessResponse, DxmOrderRule
|
|
21
22
|
from ey_commerce_lib.dxm.schemas.tracking import TrackingPageListQuery, TrackingPageListItem
|
|
22
23
|
from ey_commerce_lib.dxm.schemas.warehouse import WarehouseProduct, WarehouseProductQuery, PurchasingAllQuery
|
|
@@ -879,6 +880,53 @@ class DxmClient:
|
|
|
879
880
|
comm_search_list_html = response.text
|
|
880
881
|
return parse_comm_search_list_html_get_authid_dict(comm_search_list_html, keyword)
|
|
881
882
|
|
|
883
|
+
async def export_template_get_by_id_json(self, id_str: str):
|
|
884
|
+
"""
|
|
885
|
+
根据id获取导出模板配置
|
|
886
|
+
:param id_str: 模板id
|
|
887
|
+
:return:
|
|
888
|
+
"""
|
|
889
|
+
async with self.__sem:
|
|
890
|
+
response = await self.__async_client.post('/exportTemplate/getById.json', data={
|
|
891
|
+
'id': id_str
|
|
892
|
+
})
|
|
893
|
+
return response.json()
|
|
894
|
+
|
|
895
|
+
async def list_export_template(self):
|
|
896
|
+
"""
|
|
897
|
+
获取导出模板的列表
|
|
898
|
+
:return:
|
|
899
|
+
"""
|
|
900
|
+
async with self.__sem:
|
|
901
|
+
response = await self.__async_client.post('/exportTemplate/index.htm')
|
|
902
|
+
return parse_list_export_template(response.text)
|
|
903
|
+
|
|
904
|
+
async def export_package_order(self, data: ExportPackageOrderModel):
|
|
905
|
+
"""
|
|
906
|
+
导出包裹订单
|
|
907
|
+
:param data: 导出参数模型类
|
|
908
|
+
:return:
|
|
909
|
+
"""
|
|
910
|
+
async with self.__sem:
|
|
911
|
+
response = await self.__async_client.post('order/exportPackageOrder.json',
|
|
912
|
+
data=data.model_dump(by_alias=True))
|
|
913
|
+
uuid = response.json().get('uuid')
|
|
914
|
+
if not uuid:
|
|
915
|
+
raise Exception('导出失败')
|
|
916
|
+
code = 0
|
|
917
|
+
msg = ''
|
|
918
|
+
# 如果导出状态没有完成就一直循环
|
|
919
|
+
while code == 0:
|
|
920
|
+
check_process_res = await self.__check_process(uuid)
|
|
921
|
+
code = check_process_res.get('processMsg').get('code')
|
|
922
|
+
msg = check_process_res.get('processMsg').get('msg')
|
|
923
|
+
print(f'导出中,{check_process_res}')
|
|
924
|
+
await asyncio.sleep(5)
|
|
925
|
+
# code为1代表导出成功
|
|
926
|
+
if code != 1:
|
|
927
|
+
raise Exception(f'导出失败,失败原因:{msg}')
|
|
928
|
+
return msg
|
|
929
|
+
|
|
882
930
|
async def __aenter__(self):
|
|
883
931
|
return self
|
|
884
932
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from lxml import html
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def parse_list_export_template(html_content: str):
|
|
5
|
+
tree = html.fromstring(html_content)
|
|
6
|
+
export_template_element_list = tree.xpath('//div[@class="page-list no-page"]/table[@class="in-table"]/tbody/tr')
|
|
7
|
+
export_template_list = []
|
|
8
|
+
for export_template_element in export_template_element_list:
|
|
9
|
+
template_id = export_template_element.xpath('@id')[0].replace('tr', '')
|
|
10
|
+
template_name = export_template_element.xpath('./td[1]/text()')[0].strip()
|
|
11
|
+
field_str = export_template_element.xpath('./td[2]/text()')[0].strip()
|
|
12
|
+
export_template_list.append({
|
|
13
|
+
'template_id': template_id,
|
|
14
|
+
'template_name': template_name,
|
|
15
|
+
'field_str': field_str
|
|
16
|
+
})
|
|
17
|
+
return export_template_list
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel, Field, ConfigDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ExportPackageOrderModel(BaseModel):
|
|
7
|
+
template_id: str = Field(alias="templateId", description="模板ID")
|
|
8
|
+
package_ids: str = Field("", alias="packageIds", description="packageId使用,号连接")
|
|
9
|
+
export_keys: str = Field(alias="exportKeys", description="导出字段, 需要使用urllib.parse.quote编码")
|
|
10
|
+
order_field: str = Field('order_create_time', alias="orderField", description="固定值不用管")
|
|
11
|
+
state: str = Field("", alias="state", description="订单状态")
|
|
12
|
+
start_time: str = Field("", alias="startTime", description="开始时间")
|
|
13
|
+
end_time: str = Field("", alias="endTime", description="结束时间")
|
|
14
|
+
time_type: str = Field("", alias="timeType", description="时间类型 2(发货时间) 0(付款时间) 1(下单时间)")
|
|
15
|
+
export_style: str = Field("1", alias="exportStyle", description="按包裹导出(1) 按订单导出(0) 按产品导出(2)")
|
|
16
|
+
history: str = Field("", alias="history", description="120天订单('') 历史订单('all')")
|
|
17
|
+
is_voided: str = Field("-1", alias="isVoided")
|
|
18
|
+
rule_id: str = Field("-1", alias="ruleId")
|
|
19
|
+
sysrule: str = Field("", alias="sysrule")
|
|
20
|
+
request_location: str = Field('0', alias="requestLocation", description="页面上pageTag的值(一般不用管0)")
|
|
21
|
+
is_search: str = Field('1', alias="isSearch")
|
|
22
|
+
|
|
23
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
@@ -4,7 +4,7 @@ import logging
|
|
|
4
4
|
from typing import Callable
|
|
5
5
|
|
|
6
6
|
import ddddocr
|
|
7
|
-
from httpx import AsyncClient, ReadTimeout
|
|
7
|
+
from httpx import AsyncClient, ReadTimeout, Timeout
|
|
8
8
|
from playwright.async_api import async_playwright, TimeoutError
|
|
9
9
|
|
|
10
10
|
from ey_commerce_lib.four_seller.constant.response import ResponseCodeEnum
|
|
@@ -37,13 +37,14 @@ class FourSellerClient:
|
|
|
37
37
|
self.__login_in_progress = None
|
|
38
38
|
# ddddocr实例
|
|
39
39
|
self.__ocr = ddddocr.DdddOcr()
|
|
40
|
+
timeout = Timeout(connect=60.0, read=60.0, write=60.0, pool=30.0)
|
|
40
41
|
# 异步客户端
|
|
41
42
|
self.__async_client = AsyncClient(base_url="https://www.4seller.com", cookies={"userToken": user_token},
|
|
42
43
|
headers={
|
|
43
44
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
|
44
45
|
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 "
|
|
45
46
|
"Safari/537.36"
|
|
46
|
-
})
|
|
47
|
+
}, timeout=timeout)
|
|
47
48
|
|
|
48
49
|
async def __auto_login_4seller(self) -> str:
|
|
49
50
|
"""
|
|
@@ -9,7 +9,9 @@ class TakeSendClient(object):
|
|
|
9
9
|
timeout = Timeout(connect=60.0, read=60.0, write=60.0, pool=30.0)
|
|
10
10
|
self.__async_client = AsyncClient(
|
|
11
11
|
base_url="http://k5.takesend.com:8180",
|
|
12
|
-
timeout=timeout
|
|
12
|
+
timeout=timeout,
|
|
13
|
+
verify=False
|
|
14
|
+
)
|
|
13
15
|
self.__username = username
|
|
14
16
|
self.__password = password
|
|
15
17
|
|
|
@@ -18,9 +20,9 @@ class TakeSendClient(object):
|
|
|
18
20
|
自动登录
|
|
19
21
|
:return:
|
|
20
22
|
"""
|
|
21
|
-
#
|
|
23
|
+
# 访问首页
|
|
22
24
|
await self.__async_client.get("/c_index.jsp")
|
|
23
|
-
#
|
|
25
|
+
# 登录
|
|
24
26
|
params = {
|
|
25
27
|
'action': 'logon'
|
|
26
28
|
}
|
|
@@ -28,9 +30,10 @@ class TakeSendClient(object):
|
|
|
28
30
|
'userid': self.__username,
|
|
29
31
|
'password': self.__password
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
# 请求登录接口
|
|
34
|
+
await self.__async_client.post(".//client/Logon", params=params, data=data, headers=LOGIN_HEADERS)
|
|
32
35
|
|
|
33
|
-
async def client_cc_order(self, excel_data: list):
|
|
36
|
+
async def client_cc_order(self, excel_data: list | str):
|
|
34
37
|
"""
|
|
35
38
|
修改泰嘉产品上传重量数据
|
|
36
39
|
:param excel_data:
|
|
@@ -43,7 +46,9 @@ class TakeSendClient(object):
|
|
|
43
46
|
data = {
|
|
44
47
|
'excel[]': excel_data,
|
|
45
48
|
}
|
|
46
|
-
|
|
49
|
+
|
|
50
|
+
response = await self.__async_client.post('/Client/CCOrder', params=params, data=data, headers=EDIT_HEADERS)
|
|
51
|
+
return response.json()
|
|
47
52
|
|
|
48
53
|
async def __aenter__(self):
|
|
49
54
|
return self
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
import urllib.parse
|
|
2
3
|
|
|
3
4
|
import pytest
|
|
4
5
|
|
|
@@ -6,6 +7,7 @@ from ey_commerce_lib.dxm.constant.order import ORDER_SEARCH_APPROVAL_BASE_FORM,
|
|
|
6
7
|
ORDER_SEARCH_PENDING_PROCESSING_BASE_FORM, ORDER_SEARCH_SELF_WAREHOUSE_BASE_FORM, \
|
|
7
8
|
ORDER_SEARCH_OUT_OF_STOCK_BASE_FORM, ORDER_SEARCH_HAVE_GOODS_BASE_FORM
|
|
8
9
|
from ey_commerce_lib.dxm.main import DxmClient
|
|
10
|
+
from ey_commerce_lib.dxm.schemas.export_package import ExportPackageOrderModel
|
|
9
11
|
from ey_commerce_lib.dxm.schemas.order import DxmOrderSearchForm
|
|
10
12
|
from ey_commerce_lib.dxm.schemas.tracking import TrackingPageListQuery
|
|
11
13
|
from ey_commerce_lib.dxm.schemas.warehouse import WarehouseProductQuery
|
|
@@ -24,7 +26,6 @@ async def login_success(user_token: str):
|
|
|
24
26
|
|
|
25
27
|
@pytest.mark.asyncio
|
|
26
28
|
async def test_auto_login_4seller():
|
|
27
|
-
# user_token = await auto_login_4seller(user_name="sky@eeyoung.com", password="ey010203@@")
|
|
28
29
|
# print(user_token)
|
|
29
30
|
async with FourSellerClient(
|
|
30
31
|
user_name="xxxxx",
|
|
@@ -52,11 +53,27 @@ async def test_dxm_api():
|
|
|
52
53
|
# print(pair_info.get('proid'))
|
|
53
54
|
# data = await dxm_client.update_dxm_commodity_front_sku('17773195771232287', 'fuck112')
|
|
54
55
|
# data = await dxm_client.get_authid_like_keyword('泰嘉')
|
|
55
|
-
data = await dxm_client.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
data = await dxm_client.list_export_template()
|
|
57
|
+
for item in data:
|
|
58
|
+
if item.get('template_name') == '周报订单导出模板':
|
|
59
|
+
template_json = await dxm_client.export_template_get_by_id_json(id_str=item.get('template_id'))
|
|
60
|
+
template_id = template_json.get('template').get('id')
|
|
61
|
+
template_field = template_json.get('template').get('templateField')
|
|
62
|
+
url = await dxm_client.export_package_order(ExportPackageOrderModel(
|
|
63
|
+
# 模板id
|
|
64
|
+
template_id=f'{template_id}',
|
|
65
|
+
# 导出字段
|
|
66
|
+
export_keys=urllib.parse.quote(template_field),
|
|
67
|
+
# 按包裹导出
|
|
68
|
+
export_type='1',
|
|
69
|
+
# 发货时间
|
|
70
|
+
time_type='2',
|
|
71
|
+
# 已发货
|
|
72
|
+
state='shipped',
|
|
73
|
+
start_time='2025-08-06 00:00:00',
|
|
74
|
+
end_time='2025-08-12 23:59:59'
|
|
75
|
+
))
|
|
76
|
+
print(f'导出成功,url={url}')
|
|
60
77
|
|
|
61
78
|
|
|
62
79
|
@pytest.mark.asyncio
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/constant/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/exception/__init__.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/exception/common.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/ebay_product.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/purchase.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/tracking.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/parser/warehouse.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/ebay_product.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/tracking.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/dxm/schemas/warehouse.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/parser/__init__.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/four_seller/parser/order.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/query/order.py
RENAMED
|
File without changes
|
{ey_commerce_lib-1.0.21 → ey_commerce_lib-1.0.23}/src/ey_commerce_lib/kogan/schemas/query/product.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|