51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
"service/api/base"
|
||
|
vasproto "service/api/proto/vas/proto"
|
||
|
"service/bizcommon/common"
|
||
|
"service/dbstruct"
|
||
|
"testing"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func TestA(t *testing.T) {
|
||
|
b, _ := json.Marshal(dbstruct.Product{
|
||
|
Id: dbstruct.ProductIdH5Coin10000,
|
||
|
Type: dbstruct.ProductTypeCoins,
|
||
|
PayMeans: dbstruct.ProductPayMeansMoney,
|
||
|
PriceFixType: dbstruct.ProductPriceFixTypeOfficial,
|
||
|
DevType: common.DeviceTypeH5,
|
||
|
Name: "500金币",
|
||
|
Subject: "500金币",
|
||
|
Desc: "500金币",
|
||
|
RealPrice: 1,
|
||
|
OriPrice: 1,
|
||
|
RealCoinPrice: 0,
|
||
|
OriCoinPrice: 0,
|
||
|
DelFlag: 0,
|
||
|
})
|
||
|
t.Log(string(b))
|
||
|
|
||
|
b, _ = json.Marshal(vasproto.GetCoinsProductListReq{
|
||
|
base.BaseRequest{
|
||
|
Mid: 111,
|
||
|
Did: "aaa",
|
||
|
Version: "1.0.0",
|
||
|
OsVersion: "66",
|
||
|
DevType: 2,
|
||
|
Channel: "oppo",
|
||
|
Model: "OA112",
|
||
|
NetType: "wifi",
|
||
|
Timestamp: time.Now().UnixMicro(),
|
||
|
Token: "aaaaaaa",
|
||
|
Location: struct {
|
||
|
Lat float64 `json:"b_lat"`
|
||
|
Lon float64 `json:"b_lon"`
|
||
|
}{},
|
||
|
},
|
||
|
})
|
||
|
t.Log(string(b))
|
||
|
}
|