1
This commit is contained in:
parent
b7c6cda3dc
commit
67208ab3bd
@ -130,3 +130,7 @@ const (
|
|||||||
TRANS_ID_MIN_LEN = 77
|
TRANS_ID_MIN_LEN = 77
|
||||||
TRANS_ID_MAX_LEN = 78
|
TRANS_ID_MAX_LEN = 78
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
TRANS_ID_FUNC_NORMAL = 1
|
||||||
|
)
|
||||||
|
@ -43,7 +43,7 @@ func (ea *RechargeApi) RechargeList(c *gin.Context) {
|
|||||||
func (this *RechargeApi) Buy(c *gin.Context) {
|
func (this *RechargeApi) Buy(c *gin.Context) {
|
||||||
reqJson := struct {
|
reqJson := struct {
|
||||||
NetId int32 `json:"net_id"`
|
NetId int32 `json:"net_id"`
|
||||||
GoodsId string `json:"goods_id"`
|
GoodsId int32 `json:"goods_id"`
|
||||||
AccountAddress string `json:"account_address"`
|
AccountAddress string `json:"account_address"`
|
||||||
}{}
|
}{}
|
||||||
if err := c.ShouldBindJSON(&reqJson); err != nil {
|
if err := c.ShouldBindJSON(&reqJson); err != nil {
|
||||||
@ -58,8 +58,26 @@ func (this *RechargeApi) Buy(c *gin.Context) {
|
|||||||
f5.RspErr(c, 2, "goods id param error")
|
f5.RspErr(c, 2, "goods id param error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
shortOrderId := q5.ToString(f5.GetApp().NewLockNodeUuid())
|
shortOrderId := f5.GetApp().NewLockNodeUuid()
|
||||||
orderId := q5.ToString(shortOrderId)
|
orderId := ""
|
||||||
|
{
|
||||||
|
transId := jccommon.NewTransId()
|
||||||
|
transId.Init(
|
||||||
|
jccommon.TRANS_ID_FUNC_NORMAL,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
[3]int64{
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
shortOrderId,
|
||||||
|
})
|
||||||
|
var err error
|
||||||
|
orderId, err = transId.ToString()
|
||||||
|
if err != nil {
|
||||||
|
f5.RspErr(c, 2, "server internal error")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
params := map[string]string{
|
params := map[string]string{
|
||||||
"c": "BcService",
|
"c": "BcService",
|
||||||
"a": "recharge",
|
"a": "recharge",
|
||||||
|
@ -84,7 +84,7 @@ type Recharge struct {
|
|||||||
recharge_item int32
|
recharge_item int32
|
||||||
recharge_type int32
|
recharge_type int32
|
||||||
recharge_item_num int32
|
recharge_item_num int32
|
||||||
id string
|
id int32
|
||||||
recharge_currency string
|
recharge_currency string
|
||||||
|
|
||||||
_flags1_ uint64
|
_flags1_ uint64
|
||||||
@ -401,7 +401,7 @@ func (this *Recharge) HasRechargeItemNum() bool {
|
|||||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Recharge) GetId() string {
|
func (this *Recharge) GetId() int32 {
|
||||||
return this.id
|
return this.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,11 +65,11 @@ message Language
|
|||||||
message Recharge
|
message Recharge
|
||||||
{
|
{
|
||||||
optional string recharge_cost_num = 1;
|
optional string recharge_cost_num = 1;
|
||||||
optional string recharge_icon =2;
|
optional string recharge_icon =2;
|
||||||
optional int32 recharge_item =3;
|
optional int32 recharge_item =3;
|
||||||
optional int32 recharge_type =4;
|
optional int32 recharge_type =4;
|
||||||
optional int32 recharge_item_num =5;
|
optional int32 recharge_item_num =5;
|
||||||
optional string id =6;
|
optional int32 id =6;
|
||||||
optional string recharge_currency = 7;
|
optional string recharge_currency = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user