42 lines
960 B
Go
42 lines
960 B
Go
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))
|
|
}
|