智慧食堂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin_router.go 22 KiB

1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
1 jaar geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. package router
  2. import (
  3. hdl2 "applet/app/admin/hdl"
  4. hdl "applet/app/admin/hdl/enterprise_manage"
  5. "applet/app/admin/mw"
  6. "applet/app/cfg"
  7. "github.com/gin-gonic/gin"
  8. )
  9. // Init 初始化路由
  10. func Init() *gin.Engine {
  11. mode := "release"
  12. if cfg.Debug {
  13. mode = "debug"
  14. }
  15. gin.SetMode(mode)
  16. //创建一个新的启动器
  17. r := gin.New()
  18. // 是否打印访问日志, 在非正式环境都打印
  19. if mode != "release" {
  20. r.Use(gin.Logger())
  21. }
  22. r.Use(gin.Recovery())
  23. r.GET("/favicon.ico", func(c *gin.Context) {
  24. c.Status(204)
  25. })
  26. r.NoRoute(func(c *gin.Context) {
  27. c.JSON(404, gin.H{"code": 404, "msg": "page not found", "data": []struct{}{}})
  28. })
  29. r.NoMethod(func(c *gin.Context) {
  30. c.JSON(405, gin.H{"code": 405, "msg": "method not allowed", "data": []struct{}{}})
  31. })
  32. r.Use(mw.Cors)
  33. AdminRoute(r.Group("/api/admin"))
  34. CustomerInit(r.Group("/api/v1"))
  35. return r
  36. }
  37. func rCompany(r *gin.RouterGroup) {
  38. r.GET("/list", hdl2.CompanyList)
  39. r.POST("/add", hdl2.CompanyAdd)
  40. r.POST("/update", hdl2.CompanyUpdate)
  41. r.DELETE("/delete/:id", hdl2.CompanyDelete)
  42. }
  43. func rHomePage(r *gin.RouterGroup) {
  44. r.GET("/index", hdl2.HomePageIndex)
  45. r.GET("/thisWeekData", hdl2.ThisWeekData)
  46. r.GET("/thisMonthData", hdl2.ThisMonthData)
  47. }
  48. func rNotice(r *gin.RouterGroup) {
  49. r.GET("/list", hdl2.NoticeList)
  50. r.POST("/add", hdl2.NoticeAdd)
  51. r.POST("/sort", hdl2.NoticeSort)
  52. r.POST("/update", hdl2.NoticeUpdate)
  53. r.DELETE("/delete/:id", hdl2.NoticeUpdate)
  54. }
  55. func rBanner(r *gin.RouterGroup) {
  56. r.GET("/list", hdl2.BannerList)
  57. r.POST("/add", hdl2.BannerAdd)
  58. r.POST("/sort", hdl2.BannerSort)
  59. r.POST("/update", hdl2.BannerUpdate)
  60. r.DELETE("/delete/:id", hdl2.BannerDelete)
  61. }
  62. func rComm(r *gin.RouterGroup) {
  63. r.POST("/getMenuList", hdl2.MenuList) // 获取菜单栏列表
  64. }
  65. func rOss(r *gin.RouterGroup) {
  66. r.POST("/upload/token", hdl2.ImgReqUpload) // 文件上传获取七牛云上传token
  67. }
  68. func rSetCenter(r *gin.RouterGroup) {
  69. r.GET("/get", hdl2.GetCenter) // 设置中心-在线支付(学校)获取
  70. r.POST("/set", hdl2.SetCenter) // 设置中心-在线支付(学校)设置
  71. r.GET("/getForNursingHome", hdl2.GetForNursingHome) // 设置中心-在线支付(养老院)获取
  72. r.POST("/setForNursingHome", hdl2.SetForNursingHome) // 设置中心-在线支付(养老院)设置
  73. }
  74. func rAuditCenter(r *gin.RouterGroup) {
  75. r.POST("/centralKitchenForSchoolOrderRefundList", hdl2.CentralKitchenForSchoolOrderRefundList) //审核中心-央厨-学校-订单退款列表
  76. r.POST("/centralKitchenForSchoolOrderRefundAudit", hdl2.CentralKitchenForSchoolOrderRefundAudit) //审核中心-央厨-学校-订单退款审核
  77. r.POST("/nursingHomeOrderRefundList", hdl2.NursingHomeOrderRefundList) //审核中心-养老院-订单退款列表
  78. r.POST("/nursingHomeOrderRefundAudit", hdl2.NursingHomeOrderRefundAudit) //审核中心-养老院-订单退款审核
  79. }
  80. func rFinanceManage(r *gin.RouterGroup) {
  81. r.POST("/centralKitchenForSchool/ordList", hdl.CentralKitchenForSchoolOrdList) //财务管理-(央厨-学校)订单列表
  82. r.GET("/centralKitchenForSchool/ordDetail", hdl.CentralKitchenForSchoolOrdDetail) //财务管理-(央厨-学校)订单详情
  83. r.POST("/centralKitchenForSchool/ordRefund", hdl.CentralKitchenForSchoolOrdRefund) //财务管理-(央厨-学校)订单退款
  84. r.POST("/selfSupportForSchool/ordList", hdl.SelfSupportForSchoolOrdList) //财务管理-(自营-学校)订单列表
  85. r.POST("/selfSupportForSchool/ordRefund", hdl.SelfSupportForSchoolOrdRefund) //财务管理-(自营-学校)订单退款
  86. r.POST("/selfSupportForSchool/arrearsOrdList", hdl.SelfSupportForSchoolArrearsOrdList) //财务管理-(自营-学校)欠费列表
  87. r.POST("/selfSupportForSchool/arrearsOrdDebtRepay", hdl.SelfSupportForSchoolArrearsOrdDebtRepay) //"自营-学校"订单欠费催缴
  88. r.POST("/selfSupportForSchool/arrearsOrdDebtCancel", hdl.SelfSupportForSchoolArrearsOrdDebtCancel) //"自营-学校"撤销欠款
  89. r.POST("/nursingHome/ordList", hdl.NursingHomeOrdList) //财务管理-(养老院)订单列表
  90. r.GET("/nursingHome/ordDetail", hdl.NursingHomeOrdDetail) //财务管理-(养老院)订单详情
  91. r.POST("/nursingHome/ordRefund", hdl.NursingHomeOrdRefund) //财务管理-(养老院)订单退款
  92. }
  93. func rDeviceManage(r *gin.RouterGroup) {
  94. r.POST("/save", hdl2.DeviceSave) //设备管理-编辑/新增
  95. r.POST("/list", hdl2.DeviceList) //设备管理-列表
  96. r.DELETE("/delete/:device_sn", hdl2.DeviceDelete) //设备管理-删除
  97. }
  98. func rDataStatistics(r *gin.RouterGroup) {
  99. r.POST("/centralKitchenForSchool/export", hdl2.CentralKitchenForSchoolDataStatisticsExport) //数据统计-(央厨-学校)-导出
  100. r.POST("/centralKitchenForSchool/contrast", hdl2.CentralKitchenForSchoolDataStatisticsContrast) //数据统计-(央厨-学校)-数据对比
  101. r.POST("/centralKitchenForSchool/list", hdl2.CentralKitchenForSchoolDataStatisticsList) //数据统计-(央厨-学校)-列表
  102. r.DELETE("/centralKitchenForSchool/delete/:id", hdl2.CentralKitchenForSchoolDataStatisticsDelete) //数据统计-(央厨-学校)-删除
  103. r.POST("/nursingHome/export", hdl2.NursingHomeDataStatisticsExport) //数据统计-(养老院)-导出
  104. r.POST("/nursingHome/list", hdl2.NursingHomeDataStatisticsList) //数据统计-(养老院)-列表
  105. r.DELETE("/nursingHome/delete/:id", hdl2.NursingHomeDataStatisticsDelete) //数据统计-(养老院)-删除
  106. r.POST("/selfSupportForSchool/export", hdl2.SelfSupportForSchoolDataStatisticsExport) //数据统计-(自营-学校)-导出
  107. r.POST("/selfSupportForSchool/list", hdl2.SelfSupportForSchoolDataStatisticsList) //数据统计-(自营-学校)-列表
  108. r.DELETE("/selfSupportForSchool/delete/:id", hdl2.SelfSupportForSchoolDataStatisticsDelete) //数据统计-(自营-学校)-删除
  109. }
  110. func rUser(r *gin.RouterGroup) {
  111. r.POST("/list", hdl2.UserList) //列表
  112. r.POST("centralKitchenForSchool/list", hdl2.CentralKitchenForSchoolUserList) //央厨用户列表
  113. r.POST("/centralKitchenForSchool/userUpdate", hdl2.CentralKitchenForSchoolUserUpdate) //"央厨-学校"用户编辑
  114. r.POST("/centralKitchenForSchool/userDelete", hdl2.CentralKitchenForSchoolUserDelete) //"央厨-学校"用户删除
  115. r.POST("/update", hdl2.UserUpdate) //编辑
  116. r.DELETE("/delete/:id", hdl2.UserDelete) //删除
  117. }
  118. func rEnterprise(r *gin.RouterGroup) {
  119. r.POST("/list", hdl2.EnterpriseList)
  120. r.POST("/add", hdl2.EnterpriseAdd)
  121. r.POST("/centralKitchenForSchoolUpdate", hdl2.CentralKitchenForSchoolUpdate)
  122. r.POST("/selfSupportForSchoolUpdate", hdl2.SelfSupportForSchoolUpdate)
  123. r.POST("/delete", hdl2.EnterpriseDelete)
  124. r.POST("/updateState", hdl2.EnterpriseUpdateState)
  125. r.POST("/addGrade", hdl2.EnterpriseAddGrade)
  126. r.GET("/detail", hdl2.Detail)
  127. r.GET("/schoolBelowPeriod", hdl2.SchoolBelowPeriod) //"学校"下学段
  128. r.GET("/periodBelowGrade", hdl2.PeriodBelowGrade) //"学段"下年级
  129. r.GET("/schoolBelowGrade", hdl2.SchoolBelowGrade) //"学校"下年级
  130. r.GET("/schoolGradeBelowClass", hdl2.SchoolGradeBelowClass) //"学校"年级下班级
  131. r.POST("/setCentralKitchenForSchoolWithSpecForSystem", hdl2.SetCentralKitchenForSchoolWithSpecForSystem) //"央厨-学校-套餐-系统" 价格设置
  132. r.GET("/getCentralKitchenForSchoolWithSpecForSystem", hdl2.GetCentralKitchenForSchoolWithSpecForSystem) //"央厨-学校-套餐-系统" 价格获取
  133. r.POST("/listCentralKitchenForSchoolPackageForSystem", hdl2.ListCentralKitchenForSchoolPackageForSystem) //"央厨-学校-套餐-系统" 列表
  134. r.POST("/saveCentralKitchenForSchoolPackage", hdl2.SaveCentralKitchenForSchoolPackageForSystem) //新增/编辑 "央厨-学校-套餐-系统"
  135. r.DELETE("/deleteCentralKitchenForSchoolPackage/:id", hdl2.DeleteCentralKitchenForSchoolPackageForSystem) //删除 "央厨-学校-套餐-系统"
  136. r.POST("/syncCentralKitchenForSchoolPackageForSystem", hdl2.SyncCentralKitchenForSchoolPackageForSystem) //"央厨-学校-套餐-系统" 同步数据
  137. }
  138. func rEnterpriseManage(r *gin.RouterGroup) {
  139. r.GET("/info", hdl.EnterpriseManageInfo) //校企管理信息
  140. r.POST("/userIdentityList", hdl.UserIdentityList) //用户列表
  141. r.POST("/centralKitchenForSchool/userUpdate", hdl.CentralKitchenForSchoolUserUpdate) //"央厨-学校"用户编辑
  142. r.POST("/centralKitchenForSchool/userDelete", hdl.CentralKitchenForSchoolUserDelete) //"央厨-学校"用户删除
  143. r.POST("/centralKitchenForSchool/studentList", hdl.CentralKitchenForSchoolStudentList) //"央厨-学校"学生列表
  144. r.POST("/centralKitchenForSchool/studentUpdate", hdl.CentralKitchenForSchoolStudentUpdate) //"央厨-学校"学生编辑
  145. r.POST("/centralKitchenForSchool/studentDelete", hdl.CentralKitchenForSchoolStudentDelete) //"央厨-学校"学生删除
  146. r.POST("/centralKitchenForSchool/batchStudentAdmission", hdl.CentralKitchenForSchoolBatchStudentAdmission) //"央厨-学校"学生升学
  147. r.POST("/centralKitchenForSchool/studentAdmission", hdl.CentralKitchenForSchoolStudentAdmission) //"央厨-学校"学生升学
  148. r.POST("/centralKitchenForSchool/teacherList", hdl.CentralKitchenForSchoolTeacherList) //"央厨-学校"教师列表
  149. r.POST("/centralKitchenForSchool/teacherUpdate", hdl.CentralKitchenForSchoolTeacherUpdate) //"央厨-学校"教师编辑
  150. r.POST("/centralKitchenForSchool/teacherDelete", hdl.CentralKitchenForSchoolTeacherDelete) //"央厨-学校"教师删除
  151. r.POST("/centralKitchenForSchool/gradeList", hdl.CentralKitchenForSchoolGradeList) //"央厨-学校"年级列表
  152. r.DELETE("/centralKitchenForSchool/gradeDelete/:id", hdl.CentralKitchenForSchoolGradeDelete) //"央厨-学校"年级删除
  153. r.POST("/centralKitchenForSchool/classList", hdl.CentralKitchenForSchoolClassList) //"央厨-学校"班级列表
  154. r.DELETE("/centralKitchenForSchool/classDelete/:id", hdl.CentralKitchenForSchoolClassDelete) //"央厨-学校"班级删除
  155. r.GET("/centralKitchenForSchool/classDeleteCheck/:id", hdl.CentralKitchenForSchoolClassDeleteCheck) //"央厨-学校"检测班级删除
  156. r.POST("/centralKitchenForSchool/ordList", hdl.CentralKitchenForSchoolOrdList) //"央厨-学校"订单列表
  157. r.GET("/centralKitchenForSchool/ordDetail", hdl.CentralKitchenForSchoolOrdDetail) //"央厨-学校"订单详情
  158. r.POST("/centralKitchenForSchool/ordRefund", hdl.CentralKitchenForSchoolOrdRefund) //"央厨-学校"订单退款
  159. r.POST("/centralKitchenForSchool/batchAskForLeave", hdl.CentralKitchenForSchoolBatchAskForLeave) //"央厨-学校"批量请假
  160. r.POST("/centralKitchenForSchool/reserveList", hdl.CentralKitchenForSchoolReserveList) //"央厨-学校"预定列表
  161. r.GET("/centralKitchenForSchool/reserveUpdateStudent", hdl.CentralKitchenForSchoolReserveUpdateStudent) //"央厨-学校"获取修改学生预定数据
  162. r.POST("/centralKitchenForSchool/reserveUpdateStudent", hdl.CentralKitchenForSchoolReserveUpdateStudent) //"央厨-学校"修改学生预定
  163. r.GET("/centralKitchenForSchool/reserveDetail", hdl.CentralKitchenForSchoolReserveDetail) //"央厨-学校"预定详情
  164. r.POST("/centralKitchenForSchoolOrderRefundList", hdl2.CentralKitchenForSchoolOrderRefundList) //"央厨-学校"订单退款列表
  165. //r.POST("/centralKitchenForSchoolOrderRefundAudit", hdl2.CentralKitchenForSchoolOrderRefundAudit) //"央厨-学校"订单退款审核
  166. r.POST("/setBasicCentralKitchenForSchool", hdl.SetBasicCentralKitchenForSchool) //"央厨-学校"设置基础设置
  167. r.GET("/getBasicCentralKitchenForSchool", hdl.GetBasicCentralKitchenForSchool) //"央厨-学校"获取基础设置
  168. r.POST("/setCentralKitchenForSchoolWithSpecByTeacher", hdl.SetCentralKitchenForSchoolWithSpecByTeacher) //设置教师"央厨-学校-规格"
  169. r.GET("/getCentralKitchenForSchoolWithSpecByTeacher", hdl.GetCentralKitchenForSchoolWithSpecByTeacher) //获取教师"央厨-学校-规格"
  170. r.POST("/setCentralKitchenForSchoolWithSpecByPeriod", hdl.SetCentralKitchenForSchoolWithSpecByPeriod) //设置学段"央厨-学校-规格"
  171. r.POST("/listCentralKitchenForSchoolPackage", hdl.ListCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 列表
  172. r.GET("/detailCentralKitchenForSchoolPackage", hdl.DetailCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 详情
  173. r.POST("/saveCentralKitchenForSchoolPackage", hdl.SaveCentralKitchenForSchoolPackage) //新增/编辑 "央厨-学校-套餐"
  174. r.DELETE("/deleteCentralKitchenForSchoolPackage/:id", hdl.DeleteCentralKitchenForSchoolPackage) //删除 "央厨-学校-套餐"
  175. r.POST("/selfSupportForSchool/userUpdate", hdl.SelfSupportForSchoolUserUpdate) //"自营-学校"用户编辑
  176. r.POST("/selfSupportForSchool/userDelete", hdl.SelfSupportForSchoolUserDelete) //"自营-学校"用户删除
  177. r.POST("/selfSupportForSchool/studentList", hdl.SelfSupportForSchoolStudentList) //"自营-学校"学生列表
  178. r.POST("/selfSupportForSchool/studentUpdate", hdl.SelfSupportForSchoolStudentUpdate) //"自营-学校"学生编辑
  179. r.POST("/selfSupportForSchool/studentDelete", hdl.SelfSupportForSchoolStudentDelete) //"自营-学校"学生删除
  180. r.POST("/selfSupportForSchool/studentAdmission", hdl.SelfSupportForSchoolStudentAdmission) //"自营-学校"学生升学
  181. r.POST("/selfSupportForSchool/teacherList", hdl.SelfSupportForSchoolTeacherList) //"自营-学校"教师列表
  182. r.POST("/selfSupportForSchool/teacherUpdate", hdl.SelfSupportForSchoolTeacherUpdate) //"自营-学校"教师编辑
  183. r.POST("/selfSupportForSchool/teacherDelete", hdl.SelfSupportForSchoolTeacherDelete) //"自营-学校"教师删除
  184. r.POST("/selfSupportForSchool/workerList", hdl.SelfSupportForSchoolWorkerList) //"自营-学校"工作人员列表
  185. r.POST("/selfSupportForSchool/workerUpdate", hdl.SelfSupportForSchoolWorkerUpdate) //"自营-学校"工作人员编辑
  186. r.POST("/selfSupportForSchool/workerDelete", hdl.SelfSupportForSchoolWorkerDelete) //"自营-学校"工作人员删除
  187. r.POST("/selfSupportForSchool/gradeList", hdl.SelfSupportForSchoolGradeList) //"自营-学校"年级列表
  188. r.DELETE("/selfSupportForSchool/gradeDelete/:id", hdl.SelfSupportForSchoolGradeDelete) //"自营-学校"年级删除
  189. r.POST("/selfSupportForSchool/classList", hdl.SelfSupportForSchoolClassList) //"自营-学校"班级列表
  190. r.DELETE("/selfSupportForSchool/classDelete/:id", hdl.SelfSupportForSchoolClassDelete) //"自营-学校"班级删除
  191. r.GET("/selfSupportForSchool/classDeleteCheck/:id", hdl.SelfSupportForSchoolClassDeleteCheck) //"自营-学校"班级删除
  192. r.POST("/selfSupportForSchool/addStudent", hdl.SelfSupportForSchoolAddStudent) //"自营-学校"添加学生
  193. r.POST("/selfSupportForSchool/addWorker", hdl.SelfSupportForSchoolAddWorker) //"自营-学校"添加工作人员
  194. r.POST("/selfSupportForSchool/addTeacher", hdl.SelfSupportForSchoolAddTeacher) //"自营-学校"添加老师
  195. r.POST("/selfSupportForSchool/importTeacher", hdl.SelfSupportForSchoolImportTeacher) //"自营-学校"导入老师
  196. r.GET("/selfSupportForSchool/downloadTemplateExcel", hdl.SelfSupportForSchoolDownloadTemplateExcel) //"自营-学校"下载表格模板
  197. r.POST("/selfSupportForSchool/ordList", hdl.SelfSupportForSchoolOrdList) //"自营-学校"订单列表
  198. r.Any("/selfSupportForSchool/ordListExport", hdl.SelfSupportForSchoolOrdListExport) //"自营-学校"订单列表-导出
  199. r.POST("/selfSupportForSchool/consumeLimit", hdl.SelfSupportForSchoolConsumeLimit) //"自营-学校"消费限制-编辑
  200. r.POST("/selfSupportForSchool/consumeLimitList", hdl.SelfSupportForSchoolConsumeLimitList) //"自营-学校"消费限制-列表
  201. r.POST("/selfSupportForSchool/arrearsOrdList", hdl.SelfSupportForSchoolArrearsOrdList) //"自营-学校"订单欠费列表
  202. r.Any("/selfSupportForSchool/arrearsOrdListExport", hdl.SelfSupportForSchoolArrearsOrdListExport) //"自营-学校"订单欠费列表-导出
  203. r.POST("/selfSupportForSchool/blackList", hdl.SelfSupportForSchoolBlackList) //"自营-学校"黑名单列表
  204. r.POST("/selfSupportForSchool/arrearsOrdDebtRepay", hdl.SelfSupportForSchoolArrearsOrdDebtRepay) //"自营-学校"订单欠费催缴
  205. r.POST("/selfSupportForSchool/arrearsOrdDebtCancel", hdl.SelfSupportForSchoolArrearsOrdDebtCancel) //"自营-学校"撤销欠款
  206. r.GET("/selfSupportForSchool/educateSceneKidsClose", hdl.SelfSupportForSchoolEducateSceneKidsClose) //"自营-学校"人脸识别关闭
  207. r.GET("/selfSupportForSchool/educateFacepayClose", hdl.SelfSupportForSchoolEducateFacepayClose) //"自营-学校"刷脸支付关闭
  208. //r.POST("/selfSupportForSchool/statisticsExport", hdl2.SelfSupportForSchoolDataStatisticsExport) //"自营-学校-数据统计"-导出
  209. //r.POST("/selfSupportForSchool/statisticsList", hdl2.SelfSupportForSchoolDataStatisticsList) //"自营-学校-数据统计"-列表
  210. //r.DELETE("/selfSupportForSchool/statisticsDelete/:id", hdl2.SelfSupportForSchoolDataStatisticsDelete) //"自营-学校-数据统计"-删除
  211. r.POST("/nursingHome/userUpdate", hdl.NursingHomeUserUpdate) //"养老院"用户编辑
  212. r.POST("/nursingHome/userDelete", hdl.NursingHomeUserDelete) //"养老院"用户删除
  213. r.POST("/nursingHome/ordList", hdl.NursingHomeOrdList) //"养老院"订单列表
  214. r.GET("/nursingHome/ordDetail", hdl.NursingHomeOrdDetail) //"养老院"订单详情
  215. r.POST("/nursingHome/ordRefund", hdl.NursingHomeOrdRefund) //"养老院"订单退款
  216. r.POST("/nursingHome/reserveList", hdl.NursingHomeReserveList) //"养老院"预定列表
  217. r.GET("/nursingHome/reserveDetail", hdl.NursingHomeReserveDetail) //"养老院"预定详情
  218. r.POST("/nursingHome/orderRefundList", hdl2.NursingHomeOrderRefundList) //"养老院"订单退款列表
  219. r.POST("/setBasicNursingHome", hdl.SetBasicNursingHome) //"养老院"设置基础设置
  220. r.GET("/getBasicNursingHome", hdl.GetBasicNursingHome) //"养老院"获取基础设置
  221. r.POST("/setNursingHomeWithSpec", hdl.SetNursingHomeWithSpec) //设置"养老院-规格"
  222. r.GET("/getNursingHomeWithSpec", hdl.GetNursingHomeWithSpec) //获取"养老院-规格"
  223. r.POST("/listNursingHomePackage", hdl.ListNursingHomePackage) //"养老院-套餐" 列表
  224. r.GET("/detailNursingHomePackage", hdl.DetailNursingHomePackage) //"养老院-套餐" 详情
  225. r.POST("/saveNursingHomePackage", hdl.SaveNursingHomePackage) //新增/编辑 "养老院-套餐"
  226. r.DELETE("/deleteNursingHomePackage/:id", hdl.DeleteNursingHomePackage) //删除 "养老院-套餐"
  227. //r.POST("/nursingHome/statisticsExport", hdl2.NursingHomeDataStatisticsExport) //"养老院-数据统计"-导出
  228. //r.POST("/nursingHome/statisticsList", hdl2.NursingHomeDataStatisticsList) //"养老院-数据统计"-列表
  229. //r.DELETE("/nursingHome/statisticsDelete/:id", hdl2.NursingHomeDataStatisticsDelete) //"养老院-数据统计"-删除
  230. }
  231. func rRole(r *gin.RouterGroup) {
  232. r.GET("/roleList", hdl2.RoleList) //角色列表
  233. r.POST("/addRole", hdl2.AddRole) //角色添加
  234. r.POST("/roleBindPermissionGroup", hdl2.RoleBindPermissionGroup) //角色绑定权限组
  235. r.POST("/updateRoleState", hdl2.UpdateRoleState) //修改角色状态
  236. r.POST("/updateRole", hdl2.UpdateRole) //修改角色状态
  237. r.DELETE("/deleteRole/:id", hdl2.DeleteRole) //删除角色
  238. r.GET("/permissionGroupList", hdl2.PermissionGroupList) //权限组列表
  239. r.POST("/adminList", hdl2.AdminList) //管理员列表
  240. r.POST("/updateAdminState", hdl2.UpdateAdminState) //修改管理员状态
  241. r.POST("/updateAdmin", hdl2.UpdateAdmin) //修改管理员信息
  242. r.POST("/addAdmin", hdl2.AddAdmin) //新增管理员
  243. r.DELETE("/deleteAdmin/:adm_id", hdl2.DeleteAdmin) //删除管理员
  244. r.GET("/adminInfo", hdl2.AdminInfo) //获取管理员信息
  245. r.POST("/bindAdminRole", hdl2.BindAdminRole) //绑定角色
  246. r.POST("/bindAdminWithEnterprise", hdl2.BindAdminWithEnterprise) //绑定校企
  247. }
  248. func AdminRoute(r *gin.RouterGroup) {
  249. r.GET("/demo", hdl2.Demo)
  250. r.POST("/login", hdl2.Login)
  251. //r.GET("/import", hdl.ImportV2) //"自营-学校"导入老师
  252. r.Use(mw.Auth) //检测登录状态
  253. r.GET("/userInfo", hdl2.UserInfo) //用户信息
  254. r.GET("/sysCfg", hdl2.GetSysCfg) //基础配置-获取
  255. rOss(r.Group("/oss"))
  256. rComm(r.Group("/comm"))
  257. r.Use(mw.CheckPermission) //检测权限
  258. rHomePage(r.Group("/homePage")) //首页
  259. rCompany(r.Group("/company")) //公司管理
  260. rNotice(r.Group("/notice")) //公告管理
  261. rBanner(r.Group("/banner")) //轮播图管理
  262. rEnterprise(r.Group("/enterprise")) //校企管理
  263. rEnterpriseManage(r.Group("/enterpriseManage")) //校企管理详情
  264. rRole(r.Group("/role")) //权限管理
  265. rSetCenter(r.Group("/setCenter")) //设置中心
  266. rUser(r.Group("/user")) //用户管理
  267. rAuditCenter(r.Group("/auditCenter")) //审核中心
  268. rFinanceManage(r.Group("/financeManage")) //财务管理
  269. rDeviceManage(r.Group("/deviceManage")) //设备管理
  270. rDataStatistics(r.Group("/dataStatistics")) //数据统计
  271. }