lt 6 ماه پیش
والد
کامیت
1aadf36dba

+ 17 - 0
RO_Server_Trunk-branch_0.1.39/roserver/game/msg/role_msg.go

@@ -10,6 +10,7 @@ import (
 	"roserver/baseserver/set"
 	model2 "roserver/game/model"
 	"roserver/serverproto"
+	"strconv"
 	"unicode/utf8"
 )
 
@@ -3756,6 +3757,22 @@ func init() {
 		role.(model2.RoleLogicOuter).PayInfoGet(msg.GoodsType, msg.GoodsId, msg.Count, 0, 0)
 	})
 
+	serverproto.Handle_GAME_SSPayOrderCreateReq = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
+		msg := ev.Msg().(*serverproto.SSPayOrderCreateReq)
+		uid, _ := strconv.ParseUint(msg.Uid, 10, 64)
+		role := model2.RoleMag.GetRoleFromUUid(uid)
+		if role == nil {
+			return
+		}
+		util.InfoF("uid=%v receive CSPayInfoGetReq ms=%v", role.GetUUid(), msg)
+
+		bRet := role.(model2.RoleLogicOuter).CheckRushShopInfoGet(msg.GoodsType, msg.GoodsId, msg.Count)
+		if bRet {
+			return
+		}
+		role.(model2.RoleLogicOuter).PayInfoGet(msg.GoodsType, msg.GoodsId, msg.Count, 0, 0)
+	})
+
 	//获取充值信息(订单信息,商品信息)
 	serverproto.Handle_GAME_SSGetRushShopBuyAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
 		msg := ev.Msg().(*serverproto.SSGetRushShopBuyAck)

+ 4 - 4
RO_Server_Trunk-branch_0.1.39/roserver/gmweb/msg/msg.go

@@ -144,10 +144,10 @@ func init() {
 		gmmodel.GetChatUpdateMag().AddChatMsg(msg)
 	})
 
-	serverproto.Handle_GMWEB_SSWebGMChatMsgNtf = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
-		msg := ev.Msg().(*serverproto.SSWebGMChatMsgNtf)
-		util.InfoF("uid=%v SSWebGMChatMsgNtf msg=%v", msg.Uid, msg)
+	serverproto.Handle_GAME_SSPayOrderCreateAck = model.HandleBackendMessage(func(ev rocommon.ProcEvent, cliId model.ClientID) {
+		msg := ev.Msg().(*serverproto.SSPayOrderCreateAck)
+		util.InfoF("uid=%v SSPayOrderCreateAck msg=%v", msg.Status, msg)
 
-		gmmodel.GetChatUpdateMag().AddChatMsg(msg)
+		//gmmodel.GetChatUpdateMag().AddChatMsg(msg)
 	})
 }

+ 10 - 3
RO_Server_Trunk-branch_0.1.39/roserver/gmweb/msg/web_gmmsg.go

@@ -13,6 +13,7 @@ import (
 	"rocommon/util"
 	"roserver/baseserver/model"
 	dbmodel "roserver/db/model"
+	selfmodel "roserver/game/model"
 	gmweb "roserver/gmweb/model"
 	"roserver/serverproto"
 	"strconv"
@@ -360,7 +361,8 @@ func WebGmProcessCreateOrder(c *gin.Context) {
 	orderIdStr := c.DefaultQuery("order_id", "")    ///default ""
 	productIdStr := c.DefaultQuery("productId", "") ///default ""
 	countStr := c.DefaultQuery("count", "")         ///default ""
-	uid, _ := model.Str2NumU64(uidStr)
+	//uid, _ := model.Str2NumU64(uidStr)
+	cpOrderId := model.GenerateUidByZone(service.GetServiceConfig().Node.Zone)
 	productId, _ := strconv.Atoi(productIdStr)
 	count, _ := strconv.Atoi(countStr)
 	if uidStr == "" || orderIdStr == "" || productIdStr == "" {
@@ -371,13 +373,18 @@ func WebGmProcessCreateOrder(c *gin.Context) {
 		})
 		return
 	}
-	ss := serverproto.SSPayOrderCreateReq{
+	ss := &serverproto.SSPayOrderCreateReq{
 		OrderId: orderIdStr,
 		GoodsId: int32(productId),
 		Count:   int32(count),
 		Uid:     uidStr,
 	}
-	c.JSON(http.StatusOK, CheckUser{CharacterName: bfInfo.NickName, Server: strconv.Itoa(bfInfo.Serverid / 2), CallBackKey: callBackKey})
+
+	selfmodel.SendSocial(ss)
+	c.JSON(http.StatusOK, gin.H{
+		"status":     "success",
+		"order_code": "string",
+	})
 }
 
 type UserList struct {