智慧食堂
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

68 rader
3.8 KiB

  1. package router
  2. import (
  3. "applet/app/customer/hdl"
  4. selfSupportForSchoolhdl "applet/app/customer/hdl/self_support_for_school"
  5. "applet/app/customer/mw"
  6. "github.com/gin-gonic/gin"
  7. )
  8. func CustomerInit(r *gin.RouterGroup) {
  9. rPay(r.Group("/pay"))
  10. rCentralKitchenForSchoolOrder(r.Group("/order/centralKitchenForSchool"))
  11. rSelfSupportForSchool(r.Group("/selfSupportForSchool"))
  12. r.POST("/login", hdl.Login)
  13. r.POST("/register", hdl.Register)
  14. r.POST("/aesDecrypt", hdl.AesDecrypt)
  15. r.POST("/systemOauthToken", hdl.SystemOauthToken)
  16. r.GET("/getSysCfg", hdl.GetSysCfg) //获取基础配置
  17. r.Use(mw.Auth) //检测登录状态
  18. r.GET("/userInfo", hdl.UserInfo) //用户信息
  19. r.Group("/enterprise")
  20. {
  21. r.GET("enterprise/info", hdl.EnterpriseInfo) // 单位信息
  22. r.GET("enterprise/schoolBelowGrade", hdl.SchoolBelowGrade) //"学校"下年级
  23. r.GET("enterprise/schoolGradeBelowClass", hdl.SchoolGradeBelowClass) //"学校"年级下班级
  24. r.POST("enterprise/list", hdl.EnterpriseList) //"校企列表
  25. r.POST("enterprise/centralKitchenForSchool/saveUserIdentity", hdl.SaveCentralKitchenForSchoolUserIdentity) //"央厨-学校"新增身份信息
  26. r.GET("enterprise/centralKitchenForSchool/package", hdl.CentralKitchenForSchoolPackage) //"央厨-学校"获取套餐
  27. r.GET("enterprise/centralKitchenForSchool/myReserve", hdl.CentralKitchenForSchoolMyReserve) //"央厨-学校"我的预定
  28. r.POST("enterprise/selfSupportForSchool/saveUserIdentity", hdl.SaveSelfSupportForSchoolUserIdentity) //"自营-学校"新增身份信息
  29. }
  30. r.Group("/notice")
  31. {
  32. r.GET("notice/list", hdl.NoticeList)
  33. }
  34. r.Group("/banner")
  35. {
  36. r.GET("banner/list", hdl.BannerList)
  37. }
  38. }
  39. func rPay(r *gin.RouterGroup) {
  40. r.Use(mw.Auth) //检测登录状态
  41. r.POST("/buyPackage", hdl.BuyPackage) // 购买套餐
  42. r.GET("/ordState", hdl.OrdState) // 查看订单支付状态
  43. }
  44. func rCentralKitchenForSchoolOrder(r *gin.RouterGroup) {
  45. r.Use(mw.Auth) //检测登录状态
  46. r.POST("/list", hdl.CentralKitchenForSchoolOrderList) // 央厨学校-订单列表
  47. r.GET("/belowWithDay", hdl.CentralKitchenForSchoolOrderBelowWithDay) // 央厨学校-订单下订餐日期数据
  48. r.GET("/detail", hdl.CentralKitchenForSchoolOrderDetail) // 央厨学校-订单详情
  49. r.POST("/refund", hdl.CentralKitchenForSchoolOrderRefund) // 央厨学校-订单退款申请
  50. r.POST("/refundList", hdl.CentralKitchenForSchoolOrderRefundList) // 央厨学校-订单退款列表
  51. }
  52. func rSelfSupportForSchool(r *gin.RouterGroup) { //自营学校
  53. r.Use(mw.Auth) //检测登录状态
  54. r.GET("/educateSceneTokenQuery", selfSupportForSchoolhdl.EducateSceneTokenQuery) // 自营学校-查询刷脸用户开通详细信息
  55. r.GET("/educateSceneTokenCreateForApplet", selfSupportForSchoolhdl.EducateSceneTokenCreateForApplet) // 自营学校-教育场景token生成处理器(作用于 跳转到一脸通行小程序采集人脸)
  56. r.GET("/educateSceneTokenCreateForConcentratedCollectApplet", selfSupportForSchoolhdl.EducateSceneTokenCreateForConcentratedCollectApplet) // 自营学校-教育场景token生成处理器(作用于 跳转到集采小程序)
  57. r.GET("/educateFacepayApply", selfSupportForSchoolhdl.EducateFacepayApply) // 自营学校-创建刷脸支付开通标识
  58. }