diff --git a/app/admin/hdl/hdl_demo.go b/app/admin/hdl/hdl_demo.go index b99fb66..a7a9e86 100644 --- a/app/admin/hdl/hdl_demo.go +++ b/app/admin/hdl/hdl_demo.go @@ -3,7 +3,9 @@ package hdl import ( "applet/app/db" "applet/app/e" + "fmt" "github.com/gin-gonic/gin" + "time" ) // Demo 测试 @@ -16,4 +18,13 @@ func Demo(c *gin.Context) { return } e.OutSuc(c, data, nil) + go GoOnExecuting() + return +} + +func GoOnExecuting() { + for i := 0; i < 20; i++ { + time.Sleep(1 * time.Second) + fmt.Println(i) + } } diff --git a/app/admin/md/md_enterprise_manage.go b/app/admin/md/md_enterprise_manage.go index de99a9a..e4be28e 100644 --- a/app/admin/md/md_enterprise_manage.go +++ b/app/admin/md/md_enterprise_manage.go @@ -226,6 +226,7 @@ type CentralKitchenForSchoolReserveListReq struct { } type CentralKitchenForSchoolReserveListResp struct { + Id int `json:"id" ` EnterpriseId int `json:"enterprise_id" ` EnterpriseName string `json:"enterprise_name" ` Uid int `json:"uid" ` diff --git a/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go b/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go index f0ffa3e..f16b930 100644 --- a/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go +++ b/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go @@ -561,6 +561,7 @@ func CentralKitchenForSchoolReserveList(req md.CentralKitchenForSchoolReserveLis for _, v := range m { resp = append(resp, md.CentralKitchenForSchoolReserveListResp{ + Id: v.CentralKitchenForSchoolPackageOrdForReserve.Id, EnterpriseId: v.UserIdentity.EnterpriseId, EnterpriseName: v.Enterprise.Name, Uid: v.UserIdentity.Uid, diff --git a/app/customer/mw/mw_customer_auth.go b/app/customer/mw/mw_customer_auth.go index 75f54e0..26d8727 100644 --- a/app/customer/mw/mw_customer_auth.go +++ b/app/customer/mw/mw_customer_auth.go @@ -3,12 +3,15 @@ package mw import ( "applet/app/customer/svc" "applet/app/e" + "fmt" "github.com/gin-gonic/gin" ) // 检查权限, 签名等等 func Auth(c *gin.Context) { user, err := svc.CheckUser(c) + fmt.Println("user>>>>>>>>>", user) + fmt.Println("err>>>>>>>>>", err) if err != nil { switch err.(type) { case e.E: diff --git a/app/router/admin_router.go b/app/router/admin_router.go index 79ed134..0ea24e3 100644 --- a/app/router/admin_router.go +++ b/app/router/admin_router.go @@ -186,11 +186,11 @@ func rRole(r *gin.RouterGroup) { } func AdminRoute(r *gin.RouterGroup) { + r.GET("/demo", hdl2.Demo) r.POST("/login", hdl2.Login) - r.Use(mw.Auth) //检测登录状态 - r.GET("/demo", hdl2.Demo) + r.Use(mw.Auth) //检测登录状态 r.GET("/userInfo", hdl2.UserInfo) //用户信息 r.Any("/changePwd", hdl2.Demo) //修改密码 r.GET("/sysCfg", hdl2.GetSysCfg) //基础配置-获取