diff --git a/src/HttpServer/logic/httpserver.go b/src/HttpServer/logic/httpserver.go index e3480ac..4a09e8e 100644 --- a/src/HttpServer/logic/httpserver.go +++ b/src/HttpServer/logic/httpserver.go @@ -273,7 +273,7 @@ func FetchInviteReward(w http.ResponseWriter, r *http.Request) { r.Body.Close() s := string(result) - logger.Info("FetchInviteReward , body:%v,uuid=%v", s) + logger.Info("FetchInviteReward , body:%v", s) HandleFetchInviteReward(w,s) diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 667fcf7..390165a 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -387,26 +387,29 @@ func HandleEnterInvite(w http.ResponseWriter, data string) { //邀请打工 invitelist,err := GetdagongList(rdata.Inviteuuid) if err != nil { - logger.Error("HandleEnterInvite GetdagongList failed") + /*logger.Error("HandleEnterInvite GetdagongList failed") resp.Result.Code = ERROR_SRVDB_FAILED //resp.Message = fmt.Sprintf("%s",err) - break + break*/ } - if len(*invitelist) > 2 { - logger.Error("HandleEnterInvite dagong num is full") - resp.Result.Code = ERROR_DAGONG_FULL - //resp.Message = "dagong full" - break + if invitelist != nil { + if len(*invitelist) > 2 { + logger.Error("HandleEnterInvite dagong num is full") + resp.Result.Code = ERROR_DAGONG_FULL + //resp.Message = "dagong full" + break + } + + //需要判断是否已经处于打工中 + if invitelist.IsInWork(rdata.Selfuuid) { + logger.Error("HandleEnterInvite IsInWork") + resp.Result.Code = ERROR_DAGONG_FULL + //resp.Message = "ERROR_ALREADY_INWORK" + break + } } - //需要判断是否已经处于打工中 - if invitelist.IsInWork(rdata.Selfuuid) { - logger.Error("HandleEnterInvite IsInWork") - resp.Result.Code = ERROR_DAGONG_FULL - //resp.Message = "ERROR_ALREADY_INWORK" - break - } err = AddDagongList(rdata.Selfuuid,rdata.Inviteuuid,*invitelist) -- libgit2 0.21.0