This commit is contained in:
richboo111
2022-12-26 11:32:24 +08:00
2 changed files with 15 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ func TestShopQuery(t *testing.T) {
// if err == nil { // if err == nil {
// t.Fatal("应该报错找不到门店") // t.Fatal("应该报错找不到门店")
// } // }
shopInfo, err := api.ShopQuery("800268") shopInfo, err := api.ShopQuery("667553")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@@ -28,18 +28,18 @@ func TestShopQuery(t *testing.T) {
func TestShopCreate(t *testing.T) { func TestShopCreate(t *testing.T) {
shopInfo := &ShopInfo{ shopInfo := &ShopInfo{
ShopID: "800268", ShopID: "667553",
ShopName: "手可摘鲜果店", ShopName: "三里家园店",
Category: ShopCategoryFruit, Category: ShopCategoryFruit,
SecondCategory: ShopCategoryFruitFruit, SecondCategory: ShopCategoryFruitFruit,
ContactName: "李廷杰", ContactName: "高朋朋",
ContactPhone: "15828509674", ContactPhone: "15869188805",
ShopAddress: "四川省成都市双流县华阳街道南湖大道279号", ShopAddress: "浙江省杭州市下城区文晖街道三里家园一小区25幢杭州新三里家园农贸市场一层36号",
ShopLng: 104051308, ShopLng: 120190237,
ShopLat: 30490037, ShopLat: 30301060,
CoordinateType: CoordinateTypeMars, CoordinateType: CoordinateTypeMars,
DeliveryServiceCodes: utils.Int2Str(DeliveryServiceCodeRapid), DeliveryServiceCodes: utils.Int2Str(DeliveryServiceCodeRapid),
BusinessHours: "[{\"beginTime\":\"09:00\",\"endTime\":\"22:00\"}]", BusinessHours: "[{\"beginTime\":\"07:00\",\"endTime\":\"19:30\"}]",
} }
_, err := api.ShopCreate(shopInfo) _, err := api.ShopCreate(shopInfo)
if err != nil { if err != nil {
@@ -85,7 +85,9 @@ func TestSimulateReportException(t *testing.T) {
} }
func TestName(t *testing.T) { func TestName(t *testing.T) {
cc := 1 ShopLat := 3030106
cc |= 1 | 2 if ShopLat <= 9999999 {
fmt.Println(cc) ShopLat *= 10
}
fmt.Println(ShopLat)
} }

View File

@@ -246,7 +246,7 @@ func TestGetProductAuditList(t *testing.T) {
func TestCreateShopData(t *testing.T) { func TestCreateShopData(t *testing.T) {
imgs := make([]Imgs, 0, 0) imgs := make([]Imgs, 0, 0)
img := []string{"http://image.jxc4.com/image/2506b07009977017f4a412557584957b.jpg"} img := []string{"http://p0.meituan.net/xianfu/83b499974d4507a31f6e654d41cf578149300.jpg"}
for _, v := range img { for _, v := range img {
if v != "" { if v != "" {
imgs = append(imgs, Imgs{ imgs = append(imgs, Imgs{