diff --git a/go.mod b/go.mod index 9327dda..c383206 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/biezhi/gorm-paginator/pagination v0.0.0-20190124091837-7a5c8ed20334 github.com/champly/lib4go v0.0.0-20191227062742-08d5a3ca4e1d github.com/davecgh/go-spew v1.1.1 + github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/go-playground/universal-translator v0.17.0 // indirect github.com/go-sql-driver/mysql v1.5.0 // indirect github.com/jinzhu/configor v1.1.1 diff --git a/go.sum b/go.sum index e7a2ce9..551b784 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20190925224908-4e9cffae051a/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= diff --git a/main.go b/main.go index 61d11c1..1f68733 100644 --- a/main.go +++ b/main.go @@ -74,6 +74,8 @@ func main() { e.Debug = false e.Validator = &CustomValidator{validator: validator.New()} + //e.Use(middleware.Logger()) + //e.Use(SimulateDelay) shimoC := shimo_openapi.NewClient(config.Shimoauth.ClientId, config.Shimoauth.ClientSecret, config.Shimoauth.Username, config.Shimoauth.Password, config.Shimoauth.Scope) @@ -96,7 +98,7 @@ func main() { // 返回心理咨询机构列表 api.GET("/platforms/psychological", func(c echo.Context) error { fileId := "Dpy6Q668cj3Xx8Rq" - opt := shimo_openapi.Opts{"工作表1", 17, "O", "\n", time.Minute * 5} + opt := shimo_openapi.Opts{"上线版本", 19, "M", "\n", time.Minute * 30} message, err := shimoC.GetFileWithOpts(fileId, opt) if err != nil { Log.Printf("failed to get document: %v", err) @@ -108,7 +110,7 @@ func main() { // 返回线上医疗平台列表 api.GET("/platforms/medical", func(c echo.Context) error { fileId := "kDQJ6vWgWWwq8r8H" - opt := shimo_openapi.Opts{"工作表1", 23, "O", " (", time.Minute * 5} + opt := shimo_openapi.Opts{"上线版本", 30, "D", " (", time.Minute * 30} message, err := shimoC.GetFileWithOpts(fileId, opt) if err != nil { Log.Printf("failed to get document: %v", err) @@ -120,7 +122,7 @@ func main() { // 返回医院需求列表 api.GET("/hospital/supplies", func(c echo.Context) error { fileId := "zN32MwmPjmCLF0Av" - opt := shimo_openapi.Opts{"已合成", 160, "AP", " ", time.Minute * 5} + opt := shimo_openapi.Opts{"已合成", 160, "AP", " ", time.Minute * 3} message, err := shimoC.GetFileWithOpts(fileId, opt) if err != nil { Log.Printf("failed to get document: %v", err)