1
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package ebaiapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
)
|
||||
|
||||
func TestOrderGet(t *testing.T) {
|
||||
result, err := api.OrderGet("4013840036319612596")
|
||||
result, err := api.OrderGet("4040400104793805400")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
@@ -165,3 +166,83 @@ func TestAggrent(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestForAA(t *testing.T) {
|
||||
|
||||
var a = []int64{6044969,
|
||||
6043622,
|
||||
6044971,
|
||||
6042562,
|
||||
31728,
|
||||
31729,
|
||||
32143,
|
||||
32142,
|
||||
6043605,
|
||||
6043604,
|
||||
6042743,
|
||||
30226,
|
||||
30225,
|
||||
6043959,
|
||||
6043960,
|
||||
6042349,
|
||||
6042296,
|
||||
31882,
|
||||
31871,
|
||||
6042704,
|
||||
6039499,
|
||||
30415,
|
||||
30414,
|
||||
32364,
|
||||
32363,
|
||||
6043603,
|
||||
6043602,
|
||||
30224,
|
||||
30223,
|
||||
6042284,
|
||||
30215,
|
||||
30214,
|
||||
6039424,
|
||||
31235,
|
||||
30368,
|
||||
30370,
|
||||
30369,
|
||||
30183,
|
||||
30182,
|
||||
6042733,
|
||||
6042737,
|
||||
30237,
|
||||
30236,
|
||||
6042287,
|
||||
30213,
|
||||
6042288,
|
||||
30233,
|
||||
30207,
|
||||
30206,
|
||||
30190,
|
||||
30189,
|
||||
6042167,
|
||||
6042166,
|
||||
30413}
|
||||
|
||||
var cc = ""
|
||||
for _, v := range a {
|
||||
if v != 30413 {
|
||||
cc += utils.Int64ToStr(v) + ","
|
||||
}
|
||||
cc += utils.Int64ToStr(v)
|
||||
}
|
||||
fmt.Println(cc)
|
||||
}
|
||||
|
||||
func TestOnline(t *testing.T) {
|
||||
fmt.Println(0&(2|4|32) != 0)
|
||||
fmt.Println(MergeStoreStatus(-2, 1))
|
||||
}
|
||||
|
||||
// 合并得到最终的门店状态
|
||||
func MergeStoreStatus(status int, vendorStatus int) int {
|
||||
if status < vendorStatus {
|
||||
return status
|
||||
}
|
||||
return vendorStatus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user