feat: 顺运宝支持指定日期同步 (#53)

This commit is contained in:
chengma
2026-08-09 13:24:02 +08:00
parent 24b6c742c1
commit a18d4e67ae
10 changed files with 435 additions and 29 deletions
+12
View File
@@ -38,6 +38,18 @@ func TestMainPagesReturnOK(t *testing.T) {
})
}
sybRequest := httptest.NewRequest(http.MethodGet, "/syb", nil)
sybResponse := httptest.NewRecorder()
router.ServeHTTP(sybResponse, sybRequest)
for _, want := range []string{
"指定日期同步", `name="date_from"`, `name="date_to"`,
"按顺运宝货运单创建日期(UTC+8)同步",
} {
if !strings.Contains(sybResponse.Body.String(), want) {
t.Errorf("顺运宝页面缺少 %q", want)
}
}
pdd, err := repository.EnsurePddProduct(
db, "737116531267",
"https://mobile.yangkeduo.com/goods.html?goods_id=737116531267")