package router import ( "applet/app/customer/hdl" selfSupportForSchoolhdl "applet/app/customer/hdl/self_support_for_school" "applet/app/customer/hdl/test" "applet/app/customer/mw" "github.com/gin-gonic/gin" ) func CustomerInit(r *gin.RouterGroup) { rPay(r.Group("/pay")) rCentralKitchenForSchoolOrder(r.Group("/order/centralKitchenForSchool")) rNursingHomeOrder(r.Group("/order/nursingHome")) rSelfSupportForSchoolOrder(r.Group("/order/selfSupportForSchool")) rSelfSupportForSchool(r.Group("/selfSupportForSchool")) rUserIdentity(r.Group("/userIdentity")) rApiSuggestedFeedback(r.Group("/suggestedFeedback")) rApiFoodMenu(r.Group("/foodMenu")) rTest(r.Group("/test")) r.GET("/sanHu", hdl.SanHu) r.POST("/test", hdl.Demo) r.POST("/downloadCertificates", hdl.DownloadCertificates) //下载微信支付平台证书 r.POST("/curlAlipayPlanetEcocampusApiRosterSignUpInfoTest", hdl.CurlAlipayPlanetEcocampusApiRosterSignUpInfo) r.POST("/alipayJsApiCallBack", hdl.AlipayJsApiCallBack) r.POST("/wxJsApiCallBack", hdl.WxJsApiCallBack) r.POST("/wxRefundApiCallBack", hdl.WxRefundApiCallBack) r.POST("/login", hdl.Login) r.GET("/wxAppletLogin", hdl.WxAppletLogin) r.GET("/wxGetAccessToken", hdl.WxGetAccessToken) r.POST("/wxDecryptUserInfo", hdl.WxDecryptUserInfo) r.POST("/wxDecryptMobile", hdl.WxDecryptMobile) r.POST("/wxPay", hdl.WxPay) r.POST("/register", hdl.Register) r.POST("/aesDecrypt", hdl.AesDecrypt) //TODO::专门给解密支付宝手机号 r.POST("/systemOauthToken", hdl.SystemOauthToken) r.GET("/getSysCfg", hdl.GetSysCfg) //获取基础配置 r.Use(mw.Auth) //检测登录状态 r.GET("/userInfo", hdl.UserInfo) //用户信息 r.POST("/updateUserInfo", hdl.UpdateUser) //修改用户信息 r.Group("/enterprise") { r.GET("enterprise/info", hdl.EnterpriseInfo) // 单位信息 r.GET("enterprise/schoolBelowGrade", hdl.SchoolBelowGrade) //"学校"下年级 r.GET("enterprise/schoolGradeBelowClass", hdl.SchoolGradeBelowClass) //"学校"年级下班级 r.POST("enterprise/list", hdl.EnterpriseList) //"校企列表 r.POST("enterprise/centralKitchenForSchool/saveUserIdentity", hdl.SaveCentralKitchenForSchoolUserIdentity) //"央厨-学校"新增身份信息 r.GET("enterprise/centralKitchenForSchool/package", hdl.CentralKitchenForSchoolPackage) //"央厨-学校"获取套餐 r.GET("enterprise/centralKitchenForSchool/myReserve", hdl.CentralKitchenForSchoolMyReserve) //"央厨-学校"我的预定 r.GET("enterprise/centralKitchenForSchool/myReserveList", hdl.CentralKitchenForSchoolMyReserveList) //"央厨-学校"我的预定列表 r.POST("enterprise/selfSupportForSchool/saveUserIdentity", hdl.SaveSelfSupportForSchoolUserIdentity) //"自营-学校"新增身份信息 r.POST("enterprise/nursingHome/saveUserIdentity", hdl.SaveNursingHomeUserIdentity) //"养老院"新增身份信息 r.GET("enterprise/nursingHome/package", hdl.NursingHomePackage) //"养老院"获取套餐 r.GET("enterprise/nursingHome/myReserve", hdl.NursingHomeMyReserve) //"养老院"我的预定 } r.Group("/notice") { r.GET("notice/list", hdl.NoticeList) r.GET("notice/popCentralKitchen", hdl.PopCentralKitchen) } r.Group("/banner") { r.GET("banner/list", hdl.BannerList) } } func rTest(r *gin.RouterGroup) { r.GET("/wxRefunds_new", test.WxRefundsTest) // 测试-微信退款 } func rPay(r *gin.RouterGroup) { r.Use(mw.Auth) //检测登录状态 r.POST("/buyPackage", hdl.BuyPackage) // 购买套餐 r.POST("/buyPackageForWx", hdl.BuyPackageForWx) // 购买套餐(微信) r.GET("/rePayBuyPackageForWx", hdl.RePayBuyPackageForWx) // 重新支付购买套餐(微信) r.GET("/ordState", hdl.OrdState) // 查看订单支付状态 r.POST("/nursingHomeBuyPackage", hdl.NursingHomeBuyPackage) // 购买套餐 r.GET("/nursingHomeOrdState", hdl.NursingHomeOrdState) // 查看订单支付状态 } func rCentralKitchenForSchoolOrder(r *gin.RouterGroup) { r.Use(mw.Auth) // 检测登录状态 r.POST("/list", hdl.CentralKitchenForSchoolOrderList) // 央厨学校-订单列表 r.GET("/belowWithDay", hdl.CentralKitchenForSchoolOrderBelowWithDay) // 央厨学校-订单下订餐日期数据 r.GET("/detail", hdl.CentralKitchenForSchoolOrderDetail) // 央厨学校-订单详情 r.POST("/refund", hdl.CentralKitchenForSchoolOrderRefund) // 央厨学校-订单退款申请 r.POST("/refundList", hdl.CentralKitchenForSchoolOrderRefundList) // 央厨学校-订单退款列表 } func rNursingHomeOrder(r *gin.RouterGroup) { r.Use(mw.Auth) //检测登录状态 r.POST("/list", hdl.NursingHomeOrderList) // 养老院-订单列表 r.GET("/belowWithDay", hdl.NursingHomeOrderBelowWithDay) // 养老院-订单下订餐日期数据 r.GET("/detail", hdl.NursingHomeOrderDetail) // 养老院-订单详情 r.POST("/refund", hdl.NursingHomeOrderRefund) // 养老院-订单退款申请 r.POST("/refundList", hdl.NursingHomeOrderRefundList) // 养老院-订单退款列表 } func rSelfSupportForSchoolOrder(r *gin.RouterGroup) { r.Use(mw.Auth) //检测登录状态 r.POST("/list", hdl.SelfSupportForSchoolOrderList) // 自营学校-订单列表 r.POST("/arrearsList", hdl.SelfSupportForSchoolOrderArrearsList) // 自营学校-欠费订单列表 r.POST("/debtRepay", hdl.SelfSupportForSchoolOrderDebtRepay) // 自营学校-支付欠款订单 r.POST("/alipayPlanetEcocampusApiFtokenQuery", hdl.AlipayPlanetEcocampusApiFtokenQuery) // 自营学校-刷脸照片查看获取ftoken } func rSelfSupportForSchool(r *gin.RouterGroup) { //自营学校 r.Use(mw.Auth) //检测登录状态 r.GET("/educateSceneTokenQuery", selfSupportForSchoolhdl.EducateSceneTokenQuery) // 自营学校-查询刷脸用户开通详细信息 r.GET("/educateSceneTokenCreateForApplet", selfSupportForSchoolhdl.EducateSceneTokenCreateForApplet) // 自营学校-教育场景token生成处理器(作用于 跳转到一脸通行小程序采集人脸) r.GET("/educateSceneTokenCreateForConcentratedCollectApplet", selfSupportForSchoolhdl.EducateSceneTokenCreateForConcentratedCollectApplet) // 自营学校-教育场景token生成处理器(作用于 跳转到集采小程序) r.GET("/educateSceneTokenCreateForSchoolFacePassQuery", selfSupportForSchoolhdl.EducateSceneTokenCreateForSchoolFacePassQuery) // 自营学校-教育场景token生成处理器(作用于 查看刷脸照片) r.GET("/educateFacepayApply", selfSupportForSchoolhdl.EducateFacepayApply) // 自营学校-创建刷脸支付开通标识 r.GET("/concentrateFacePassStudentList", selfSupportForSchoolhdl.ConcentrateFacePassStudentList) // 自营学校-集采学生列表 r.GET("/concentrateFacePassStudentConfirm", selfSupportForSchoolhdl.ConcentrateFacePassStudentConfirm) // 自营学校-集采学生确认 } func rUserIdentity(r *gin.RouterGroup) { //用户身份 r.Use(mw.Auth) //检测登录状态 r.DELETE("/deleteUserIdentity/:id", hdl.DeleteUserIdentity) // 删除身份信息 r.POST("/updateCentralKitchenForSchoolUserIdentity", hdl.UpdateCentralKitchenForSchoolUserIdentity) // 修改"央厨-学校"学生身份信息 r.POST("/updateSelfSupportForSchoolUserIdentity", hdl.UpdateSelfSupportForSchoolUserIdentity) // 修改"自营-学校"学生身份信息 r.POST("/updateNursingHomeUserIdentity", hdl.UpdateNursingHomeUserIdentity) // 修改"养老院"身份信息 } func rApiSuggestedFeedback(r *gin.RouterGroup) { //反馈建议 r.Use(mw.Auth) //检测登录状态 r.POST("/list", hdl.SuggestedFeedbackList) // 列表 r.POST("/add", hdl.SuggestedFeedbackAdd) // 新增 } func rApiFoodMenu(r *gin.RouterGroup) { //菜谱 r.Use(mw.Auth) //检测登录状态 r.POST("/weekFoodMenu", hdl.WeekFoodMenu) // 每周菜谱 }