- 饿百与京东拉门店数据基本OK
This commit is contained in:
41
business/netspider/netspider_test.go
Normal file
41
business/netspider/netspider_test.go
Normal file
@@ -0,0 +1,41 @@
|
||||
package netspider
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ditu"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
_ "git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
|
||||
_ "git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
||||
"git.rosy.net.cn/jx-callback/globals/testinit"
|
||||
)
|
||||
|
||||
func init() {
|
||||
testinit.Init()
|
||||
}
|
||||
|
||||
func TestGetStoreListByCoordinate(t *testing.T) {
|
||||
storeList, err := getStoreListByCoordinates(jxcontext.AdminCtx, nil, 3, "成都",
|
||||
[]*ditu.Coordinate{
|
||||
&ditu.Coordinate{
|
||||
Lng: 104.057218,
|
||||
Lat: 30.6949,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(storeList, false))
|
||||
t.Log(len(storeList))
|
||||
}
|
||||
|
||||
func TestGetCityShops(t *testing.T) {
|
||||
shopList, err := GetCityShops(jxcontext.AdminCtx, nil, []int{0, 3}, 510100, 5000, 3000)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(shopList, false))
|
||||
t.Log(len(shopList))
|
||||
}
|
||||
Reference in New Issue
Block a user