1
This commit is contained in:
@@ -26,8 +26,8 @@ func init() {
|
|||||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||||
|
|
||||||
//商超
|
//商超
|
||||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_izAHEkoEl4lV-w4JdJFNww") //token_n4TwqCntWWuvQwAawzxC0w
|
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w
|
||||||
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_r36FEse6_ywebQI65FNNWA") //token_n4TwqCntWWuvQwAawzxC0w
|
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_r36FEse6_ywebQI65FNNWA") //token_n4TwqCntWWuvQwAawzxC0w
|
||||||
cookieStr := `
|
cookieStr := `
|
||||||
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -17,9 +17,20 @@ func TestOrderViewStatus(t *testing.T) {
|
|||||||
}
|
}
|
||||||
t.Log(result)
|
t.Log(result)
|
||||||
}
|
}
|
||||||
|
func TestTimne(t *testing.T) {
|
||||||
|
|
||||||
|
fmt.Println(utils.Interface2Int64WithDefault(1695292241, 0))
|
||||||
|
fmt.Println(getTimeFromTimestamp(utils.Interface2Int64WithDefault(1695292241, 0)))
|
||||||
|
}
|
||||||
|
func getTimeFromTimestamp(timeStamp int64) time.Time {
|
||||||
|
if timeStamp < 1538103149 { // 立即达订单给的是1(而不是空,0),1538103149不是特殊值,只是一个任意之前的时间,这样写可以处理
|
||||||
|
return utils.DefaultTimeValue
|
||||||
|
}
|
||||||
|
return utils.Timestamp2Time(timeStamp)
|
||||||
|
}
|
||||||
|
|
||||||
func TestOrderGetOrderDetail(t *testing.T) {
|
func TestOrderGetOrderDetail(t *testing.T) {
|
||||||
result, err := api.OrderGetOrderDetail(1100692033635137950, false)
|
result, err := api.OrderGetOrderDetail(1000732590328335860, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,7 +189,11 @@ func (a *API) RetailCatUpdate(poiCode, catName string, updateParams *Param4Updat
|
|||||||
params["category_name"] = catName
|
params["category_name"] = catName
|
||||||
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
_, err = a.AccessAPI("retailCat/update", false, params)
|
revtel, err := a.AccessAPI("retailCat/update", false, params)
|
||||||
|
if err != nil {
|
||||||
|
globals.SugarLogger.Debugf("=======RetailCatUpdate : %v", err)
|
||||||
|
globals.SugarLogger.Debugf("=======RetailCatUpdate : %v", revtel)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ func TestRetailCatUpdate(t *testing.T) {
|
|||||||
|
|
||||||
// 测试获取门店分类列表
|
// 测试获取门店分类列表
|
||||||
func TestRetailCatList(t *testing.T) {
|
func TestRetailCatList(t *testing.T) {
|
||||||
result, err := api.RetailCatList("12663480")
|
result, err := api.RetailCatList("18900165")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ func TestRetailCatDelete(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRetailList(t *testing.T) {
|
func TestRetailList(t *testing.T) {
|
||||||
result, err := api.RetailList("8967897"+
|
result, err := api.RetailList("18900165"+
|
||||||
"", 0, 20)
|
"", 0, 20)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user