休闲平台上分下分添加
This commit is contained in:
parent
ff04ab8e0f
commit
6a53d21492
|
@ -256,3 +256,21 @@ type PlatfromGameLoginRsp struct {
|
|||
Message string `json:"message"`
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
||||
// 上分请求
|
||||
type PlatfromUpScoreReq struct {
|
||||
Username string `json:"username"`
|
||||
Channel string `json:"channel"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Count string `json:"count"`
|
||||
}
|
||||
|
||||
// 上分返回
|
||||
type PlatfromUpScoreRsp struct {
|
||||
Code int `json:"code"`
|
||||
Data struct {
|
||||
Count int64 `json:"count"`
|
||||
} `json:"data"`
|
||||
Message string `json:"message"`
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
|
|
|
@ -2962,6 +2962,152 @@ func init() {
|
|||
return common.ResponseTag_TransactYield, jsonDataRsp
|
||||
}))
|
||||
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/platform/upscore", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, interface{}) {
|
||||
|
||||
var AccountInfo *webapi.PlatfromCreateAccountReq
|
||||
err := json.Unmarshal(params, &AccountInfo)
|
||||
if err != nil {
|
||||
logger.Logger.Error("Unmarshal webapi.PlatfromCreateAccountReq error:", err)
|
||||
}
|
||||
|
||||
pack := &webapi.PlatfromGameLoginRsp{
|
||||
Success: false,
|
||||
Code: 200,
|
||||
Message: "未知错误",
|
||||
}
|
||||
|
||||
logger.Logger.Tracef("/api/platform/upscore %v", pack)
|
||||
|
||||
var jsonDataRsp []byte
|
||||
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
pack.Success = true
|
||||
pack.Message = "返回成功"
|
||||
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
|
||||
jsonDataRsp, err = json.Marshal(pack)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("/api/platform/createUser err: %v", err)
|
||||
}
|
||||
|
||||
tNode.TransRep.RetFiels = jsonDataRsp
|
||||
tNode.Resume()
|
||||
}), "/api/platform/upscore").Start()
|
||||
return common.ResponseTag_TransactYield, jsonDataRsp
|
||||
}))
|
||||
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/platform/downscore", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, interface{}) {
|
||||
|
||||
var AccountInfo *webapi.PlatfromCreateAccountReq
|
||||
err := json.Unmarshal(params, &AccountInfo)
|
||||
if err != nil {
|
||||
logger.Logger.Error("Unmarshal webapi.PlatfromCreateAccountReq error:", err)
|
||||
}
|
||||
|
||||
pack := &webapi.PlatfromGameLoginRsp{
|
||||
Success: false,
|
||||
Code: 200,
|
||||
Message: "未知错误",
|
||||
}
|
||||
|
||||
logger.Logger.Tracef("/api/platform/downscore %v", pack)
|
||||
|
||||
var jsonDataRsp []byte
|
||||
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
|
||||
pack.Success = true
|
||||
pack.Message = "返回成功"
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
|
||||
jsonDataRsp, err = json.Marshal(pack)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("/api/platform/downscore err: %v", err)
|
||||
}
|
||||
|
||||
tNode.TransRep.RetFiels = jsonDataRsp
|
||||
tNode.Resume()
|
||||
}), "/api/platform/downscore").Start()
|
||||
return common.ResponseTag_TransactYield, jsonDataRsp
|
||||
}))
|
||||
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/platform/getstatus", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, interface{}) {
|
||||
|
||||
var AccountInfo *webapi.PlatfromCreateAccountReq
|
||||
err := json.Unmarshal(params, &AccountInfo)
|
||||
if err != nil {
|
||||
logger.Logger.Error("Unmarshal webapi.PlatfromCreateAccountReq error:", err)
|
||||
}
|
||||
|
||||
pack := &webapi.PlatfromGameLoginRsp{
|
||||
Success: false,
|
||||
Code: 200,
|
||||
Message: "未知错误",
|
||||
}
|
||||
|
||||
logger.Logger.Tracef("/api/platform/getstatus %v", pack)
|
||||
|
||||
var jsonDataRsp []byte
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
pack.Success = true
|
||||
pack.Message = "返回成功"
|
||||
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
|
||||
jsonDataRsp, err = json.Marshal(pack)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("/api/platform/getstatus err: %v", err)
|
||||
}
|
||||
|
||||
tNode.TransRep.RetFiels = jsonDataRsp
|
||||
tNode.Resume()
|
||||
}), "/api/platform/getstatus").Start()
|
||||
return common.ResponseTag_TransactYield, jsonDataRsp
|
||||
}))
|
||||
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/platform/getgamedetailed", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, interface{}) {
|
||||
|
||||
var AccountInfo *webapi.PlatfromCreateAccountReq
|
||||
err := json.Unmarshal(params, &AccountInfo)
|
||||
if err != nil {
|
||||
logger.Logger.Error("Unmarshal webapi.PlatfromCreateAccountReq error:", err)
|
||||
}
|
||||
|
||||
pack := &webapi.PlatfromGameLoginRsp{
|
||||
Success: false,
|
||||
Code: 200,
|
||||
Message: "未知错误",
|
||||
}
|
||||
|
||||
logger.Logger.Tracef("/api/platform/getgamedetailed %v", pack)
|
||||
|
||||
var jsonDataRsp []byte
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
pack.Success = true
|
||||
pack.Message = "返回成功"
|
||||
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
|
||||
jsonDataRsp, err = json.Marshal(pack)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("/api/platform/getgamedetailed err: %v", err)
|
||||
}
|
||||
|
||||
tNode.TransRep.RetFiels = jsonDataRsp
|
||||
tNode.Resume()
|
||||
}), "/api/platform/getgamedetailed").Start()
|
||||
return common.ResponseTag_TransactYield, jsonDataRsp
|
||||
}))
|
||||
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/exchange_order", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, interface{}) {
|
||||
pack := &webapiproto.SAGetExchangeOrder{
|
||||
|
|
Loading…
Reference in New Issue