lt 4 месяцев назад
Родитель
Сommit
c2f93bb1f8

+ 0 - 1
RO_Server_Trunk-branch_0.1.39/roserver/db/model/role_msg.go

@@ -245,7 +245,6 @@ func init() {
 					}
 					UpdatePlayerBriefInfo(cliId.SessID, briefInfo, true, msg.ActiveCode, msg.OpenId, msg.SubPlatform)
 				}
-				return
 			}
 			ack.Err = int32(serverproto.ErrorCode_ERROR_OK)
 		}

+ 3 - 1
RO_Server_Trunk-branch_0.1.39/roserver/game/model/role_send.go

@@ -368,11 +368,13 @@ func (this *Role) SendRank(msg interface{}) bool {
 	return this.sendService(msg, this.rankNode)
 }
 
-func (this *Role) SendDbUserDelete(status int32, types int32, uid uint64) {
+func (this *Role) SendDbUserDelete(status int32, types int32, uid uint64, openId string, zoneId int32) {
 	msg33 := &serverproto.SSUserDeleteReq{
 		Status: status,
 		Type:   types,
 		Uid:    uid,
+		OpenId: openId,
+		ZoneId: zoneId,
 	}
 	this.SendDb(msg33)
 }

+ 5 - 2
RO_Server_Trunk-branch_0.1.39/roserver/game/msg/role_msg.go

@@ -849,7 +849,7 @@ func init() {
 		}
 		util.ErrorF("uid=%v receive CSUserDeleteReq msg=%v", role.GetUUid(), msg)
 
-		role.(*model2.Role).SendDbUserDelete(msg.Status, 0, role.GetUUid())
+		role.(*model2.Role).SendDbUserDelete(msg.Status, 0, role.GetUUid(), role.GetOpenId(), role.GetSelectZone())
 	})
 
 	//请求删除账号信息
@@ -861,7 +861,7 @@ func init() {
 		}
 		util.DebugF("uid=%v receive CSCardCollectionRankReq msg=%v", role.GetUUid(), msg)
 
-		role.(*model2.Role).SendDbUserDelete(0, 1, role.GetUUid())
+		role.(*model2.Role).SendDbUserDelete(0, 1, role.GetUUid(), role.GetOpenId(), role.GetSelectZone())
 	})
 
 	//请求删除账号
@@ -878,6 +878,9 @@ func init() {
 		} else if msg.Error == 3 {
 			ack := &serverproto.SCUserDeleteAck{Time: msg.Time}
 			role.(*model2.Role).ReplayGate(ack, true)
+		} else {
+			ack := &serverproto.SCUserDeleteInfoAck{Error: 1}
+			role.(*model2.Role).ReplayGate(ack, true)
 		}
 	})
 

+ 15 - 1
操作命令/java相关命令.txt

@@ -121,6 +121,10 @@ mongodump --uri='mongodb://mongobackup:Backup562221715@localhost:27017' \
           --authenticationDatabase=admin \
           --out /backup/mongodb/
 
+春之歌
+mongodump --uri='mongodb://mongobackup:Backup562221715@localhost:27017/?authSource=admin' \
+          --out /server/mongodb/
+
 # 启动 MongoDB 服务
 sudo systemctl start mongodb
 
@@ -218,4 +222,14 @@ sudo tail -f /var/log/mongodb/mongod.log
 春之歌redis:/usr/bin/redis-server 127.0.0.1:6379   文件保存在/var/lib/redis
 mongo:/usr/bin/mongod -f /etc/mongod.conf
 mysql:/usr/sbin/mysqld
-nginx:./nginx -c /usr/local/nginx/conf/nginx.conf
+nginx:./nginx -c /usr/local/nginx/conf/nginx.conf
+
+# 1. 格式化整个磁盘为文件系统
+sudo mkfs.ext4 /dev/vdb
+
+# 2. 挂载到 /data 目录
+sudo mount /dev/vdb /data
+
+# 3. 检查是否成功
+df -h
+lsblk

+ 59 - 1
操作命令/mongo操作命令.txt

@@ -76,6 +76,36 @@ db.pay.aggregate([
     }
   }
 ])
+最近三天充值
+db.pay.aggregate([
+  {
+    $match: {
+      callbaktime: { $exists: true, $ne: null }
+    }
+  },
+  {
+    $addFields: {
+      // 将callbaktime转换为数字
+      callbaktimeNum: { $toDouble: "$callbaktime" }
+    }
+  },
+  {
+    $match: {
+      callbaktimeNum: { 
+        $gte: Math.floor(Date.now() / 1000) - (3 * 24 * 60 * 60)
+      }
+    }
+  },
+  {
+    $group: {
+      _id: null,
+      totalMoney: { $sum: "$money" },
+      count: { $sum: 1 },
+      minTime: { $min: "$callbaktimeNum" },
+      maxTime: { $max: "$callbaktimeNum" }
+    }
+  }
+])
 
 备份玩家数据
 mongoexport -h localhost -p 27017 -u admin -p 123456 --authenticationDatabase admin -d m5_x1_game_10001 -c user -q '{ "_id": { "$numberLong": "10002017" } }' -o user_10002017.json
@@ -114,4 +144,32 @@ db.user.find({ _id: 10001747 }).forEach(function(doc) {
     print("过滤前数量: " + Object.keys(doc.medalManager.medalMap).length);
     print("过滤后数量: " + Object.keys(newMedalMap).length);
   }
-});
+});
+
+//清除英雄
+db.user.find({ _id: 10001092 }).forEach(function(doc) {
+  if (doc.heroManager && doc.heroManager.heroMap) {
+    var newMedalMap = {};
+    
+    // 遍历 medalMap,只保留 isLocked !== 0 的项
+    for (var key in doc.heroManager.heroMap) {
+      var item = doc.heroManager.heroMap[key];
+      if (item.level !== 1) {
+        newMedalMap[key] = item;
+      }
+    }
+    
+    // 更新文档
+    db.user.updateOne(
+      { _id: doc._id },
+      { $set: { "heroManager.heroMap": newMedalMap } }
+    );
+    
+    print("已处理文档: " + doc._id);
+    print("过滤前数量: " + Object.keys(doc.heroManager.heroMap).length);
+    print("过滤后数量: " + Object.keys(newMedalMap).length);
+  }
+});
+
+//删除指定key的文档
+db.cdk_info.deleteMany({ goodsId: 15 })

+ 4 - 1
操作命令/开服流程.txt

@@ -1,4 +1,7 @@
 1、在mongo数据库:x5_tk_login 中添加服务器信息,注意设置开服时间,当前时间到了开服时间,app中才会看到服务器
 2、在北京时间开服当天(重点),在机器上的/data/java目录执行:./openserver.sh x && cd gameserver1-x && ./run.sh start,x为服务器id
 
-docker exec -it <container_name_or_id> mongosh
+docker exec -it <container_name_or_id> mongosh
+
+ro开启新服打开支付
+http://43.156.13.116:8086/v1/pay/openServer?sid=1&name=1%E5%8C%BA&time=2025-11-20%2012:00:00&gameid=119&signkey=92ddb83717ed91bb555dc894c06c110e