package ferroalloy import ( "mtp2_if/global/app" "mtp2_if/global/e" "mtp2_if/logger" "mtp2_if/models" "net/http" "github.com/gin-gonic/gin" ) // Signin // @Summary 用户签到 // @Produce json // @Security ApiKeyAuth // @Param jsonBody body models.THJSigninReq true "用户签到请求" // @Success 200 {object} app.Response // @Failure 500 {object} app.Response // @Router /Ferroalloy/Signin [post] // @Tags 铁合金 func Signin(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.THJSigninReq{} a.DoBindReq(&m) if err := m.Signin(); err == nil { a.Response(http.StatusOK, e.SUCCESS, "OK") } else { logger.GetLogger().Errorf("insert fail, %v", err) a.Response(http.StatusBadRequest, e.ERROR_OPERATION_FAILED, nil) } }