上传后台消息推送
This commit is contained in:
parent
b50497a9e8
commit
953cb783db
@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
### 支付发货API
|
### 支付发货API
|
||||||
- 接口名:paydelivery
|
- 接口名:paydelivery
|
||||||
- 接口说明:web 服务器给玩家发送邮件
|
- 接口说明:web 服务器给玩家发送支付获得商品
|
||||||
- 请求地址:{IP}:{port}/paydelivery
|
- 请求地址:{IP}:{port}/paydelivery
|
||||||
- 请求参数:uid(用户id|签名),productid(商品id|签名),orderid(订单号|签名),price(总金额|签名),sign(签名)
|
- 请求参数:uid(用户id|签名),productid(商品id|签名),orderid(订单号|签名),price(总金额|签名),sign(签名)
|
||||||
- 请求样例
|
- 请求样例
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"go_dreamfactory/lego/utils/crypto/md5"
|
"go_dreamfactory/lego/utils/crypto/md5"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PayDeliveryResults struct {
|
type PayDeliveryResults struct {
|
||||||
@ -53,8 +54,9 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) {
|
|||||||
payresp.Code = pb.ErrorCode_SignError
|
payresp.Code = pb.ErrorCode_SignError
|
||||||
payresp.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_SignError)
|
payresp.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_SignError)
|
||||||
}
|
}
|
||||||
|
ctx, _ := context.WithTimeout(context.TODO(), time.Second*5)
|
||||||
if err = this.module.service.RpcCall(
|
if err = this.module.service.RpcCall(
|
||||||
context.Background(),
|
ctx,
|
||||||
comm.Service_Worker,
|
comm.Service_Worker,
|
||||||
string(comm.Rpc_ModulePayDelivery),
|
string(comm.Rpc_ModulePayDelivery),
|
||||||
payreq,
|
payreq,
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"go_dreamfactory/sys/db"
|
"go_dreamfactory/sys/db"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SyncCrossReq struct {
|
type SyncCrossReq struct {
|
||||||
@ -51,8 +52,9 @@ func (this *Api_Comp) SyncCross(c *engine.Context) {
|
|||||||
resp.Message = err.Error()
|
resp.Message = err.Error()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
ctx, _ := context.WithTimeout(context.TODO(), time.Second*5)
|
||||||
if err = this.module.service.RpcBroadcast(
|
if err = this.module.service.RpcBroadcast(
|
||||||
context.Background(),
|
ctx,
|
||||||
comm.Service_Worker,
|
comm.Service_Worker,
|
||||||
string(comm.Rpc_DBSyncCross),
|
string(comm.Rpc_DBSyncCross),
|
||||||
pb.EmptyReq{},
|
pb.EmptyReq{},
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
//上传配置文件
|
//上传配置文件
|
||||||
@ -52,8 +53,9 @@ func (this *Api_Comp) Upload(c *engine.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ctx, _ := context.WithTimeout(context.TODO(), time.Second*5)
|
||||||
if err := this.module.service.RpcBroadcast(
|
if err := this.module.service.RpcBroadcast(
|
||||||
context.Background(),
|
ctx,
|
||||||
comm.Service_Worker,
|
comm.Service_Worker,
|
||||||
string(comm.Rpc_ConfigureUpDate),
|
string(comm.Rpc_ConfigureUpDate),
|
||||||
&pb.EmptyReq{},
|
&pb.EmptyReq{},
|
||||||
|
Loading…
Reference in New Issue
Block a user