This commit is contained in:
richboo111
2024-01-17 10:25:00 +08:00
parent c332939555
commit 922aec1533
2 changed files with 29 additions and 14 deletions

View File

@@ -1,8 +1,10 @@
package sfps2
import (
"crypto/rand"
"fmt"
"git.rosy.net.cn/baseapi/utils"
"math/big"
"strings"
"testing"
)
@@ -135,3 +137,8 @@ func TestNew(t *testing.T) {
fmt.Println(lng, lat)
}
}
func Test2(t *testing.T) {
n, _ := rand.Int(rand.Reader, big.NewInt(10000000000))
println(n.Int64())
}

View File

@@ -5,6 +5,7 @@ import (
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/utils"
"go.uber.org/zap"
"strings"
"testing"
)
@@ -45,14 +46,14 @@ func init() {
//计算运单价格
func TestGetWaybillPrice(t *testing.T) {
param := &GetOrderPriceReq{
OriginID: "T20230114M",
FromAddress: "万科加州湾V派",
ToAddress: "嘉华酒店",
OriginID: "88442688797068",
FromAddress: "成都市都江堰市中新巷四合院金杨调味",
ToAddress: "景中路宝石花石油花园天能电池(宝石花石油花园店)111",
CityName: "成都市",
SendType: "0",
ToLat: "29.604639",
ToLng: "103.743532",
FromLat: "29.608636",
ToLat: "30.985248",
ToLng: "103.638852",
FromLat: "103.639058",
FromLng: "103.728641",
//ToLat: "29.598951",
//ToLng: "103.736961",
@@ -103,15 +104,22 @@ func TestCancelOrder(t *testing.T) {
fmt.Println(err)
}
//辅助测试
type tStruct struct {
name string
}
func Test(t *testing.T) {
zero := 0
a := int(zero) * 100
fmt.Printf("a====%d", a)
//a := "成都市"
a := "都江堰市"
b := "都江堰市"
c := "都江堰市中新巷四合院金杨调味"
d := ""
if !strings.Contains(c, a) {
d += a
//fmt.Println(d)
}
if !strings.Contains(c, b) {
d += b
}
d += c
fmt.Println(d)
}
func TestGetOrderLiquidatedDamages(t *testing.T) {