diff --git a/controller/v1/notify/Area.go b/controller/v1/notify/Area.go index c04c995..6161427 100644 --- a/controller/v1/notify/Area.go +++ b/controller/v1/notify/Area.go @@ -26,12 +26,14 @@ func PushArea(c echo.Context) error { // 参数验证 swagArea := new(SwagArea) if err := c.Bind(swagArea); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagArea) // 入库处理(已经有的更新,没有的创建数据) if findArea, findErr := area.FindAreaByRwID(swagArea.Data.RwID); findErr == nil { diff --git a/controller/v1/notify/Course.go b/controller/v1/notify/Course.go index 32cd382..6812d21 100644 --- a/controller/v1/notify/Course.go +++ b/controller/v1/notify/Course.go @@ -26,12 +26,14 @@ func PushCourse(c echo.Context) error { // 参数验证 swagCourse := new(SwagCourse) if err := c.Bind(swagCourse); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagCourse) // 入库处理(已经有的更新,没有的创建数据) if findCourse, findErr := course.FindCourseByRwID(swagCourse.Data.RwID); findErr == nil { @@ -44,6 +46,7 @@ func PushCourse(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateCourseError, "message": e.GetMsg(e.UpdateCourseError), @@ -60,6 +63,7 @@ func PushCourse(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateCourseError, "message": e.GetMsg(e.CreateCourseError), diff --git a/controller/v1/notify/Equipment.go b/controller/v1/notify/Equipment.go index 327cfd2..1ba8b20 100644 --- a/controller/v1/notify/Equipment.go +++ b/controller/v1/notify/Equipment.go @@ -32,6 +32,7 @@ func PushEquipment(c echo.Context) error { } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagEquipment) // 入库处理(已经有的更新,没有的创建数据) if findEquipment, findErr := equipment.FindEquipmentByRwID(swagEquipment.Data.RwID); findErr == nil { @@ -44,6 +45,7 @@ func PushEquipment(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateEquipmentError, "message": e.GetMsg(e.UpdateEquipmentError), @@ -60,6 +62,7 @@ func PushEquipment(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateEquipmentError, "message": e.GetMsg(e.CreateEquipmentError), diff --git a/controller/v1/notify/League.go b/controller/v1/notify/League.go index 4c1435b..8fdc2c1 100644 --- a/controller/v1/notify/League.go +++ b/controller/v1/notify/League.go @@ -32,6 +32,7 @@ func PushLeague(c echo.Context) error { } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagLeague) // 入库处理(已经有的更新,没有的创建数据) if findLeague, findErr := league.FindLeagueByRwID(swagLeague.Data.RwID); findErr == nil { @@ -44,6 +45,7 @@ func PushLeague(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateLeagueError, "message": e.GetMsg(e.UpdateLeagueError), @@ -60,6 +62,7 @@ func PushLeague(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateLeagueError, "message": e.GetMsg(e.CreateLeagueError), diff --git a/controller/v1/notify/Notify.go b/controller/v1/notify/Notify.go index f58c1f1..339acd0 100644 --- a/controller/v1/notify/Notify.go +++ b/controller/v1/notify/Notify.go @@ -42,12 +42,14 @@ func PushNotify(c echo.Context) error { // 参数验证 swagNotify := new(SwagNotify) if err := c.Bind(swagNotify); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagNotify) message := map[string]interface{}{ "code": e.SUCCESS, diff --git a/controller/v1/notify/Role.go b/controller/v1/notify/Role.go index a11c5fb..4cbcd03 100644 --- a/controller/v1/notify/Role.go +++ b/controller/v1/notify/Role.go @@ -26,12 +26,14 @@ func PushRole(c echo.Context) error { // 参数验证 swagRole := new(SwagRole) if err := c.Bind(swagRole); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagRole) // 入库处理(已经有的更新,没有的创建数据) if findRole, findErr := role.FindRoleByRwID(swagRole.Data.RwID); findErr == nil { @@ -44,6 +46,7 @@ func PushRole(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateRoleError, "message": e.GetMsg(e.UpdateRoleError), @@ -60,6 +63,7 @@ func PushRole(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateRoleError, "message": e.GetMsg(e.CreateRoleError), diff --git a/controller/v1/notify/Series.go b/controller/v1/notify/Series.go index 7a95299..627fedf 100644 --- a/controller/v1/notify/Series.go +++ b/controller/v1/notify/Series.go @@ -26,12 +26,14 @@ func PushSeries(c echo.Context) error { // 参数验证 swagSeries := new(SwagSeries) if err := c.Bind(swagSeries); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagSeries) // 入库处理(已经有的更新,没有的创建数据) if findSeries, findErr := series.FindSeriesByRwID(swagSeries.Data.RwID); findErr == nil { @@ -44,6 +46,7 @@ func PushSeries(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateSeriesError, "message": e.GetMsg(e.UpdateSeriesError), @@ -60,6 +63,7 @@ func PushSeries(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateSeriesError, "message": e.GetMsg(e.CreateSeriesError), diff --git a/controller/v1/notify/Skill.go b/controller/v1/notify/Skill.go index 66869ac..d1604f5 100644 --- a/controller/v1/notify/Skill.go +++ b/controller/v1/notify/Skill.go @@ -32,6 +32,7 @@ func PushSkill(c echo.Context) error { } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagSkill) // 入库处理(已经有的更新,没有的创建数据) if findSkill, findErr := skill.FindSkillByRwID(swagSkill.Data.RwID); findErr == nil { @@ -44,6 +45,7 @@ func PushSkill(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateSkillError, "message": e.GetMsg(e.UpdateSkillError), @@ -60,6 +62,7 @@ func PushSkill(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateSkillError, "message": e.GetMsg(e.CreateSkillError), diff --git a/controller/v1/notify/Team.go b/controller/v1/notify/Team.go index 85e055e..a77c691 100644 --- a/controller/v1/notify/Team.go +++ b/controller/v1/notify/Team.go @@ -32,6 +32,7 @@ func PushTeam(c echo.Context) error { } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagTeam) // 入库处理(已经有的更新,没有的创建数据) if findTeam, findErr := team.FindTeamByRwID(swagTeam.Data.RwID); findErr == nil { @@ -44,6 +45,7 @@ func PushTeam(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateTeamError, "message": e.GetMsg(e.UpdateTeamError), @@ -60,6 +62,7 @@ func PushTeam(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateTeamError, "message": e.GetMsg(e.CreateTeamError), diff --git a/controller/v1/notify/aov/Event.go b/controller/v1/notify/aov/Event.go index f95b0a8..d492b13 100644 --- a/controller/v1/notify/aov/Event.go +++ b/controller/v1/notify/aov/Event.go @@ -26,12 +26,14 @@ func PushEvent(c echo.Context) error { // 参数验证 swagEvent := new(SwagEvent) if err := c.Bind(swagEvent); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagEvent) // 入库处理(已经有端更新,没有的创建数据) if findEvent, findErr := event.FindEventByRwID(swagEvent.Data.RwID); findErr == nil { @@ -44,6 +46,7 @@ func PushEvent(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateEventError, "message": e.GetMsg(e.UpdateEventError), @@ -60,6 +63,7 @@ func PushEvent(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateEventError, "message": e.GetMsg(e.CreateEventError), diff --git a/controller/v1/notify/aov/Match.go b/controller/v1/notify/aov/Match.go index 2e8353d..c4c2120 100644 --- a/controller/v1/notify/aov/Match.go +++ b/controller/v1/notify/aov/Match.go @@ -27,15 +27,18 @@ func PushMatch(c echo.Context) error { // 参数验证 swagMatch := new(SwagMatch) if err := c.Bind(swagMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagMatch) var pushMatch match.Match if err := json.Unmarshal([]byte(swagMatch.Data), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -54,6 +57,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -70,6 +74,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/controller/v1/notify/aov/Result.go b/controller/v1/notify/aov/Result.go index b0dd2fd..014a162 100644 --- a/controller/v1/notify/aov/Result.go +++ b/controller/v1/notify/aov/Result.go @@ -32,17 +32,20 @@ type Result struct { // @Router /notify/aov/result [POST] func PushResult(c echo.Context) error { // 参数验证 - SwagResult := new(SwagResult) - if err := c.Bind(SwagResult); err != nil { + swagResult := new(SwagResult) + if err := c.Bind(swagResult); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagResult) var pushMatch match.Match - if err := json.Unmarshal([]byte(SwagResult.Data.MatchJson), &pushMatch); err != nil { + if err := json.Unmarshal([]byte(swagResult.Data.MatchJson), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -61,6 +64,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -77,6 +81,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/controller/v1/notify/csgo/Event.go b/controller/v1/notify/csgo/Event.go index 3f3200a..cff3823 100644 --- a/controller/v1/notify/csgo/Event.go +++ b/controller/v1/notify/csgo/Event.go @@ -26,12 +26,14 @@ func PushEvent(c echo.Context) error { // 参数验证 swagEvent := new(SwagEvent) if err := c.Bind(swagEvent); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagEvent) // 入库处理(已经有端更新,没有的创建数据) if findEvent, findErr := event.FindEventByRwID(swagEvent.Data.RwID); findErr == nil { @@ -44,6 +46,7 @@ func PushEvent(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateEventError, "message": e.GetMsg(e.UpdateEventError), @@ -60,6 +63,7 @@ func PushEvent(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateEventError, "message": e.GetMsg(e.CreateEventError), diff --git a/controller/v1/notify/csgo/Match.go b/controller/v1/notify/csgo/Match.go index 075a5b5..5824ff4 100644 --- a/controller/v1/notify/csgo/Match.go +++ b/controller/v1/notify/csgo/Match.go @@ -27,15 +27,18 @@ func PushMatch(c echo.Context) error { // 参数验证 swagMatch := new(SwagMatch) if err := c.Bind(swagMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagMatch) var pushMatch match.Match if err := json.Unmarshal([]byte(swagMatch.Data), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -54,6 +57,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -70,6 +74,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/controller/v1/notify/csgo/Result.go b/controller/v1/notify/csgo/Result.go index a84a6a7..129874e 100644 --- a/controller/v1/notify/csgo/Result.go +++ b/controller/v1/notify/csgo/Result.go @@ -34,15 +34,18 @@ func PushResult(c echo.Context) error { // 参数验证 swagResult := new(SwagResult) if err := c.Bind(swagResult); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagResult) var pushMatch match.Match if err := json.Unmarshal([]byte(swagResult.Data.MatchJson), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -61,6 +64,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -77,6 +81,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/controller/v1/notify/dota2/Match.go b/controller/v1/notify/dota2/Match.go index a236ce8..a1ef481 100644 --- a/controller/v1/notify/dota2/Match.go +++ b/controller/v1/notify/dota2/Match.go @@ -27,15 +27,18 @@ func PushMatch(c echo.Context) error { // 参数验证 swagMatch := new(SwagMatch) if err := c.Bind(swagMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagMatch) var pushMatch match.Match if err := json.Unmarshal([]byte(swagMatch.Data), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -54,6 +57,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -70,6 +74,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/controller/v1/notify/dota2/Result.go b/controller/v1/notify/dota2/Result.go index ba2fcc0..968ee2d 100644 --- a/controller/v1/notify/dota2/Result.go +++ b/controller/v1/notify/dota2/Result.go @@ -34,15 +34,18 @@ func PushResult(c echo.Context) error { // 参数验证 swagResult := new(SwagResult) if err := c.Bind(swagResult); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagResult) var pushMatch match.Match if err := json.Unmarshal([]byte(swagResult.Data.MatchJson), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -61,6 +64,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -77,6 +81,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/controller/v1/notify/lol/Event.go b/controller/v1/notify/lol/Event.go index 371a496..322951d 100644 --- a/controller/v1/notify/lol/Event.go +++ b/controller/v1/notify/lol/Event.go @@ -26,12 +26,14 @@ func PushEvent(c echo.Context) error { // 参数验证 swagEvent := new(SwagEvent) if err := c.Bind(swagEvent); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagEvent) // 入库处理(已经有的更新,没有的创建数据) if findEvent, findErr := event.FindEventByRwID(swagEvent.Data.RwID); findErr == nil { @@ -44,6 +46,7 @@ func PushEvent(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateEventError, "message": e.GetMsg(e.UpdateEventError), @@ -60,6 +63,7 @@ func PushEvent(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateEventError, "message": e.GetMsg(e.CreateEventError), diff --git a/controller/v1/notify/lol/Match.go b/controller/v1/notify/lol/Match.go index b402472..6e1534c 100644 --- a/controller/v1/notify/lol/Match.go +++ b/controller/v1/notify/lol/Match.go @@ -27,14 +27,18 @@ func PushMatch(c echo.Context) error { // 参数验证 swagMatch := new(SwagMatch) if err := c.Bind(swagMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagMatch) + var pushMatch match.Match if err := json.Unmarshal([]byte(swagMatch.Data), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -53,6 +57,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -69,6 +74,7 @@ func PushMatch(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/controller/v1/notify/lol/Result.go b/controller/v1/notify/lol/Result.go index 5fe259e..6b5698e 100644 --- a/controller/v1/notify/lol/Result.go +++ b/controller/v1/notify/lol/Result.go @@ -34,14 +34,18 @@ func PushResult(c echo.Context) error { // 参数验证 swagResult := new(SwagResult) if err := c.Bind(swagResult); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), } return c.JSON(http.StatusBadRequest, errMessage) } + c.Logger().Info(swagResult) + var pushMatch match.Match if err := json.Unmarshal([]byte(swagResult.Data.MatchJson), &pushMatch); err != nil { + c.Logger().Error(err) errMessage := map[string]interface{}{ "code": e.InvalidParams, "message": e.GetMsg(e.InvalidParams), @@ -60,6 +64,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(updateErr) errMessage := map[string]interface{}{ "code": e.UpdateMatchError, "message": e.GetMsg(e.UpdateMatchError), @@ -76,6 +81,7 @@ func PushResult(c echo.Context) error { } return c.JSON(http.StatusOK, message) } else { + c.Logger().Error(createErr) errMessage := map[string]interface{}{ "code": e.CreateMatchError, "message": e.GetMsg(e.CreateMatchError), diff --git a/shell_scripts/deploy_to_staging.sh b/shell_scripts/deploy_to_staging.sh new file mode 100644 index 0000000..34ea464 --- /dev/null +++ b/shell_scripts/deploy_to_staging.sh @@ -0,0 +1,2 @@ +CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . && +scp -r main deployer@118.31.23.131:/home/deployer/esports/sheep \ No newline at end of file