上传后台消息推送

This commit is contained in:
liwei1dao 2023-06-14 11:20:23 +08:00
parent b50497a9e8
commit 953cb783db
4 changed files with 10 additions and 4 deletions

View File

@ -98,7 +98,7 @@
### 支付发货API
- 接口名:paydelivery
- 接口说明:web 服务器给玩家发送邮件
- 接口说明:web 服务器给玩家发送支付获得商品
- 请求地址:{IP}:{port}/paydelivery
- 请求参数:uid(用户id|签名),productid(商品id|签名),orderid(订单号|签名),price(总金额|签名),sign(签名)
- 请求样例

View File

@ -8,6 +8,7 @@ import (
"go_dreamfactory/lego/utils/crypto/md5"
"go_dreamfactory/pb"
"net/http"
"time"
)
type PayDeliveryResults struct {
@ -53,8 +54,9 @@ func (this *Api_Comp) PayDelivery(c *engine.Context) {
payresp.Code = pb.ErrorCode_SignError
payresp.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_SignError)
}
ctx, _ := context.WithTimeout(context.TODO(), time.Second*5)
if err = this.module.service.RpcCall(
context.Background(),
ctx,
comm.Service_Worker,
string(comm.Rpc_ModulePayDelivery),
payreq,

View File

@ -8,6 +8,7 @@ import (
"go_dreamfactory/pb"
"go_dreamfactory/sys/db"
"net/http"
"time"
)
type SyncCrossReq struct {
@ -51,8 +52,9 @@ func (this *Api_Comp) SyncCross(c *engine.Context) {
resp.Message = err.Error()
return
}
ctx, _ := context.WithTimeout(context.TODO(), time.Second*5)
if err = this.module.service.RpcBroadcast(
context.Background(),
ctx,
comm.Service_Worker,
string(comm.Rpc_DBSyncCross),
pb.EmptyReq{},

View File

@ -9,6 +9,7 @@ import (
"go_dreamfactory/sys/configure"
"net/http"
"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(
context.Background(),
ctx,
comm.Service_Worker,
string(comm.Rpc_ConfigureUpDate),
&pb.EmptyReq{},