#!/bin/sh SQL_FILE=cp_role.sql GenCopyRoleSql() { echo "replace tbuser_$(($2%100)) (uid, realm, nick, gender, icon, exp, level, vipLevel, vipExp, chip, diamond, lastLoginTime, createTime, onlineTime, firebasePushId, freezeTime, lang, heroExpPool, roleCreateComplete, power, unionId, gameData, unimportanceData) SELECT $2 AS uid, realm, '$3' as nick, gender, icon, exp, level, vipLevel, vipExp, chip, diamond, lastLoginTime, createTime, onlineTime, firebasePushId, freezeTime, lang, heroExpPool, roleCreateComplete, power, unionId, gameData, unimportanceData FROM tbuser_$(($1%100)) WHERE uid = $1;" >> $SQL_FILE; } echo "use dbmgame;" > $SQL_FILE # 高级号 GenCopyRoleSql 100019 100120 u2game001 GenCopyRoleSql 100019 100042 u2game002 GenCopyRoleSql 100019 100143 u2game003 GenCopyRoleSql 100019 100044 u2game004 GenCopyRoleSql 100019 100045 u2game005 GenCopyRoleSql 100019 100046 u2game006 GenCopyRoleSql 100019 100047 u2game007 GenCopyRoleSql 100019 100048 u2game008 GenCopyRoleSql 100019 100049 u2game009 # 中级号 GenCopyRoleSql 100150 100151 u2game011 GenCopyRoleSql 100150 100173 u2game012 GenCopyRoleSql 100150 100074 u2game013 GenCopyRoleSql 100150 100075 u2game014 GenCopyRoleSql 100150 100176 u2game015 GenCopyRoleSql 100150 100077 u2game016 GenCopyRoleSql 100150 100078 u2game017 GenCopyRoleSql 100150 100079 u2game018 GenCopyRoleSql 100150 100080 u2game019