Commit 543de2ec28d6fcc61c344654ac9162f98fcd4b78

Authored by 陆恒
1 parent 074f1074
Exists in ver2.3.6

提交

src/HttpServer/logic/logic.go
@@ -1195,7 +1195,6 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int) { @@ -1195,7 +1195,6 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int) {
1195 //不存在 1195 //不存在
1196 //属于新登录的玩家数据 1196 //属于新登录的玩家数据
1197 //需要判断是否存在mysql中 1197 //需要判断是否存在mysql中
1198 - logger.Info("GetUserInfo from mysql")  
1199 //return nil, err 1198 //return nil, err
1200 //从mysql读取 1199 //从mysql读取
1201 err,info,task,ach,isfind := mysql.GetFromBackUp(uniqueuuid) 1200 err,info,task,ach,isfind := mysql.GetFromBackUp(uniqueuuid)
@@ -1209,6 +1208,7 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int) { @@ -1209,6 +1208,7 @@ func HandlerLogin(w http.ResponseWriter, data string, uuid int) {
1209 } 1208 }
1210 1209
1211 if isfind { 1210 if isfind {
  1211 + logger.Info("GetUserInfo from mysql uid=%v",uniqueuuid)
1212 //先保存数据 1212 //先保存数据
1213 err = redishandler.GetRedisClient().HSet(redis.USER_DATA_KEY, uniqueuuid,info) 1213 err = redishandler.GetRedisClient().HSet(redis.USER_DATA_KEY, uniqueuuid,info)
1214 err = redishandler.GetRedisClient().HSet(redis.USER_TASKINFO_LIST, uniqueuuid,task) 1214 err = redishandler.GetRedisClient().HSet(redis.USER_TASKINFO_LIST, uniqueuuid,task)
src/mysql/dbmysql.go
@@ -48,7 +48,7 @@ func ExcuteCmd(cmd string) error { @@ -48,7 +48,7 @@ func ExcuteCmd(cmd string) error {
48 48
49 func GetFromBackUp(uniqueid string) (error,string,string,string,bool) { 49 func GetFromBackUp(uniqueid string) (error,string,string,string,bool) {
50 isfind := false 50 isfind := false
51 - cmd := "select info,task,achieve from hedaoshi where uid = " + uniqueid 51 + cmd := "select info,task,achieve from hedaoshi where uid = '" + uniqueid + "'"
52 rows, err := m_game_db.Query(cmd) 52 rows, err := m_game_db.Query(cmd)
53 if rows != nil { 53 if rows != nil {
54 defer rows.Close() 54 defer rows.Close()