1
This commit is contained in:
@@ -132,9 +132,9 @@ func TestRetailListCase(t *testing.T) {
|
||||
if err := json.Unmarshal([]byte(result.Skus), &nowSkus); err != nil {
|
||||
return
|
||||
}
|
||||
for _, ns := range nowSkus {
|
||||
ns.Price = fmt.Sprintf("%.2f", utils.Str2Float64(ns.Price)+utils.Str2Float64(ns.Price)*0.1)
|
||||
}
|
||||
//for _, ns := range nowSkus {
|
||||
// //ns.Price = fmt.Sprintf("%.2f", utils.Str2Float64(ns.Price)+utils.Str2Float64(ns.Price)*0.1)
|
||||
//}
|
||||
time.Sleep(time.Millisecond * 200)
|
||||
skuInfo.Skus = nowSkus
|
||||
if skuInfo.Skus[0].SkuID == "" || len(skuInfo.Skus) == 0 {
|
||||
@@ -249,21 +249,34 @@ func TestRetailDelete(t *testing.T) {
|
||||
Skus: []*BareStoreSkuInfo{
|
||||
&BareStoreSkuInfo{
|
||||
SkuID: fl.AppFoodCode,
|
||||
Stock: "999999",
|
||||
Stock: "99999",
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
i++
|
||||
|
||||
result, err := api.RetailSkuStock(utils.GetUUID(), testPoiCode, stockList)
|
||||
result, err := api.RetailSkuStock(utils.GetUUID(), poiCode, stockList)
|
||||
globals.SugarLogger.Debugf("===result :-%s", utils.Format4Output(result, false))
|
||||
globals.SugarLogger.Debugf("===result :-%v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMap(t *testing.T) {
|
||||
fmt.Println(16&4 != 0)
|
||||
poiCode := "20802261"
|
||||
stockList := make([]*BareStoreFoodInfo, 0, 100)
|
||||
stockList = append(stockList, &BareStoreFoodInfo{
|
||||
AppFoodCode: "mtcode_1772876609364365327",
|
||||
Skus: []*BareStoreSkuInfo{
|
||||
&BareStoreSkuInfo{
|
||||
SkuID: "21761610084",
|
||||
Stock: "99999",
|
||||
},
|
||||
},
|
||||
})
|
||||
result, err := api.RetailSkuStock(utils.GetUUID(), poiCode, stockList)
|
||||
globals.SugarLogger.Debugf("===result :-%s", utils.Format4Output(result, false))
|
||||
globals.SugarLogger.Debugf("===result :-%v", err)
|
||||
}
|
||||
|
||||
func TestRetailDat(t *testing.T) {
|
||||
@@ -365,7 +378,7 @@ func TestRetailSkuStock(t *testing.T) {
|
||||
Skus: []*BareStoreSkuInfo{
|
||||
&BareStoreSkuInfo{
|
||||
SkuID: "2212",
|
||||
Price: "1.2",
|
||||
//Price: "1.2",
|
||||
Stock: "123",
|
||||
},
|
||||
},
|
||||
@@ -393,7 +406,7 @@ func TestRetailSkuSellStatus(t *testing.T) {
|
||||
Skus: []*BareStoreSkuInfo{
|
||||
&BareStoreSkuInfo{
|
||||
SkuID: "23841",
|
||||
Price: "1.2",
|
||||
//Price: "1.2",
|
||||
Stock: "123",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user