|
@ -6,6 +6,7 @@ import ( |
|
|
"github.com/ouxuanserver/osmanthuswine/src/helper" |
|
|
"github.com/ouxuanserver/osmanthuswine/src/helper" |
|
|
"github.com/panjf2000/ants" |
|
|
"github.com/panjf2000/ants" |
|
|
. "github.com/smartystreets/goconvey/convey" |
|
|
. "github.com/smartystreets/goconvey/convey" |
|
|
|
|
|
pay_service "hudongzhuanjia/services/pay" |
|
|
"hudongzhuanjia/utils" |
|
|
"hudongzhuanjia/utils" |
|
|
"hudongzhuanjia/utils/define" |
|
|
"hudongzhuanjia/utils/define" |
|
|
"math/rand" |
|
|
"math/rand" |
|
@ -13,7 +14,6 @@ import ( |
|
|
"regexp" |
|
|
"regexp" |
|
|
"runtime" |
|
|
"runtime" |
|
|
"sort" |
|
|
"sort" |
|
|
"strings" |
|
|
|
|
|
"sync" |
|
|
"sync" |
|
|
"testing" |
|
|
"testing" |
|
|
"time" |
|
|
"time" |
|
@ -196,12 +196,8 @@ func TestDuration(t *testing.T) { |
|
|
//}
|
|
|
//}
|
|
|
|
|
|
|
|
|
func TestRefundRedPack(t *testing.T) { |
|
|
func TestRefundRedPack(t *testing.T) { |
|
|
var a = `["姓名","电话"]` |
|
|
|
|
|
fmt.Println(a[1 : len(a)-1]) |
|
|
|
|
|
as := strings.Split(a[1:len(a)-1], ",") |
|
|
|
|
|
fmt.Printf("%+v\n", as) |
|
|
|
|
|
fmt.Println(strings.Trim(as[1], "\"") == "电话") |
|
|
|
|
|
fmt.Println(as[0] == "电话") |
|
|
|
|
|
|
|
|
res, err := pay_service.Refund("退款", "RpY6pmvbZy9yPP8kPEzF5H7s27E3kW3E") |
|
|
|
|
|
fmt.Printf("%+v, %v", res, err) |
|
|
//res, err := pay_service.QueryRedPack("tDYW8edlzegSlVNaJMXsteZEeuVL")
|
|
|
//res, err := pay_service.QueryRedPack("tDYW8edlzegSlVNaJMXsteZEeuVL")
|
|
|
//fmt.Printf("%+v, %+v", res, err)
|
|
|
//fmt.Printf("%+v, %+v", res, err)
|
|
|
} |
|
|
} |