智慧食堂
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

136 行
8.1 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/hdl/test"
  6. "applet/app/customer/mw"
  7. "github.com/gin-gonic/gin"
  8. )
  9. func CustomerInit(r *gin.RouterGroup) {
  10. rPay(r.Group("/pay"))
  11. rCentralKitchenForSchoolOrder(r.Group("/order/centralKitchenForSchool"))
  12. rNursingHomeOrder(r.Group("/order/nursingHome"))
  13. rSelfSupportForSchoolOrder(r.Group("/order/selfSupportForSchool"))
  14. rFactoryOrder(r.Group("/order/factory"))
  15. rSelfSupportForSchool(r.Group("/selfSupportForSchool"))
  16. rUserIdentity(r.Group("/userIdentity"))
  17. rTest(r.Group("/test"))
  18. r.GET("/sanHu", hdl.SanHu)
  19. r.POST("/test", hdl.Demo)
  20. r.POST("/downloadCertificates", hdl.DownloadCertificates) //下载微信支付平台证书
  21. r.POST("/curlAlipayPlanetEcocampusApiRosterSignUpInfoTest", hdl.CurlAlipayPlanetEcocampusApiRosterSignUpInfo)
  22. r.POST("/alipayJsApiCallBack", hdl.AlipayJsApiCallBack)
  23. r.POST("/wxJsApiCallBack", hdl.WxJsApiCallBack)
  24. r.POST("/wxRefundApiCallBack", hdl.WxRefundApiCallBack)
  25. r.POST("/login", hdl.Login)
  26. r.GET("/wxAppletLogin", hdl.WxAppletLogin)
  27. r.GET("/wxGetAccessToken", hdl.WxGetAccessToken)
  28. r.POST("/wxDecryptUserInfo", hdl.WxDecryptUserInfo)
  29. r.POST("/wxDecryptMobile", hdl.WxDecryptMobile)
  30. r.POST("/wxPay", hdl.WxPay)
  31. r.POST("/register", hdl.Register)
  32. r.POST("/aesDecrypt", hdl.AesDecrypt) //TODO::专门给解密支付宝手机号
  33. r.POST("/systemOauthToken", hdl.SystemOauthToken)
  34. r.GET("/getSysCfg", hdl.GetSysCfg) //获取基础配置
  35. r.Use(mw.Auth) //检测登录状态
  36. r.GET("/userInfo", hdl.UserInfo) //用户信息
  37. r.POST("/updateUserInfo", hdl.UpdateUser) //修改用户信息
  38. r.Group("/enterprise")
  39. {
  40. r.GET("enterprise/info", hdl.EnterpriseInfo) // 单位信息
  41. r.GET("enterprise/schoolBelowGrade", hdl.SchoolBelowGrade) //"学校"下年级
  42. r.GET("enterprise/schoolGradeBelowClass", hdl.SchoolGradeBelowClass) //"学校"年级下班级
  43. r.POST("enterprise/list", hdl.EnterpriseList) //"校企列表
  44. r.POST("enterprise/centralKitchenForSchool/saveUserIdentity", hdl.SaveCentralKitchenForSchoolUserIdentity) //"央厨-学校"新增身份信息
  45. r.GET("enterprise/centralKitchenForSchool/package", hdl.CentralKitchenForSchoolPackage) //"央厨-学校"获取套餐
  46. r.GET("enterprise/centralKitchenForSchool/myReserve", hdl.CentralKitchenForSchoolMyReserve) //"央厨-学校"我的预定
  47. r.POST("enterprise/selfSupportForSchool/saveUserIdentity", hdl.SaveSelfSupportForSchoolUserIdentity) //"自营-学校"新增身份信息
  48. r.POST("enterprise/factory/saveUserIdentity", hdl.SaveFactoryUserIdentity) //"工厂"新增身份信息
  49. r.POST("enterprise/nursingHome/saveUserIdentity", hdl.SaveNursingHomeUserIdentity) //"养老院"新增身份信息
  50. r.GET("enterprise/nursingHome/package", hdl.NursingHomePackage) //"养老院"获取套餐
  51. r.GET("enterprise/nursingHome/myReserve", hdl.NursingHomeMyReserve) //"养老院"我的预定
  52. }
  53. r.Group("/notice")
  54. {
  55. r.GET("notice/list", hdl.NoticeList)
  56. }
  57. r.Group("/banner")
  58. {
  59. r.GET("banner/list", hdl.BannerList)
  60. }
  61. }
  62. func rTest(r *gin.RouterGroup) {
  63. r.GET("/wxRefunds", test.WxRefundsTest) // 测试-微信退款
  64. }
  65. func rPay(r *gin.RouterGroup) {
  66. r.Use(mw.Auth) //检测登录状态
  67. r.POST("/buyPackage", hdl.BuyPackage) // 购买套餐
  68. r.POST("/buyPackageForWx", hdl.BuyPackageForWx) // 购买套餐(微信)
  69. r.GET("/rePayBuyPackageForWx", hdl.RePayBuyPackageForWx) // 重新支付购买套餐(微信)
  70. r.GET("/ordState", hdl.OrdState) // 查看订单支付状态
  71. r.POST("/nursingHomeBuyPackage", hdl.NursingHomeBuyPackage) // 购买套餐
  72. r.GET("/nursingHomeOrdState", hdl.NursingHomeOrdState) // 查看订单支付状态
  73. }
  74. func rCentralKitchenForSchoolOrder(r *gin.RouterGroup) {
  75. r.Use(mw.Auth) // 检测登录状态
  76. r.POST("/list", hdl.CentralKitchenForSchoolOrderList) // 央厨学校-订单列表
  77. r.GET("/belowWithDay", hdl.CentralKitchenForSchoolOrderBelowWithDay) // 央厨学校-订单下订餐日期数据
  78. r.GET("/detail", hdl.CentralKitchenForSchoolOrderDetail) // 央厨学校-订单详情
  79. r.POST("/refund", hdl.CentralKitchenForSchoolOrderRefund) // 央厨学校-订单退款申请
  80. r.POST("/refundList", hdl.CentralKitchenForSchoolOrderRefundList) // 央厨学校-订单退款列表
  81. }
  82. func rNursingHomeOrder(r *gin.RouterGroup) {
  83. r.Use(mw.Auth) //检测登录状态
  84. r.POST("/list", hdl.NursingHomeOrderList) // 养老院-订单列表
  85. r.GET("/belowWithDay", hdl.NursingHomeOrderBelowWithDay) // 养老院-订单下订餐日期数据
  86. r.GET("/detail", hdl.NursingHomeOrderDetail) // 养老院-订单详情
  87. r.POST("/refund", hdl.NursingHomeOrderRefund) // 养老院-订单退款申请
  88. r.POST("/refundList", hdl.NursingHomeOrderRefundList) // 养老院-订单退款列表
  89. }
  90. func rSelfSupportForSchoolOrder(r *gin.RouterGroup) {
  91. r.Use(mw.Auth) //检测登录状态
  92. r.POST("/list", hdl.SelfSupportForSchoolOrderList) // 自营学校-订单列表
  93. r.POST("/arrearsList", hdl.SelfSupportForSchoolOrderArrearsList) // 自营学校-欠费订单列表
  94. r.POST("/debtRepay", hdl.SelfSupportForSchoolOrderDebtRepay) // 自营学校-支付欠款订单
  95. }
  96. func rFactoryOrder(r *gin.RouterGroup) {
  97. r.Use(mw.Auth) //检测登录状态
  98. r.POST("/list", hdl.FactoryOrderList) // 自营学校-订单列表
  99. }
  100. func rSelfSupportForSchool(r *gin.RouterGroup) { //自营学校
  101. r.Use(mw.Auth) //检测登录状态
  102. r.GET("/educateSceneTokenQuery", selfSupportForSchoolhdl.EducateSceneTokenQuery) // 自营学校-查询刷脸用户开通详细信息
  103. r.GET("/educateSceneTokenCreateForApplet", selfSupportForSchoolhdl.EducateSceneTokenCreateForApplet) // 自营学校-教育场景token生成处理器(作用于 跳转到一脸通行小程序采集人脸)
  104. r.GET("/educateSceneTokenCreateForConcentratedCollectApplet", selfSupportForSchoolhdl.EducateSceneTokenCreateForConcentratedCollectApplet) // 自营学校-教育场景token生成处理器(作用于 跳转到集采小程序)
  105. r.GET("/educateFacepayApply", selfSupportForSchoolhdl.EducateFacepayApply) // 自营学校-创建刷脸支付开通标识
  106. r.GET("/concentrateFacePassStudentList", selfSupportForSchoolhdl.ConcentrateFacePassStudentList) // 自营学校-集采学生列表
  107. r.GET("/concentrateFacePassStudentConfirm", selfSupportForSchoolhdl.ConcentrateFacePassStudentConfirm) // 自营学校-集采学生确认
  108. }
  109. func rUserIdentity(r *gin.RouterGroup) { //用户身份
  110. r.Use(mw.Auth) //检测登录状态
  111. r.DELETE("/deleteUserIdentity/:id", hdl.DeleteUserIdentity) // 删除身份信息
  112. r.POST("/updateCentralKitchenForSchoolUserIdentity", hdl.UpdateCentralKitchenForSchoolUserIdentity) // 修改"央厨-学校"学生身份信息
  113. r.POST("/updateSelfSupportForSchoolUserIdentity", hdl.UpdateSelfSupportForSchoolUserIdentity) // 修改"自营-学校"学生身份信息
  114. r.POST("/updateFactoryUserIdentity", hdl.UpdateFactoryUserIdentity) // 修改"工厂"身份信息
  115. r.POST("/updateNursingHomeUserIdentity", hdl.UpdateNursingHomeUserIdentity) // 修改"养老院"身份信息
  116. }