修改各种发单是扣款,品牌扣款和门店扣款,品牌充值门店充值
This commit is contained in:
@@ -11,7 +11,7 @@ func TestBillList(t *testing.T) {
|
||||
from := time.Date(now.Year(), now.Month(), now.Day()-8, 0, 0, 0, 0, time.Local)
|
||||
to := time.Date(now.Year(), now.Month(), now.Day()-2, 23, 59, 59, 59, time.Local)
|
||||
param := &Bill{
|
||||
AppPoiCode: "16967920",
|
||||
AppPoiCode: "7379574",
|
||||
StartDate: from.Unix(),
|
||||
EndDate: to.Unix(),
|
||||
Offset: 0,
|
||||
|
||||
@@ -23,7 +23,7 @@ func init() {
|
||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
|
||||
// 果园
|
||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
// api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
|
||||
//商超
|
||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_n4TwqCntWWuvQwAawzxC0w") //token_n4TwqCntWWuvQwAawzxC0w
|
||||
|
||||
@@ -35,7 +35,7 @@ func TestOrderGetOrderDetail(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail2(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail2(1300248543772157444, false)
|
||||
result, err := api.OrderGetOrderDetail2(1000533651036489997, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -44,10 +44,10 @@ func TestPoiSave(t *testing.T) {
|
||||
//}
|
||||
poiParams := map[string]interface{}{}
|
||||
//utils.FilterMapNilMembers(utils.Struct2FlatMap(result[0]))
|
||||
//poiParams["address"] = "成都市温江区柳城学海路585号"
|
||||
poiParams["address"] = "四川省成都市龙泉驿区大面街道青台山路753号"
|
||||
//poiParams["pic_url"] = "http://image.jxc4.com/image/5c9fc4fffb4d5ff1aecf85a2d2543e00.jpg"
|
||||
poiParams["name"] = "京西菜市(礼嘉桥村市场店)"
|
||||
err := api.PoiSave("17395411", poiParams)
|
||||
//poiParams["name"] = "京西菜市(礼嘉桥村市场店)"
|
||||
err := api.PoiSave("3508345", poiParams)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
|
||||
@@ -410,8 +410,9 @@ func (a *API) RetailSkuSave(poiCode, foodCode string, standardSkus, unstandardSk
|
||||
|
||||
func (a *API) RetailDelete(trackInfo, poiCode, foodCode string) (err error) {
|
||||
_, err = a.AccessAPI2("retail/delete", false, map[string]interface{}{
|
||||
KeyAppPoiCode: poiCode,
|
||||
KeyAppFoodCode: foodCode,
|
||||
KeyAppPoiCode: poiCode,
|
||||
KeyAppFoodCode: foodCode,
|
||||
"is_delete_retail_cat": 2,
|
||||
}, resultKeyData, trackInfo)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
@@ -117,6 +118,19 @@ func TestRetailListAll(t *testing.T) {
|
||||
t.Log(len(result))
|
||||
}
|
||||
|
||||
// 删除所有门店商品
|
||||
func TestReloadStoreSku(t *testing.T) {
|
||||
result, err := api.RetailListAll("17817296")
|
||||
if err == nil {
|
||||
for i := 0; i < len(result); i++ {
|
||||
err := api.RetailDelete(utils.Int64ToStr(time.Now().Unix()), "17817296", result[i].AppFoodCode)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestRetailGet(t *testing.T) {
|
||||
result, err := api.RetailGet(testPoiCode, "4267")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user