智慧食堂
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

325 строки
23 KiB

  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.GET("/noticeIsPopToCentralKitchen", hdl2.NoticeIsPopToCentralKitchen)
  51. r.POST("/add", hdl2.NoticeAdd)
  52. r.POST("/sort", hdl2.NoticeSort)
  53. r.POST("/update", hdl2.NoticeUpdate)
  54. r.DELETE("/delete/:id", hdl2.NoticeDelete)
  55. }
  56. func rSuggestedFeedback(r *gin.RouterGroup) {
  57. r.POST("/list", hdl2.SuggestedFeedbackList)
  58. r.POST("/reply", hdl2.SuggestedFeedbackReply)
  59. }
  60. func rBanner(r *gin.RouterGroup) {
  61. r.GET("/list", hdl2.BannerList)
  62. r.POST("/add", hdl2.BannerAdd)
  63. r.POST("/sort", hdl2.BannerSort)
  64. r.POST("/update", hdl2.BannerUpdate)
  65. r.DELETE("/delete/:id", hdl2.BannerDelete)
  66. }
  67. func rComm(r *gin.RouterGroup) {
  68. r.POST("/getMenuList", hdl2.MenuList) // 获取菜单栏列表
  69. }
  70. func rOss(r *gin.RouterGroup) {
  71. r.POST("/upload/token", hdl2.ImgReqUpload) // 文件上传获取七牛云上传token
  72. }
  73. func rSetCenter(r *gin.RouterGroup) {
  74. r.GET("/get", hdl2.GetCenter) // 设置中心-在线支付(学校)获取
  75. r.POST("/set", hdl2.SetCenter) // 设置中心-在线支付(学校)设置
  76. r.GET("/getForNursingHome", hdl2.GetForNursingHome) // 设置中心-在线支付(养老院)获取
  77. r.POST("/setForNursingHome", hdl2.SetForNursingHome) // 设置中心-在线支付(养老院)设置
  78. }
  79. func rAuditCenter(r *gin.RouterGroup) {
  80. r.POST("/centralKitchenForSchoolOrderRefundList", hdl2.CentralKitchenForSchoolOrderRefundList) //审核中心-央厨-学校-订单退款列表
  81. r.POST("/centralKitchenForSchoolOrderRefundAudit", hdl2.CentralKitchenForSchoolOrderRefundAudit) //审核中心-央厨-学校-订单退款审核
  82. r.POST("/nursingHomeOrderRefundList", hdl2.NursingHomeOrderRefundList) //审核中心-养老院-订单退款列表
  83. r.POST("/nursingHomeOrderRefundAudit", hdl2.NursingHomeOrderRefundAudit) //审核中心-养老院-订单退款审核
  84. }
  85. func rFinanceManage(r *gin.RouterGroup) {
  86. r.POST("/centralKitchenForSchool/ordList", hdl.CentralKitchenForSchoolOrdList) //财务管理-(央厨-学校)订单列表
  87. r.Any("/centralKitchenForSchool/ordListExport", hdl.CentralKitchenForSchoolOrdListExport) //财务管理-(央厨-学校)订单列表导出
  88. r.GET("/centralKitchenForSchool/ordDetail", hdl.CentralKitchenForSchoolOrdDetail) //财务管理-(央厨-学校)订单详情
  89. r.POST("/centralKitchenForSchool/ordRefund", hdl.CentralKitchenForSchoolOrdRefund) //财务管理-(央厨-学校)订单退款
  90. r.POST("/selfSupportForSchool/ordList", hdl.SelfSupportForSchoolOrdList) //财务管理-(自营-学校)订单列表
  91. r.POST("/selfSupportForSchool/ordRefund", hdl.SelfSupportForSchoolOrdRefund) //财务管理-(自营-学校)订单退款
  92. r.POST("/selfSupportForSchool/arrearsOrdList", hdl.SelfSupportForSchoolArrearsOrdList) //财务管理-(自营-学校)欠费列表
  93. r.POST("/selfSupportForSchool/arrearsOrdDebtRepay", hdl.SelfSupportForSchoolArrearsOrdDebtRepay) //"自营-学校"订单欠费催缴
  94. r.POST("/selfSupportForSchool/arrearsOrdDebtCancel", hdl.SelfSupportForSchoolArrearsOrdDebtCancel) //"自营-学校"撤销欠款
  95. r.POST("/nursingHome/ordList", hdl.NursingHomeOrdList) //财务管理-(养老院)订单列表
  96. r.GET("/nursingHome/ordDetail", hdl.NursingHomeOrdDetail) //财务管理-(养老院)订单详情
  97. r.POST("/nursingHome/ordRefund", hdl.NursingHomeOrdRefund) //财务管理-(养老院)订单退款
  98. }
  99. func rDeviceManage(r *gin.RouterGroup) {
  100. r.POST("/save", hdl2.DeviceSave) //设备管理-编辑/新增
  101. r.POST("/list", hdl2.DeviceList) //设备管理-列表
  102. r.GET("/enterPriseMerchantList", hdl2.EnterPriseMerchantList) //设备管理-学校下商家列表
  103. r.DELETE("/delete/:device_sn", hdl2.DeviceDelete) //设备管理-删除
  104. }
  105. func rMerchant(r *gin.RouterGroup) {
  106. r.POST("/add", hdl2.MerchantAdd) //商家管理-新增
  107. r.POST("/update", hdl2.MerchantUpdate) //商家管理-编辑
  108. r.POST("/list", hdl2.MerchantList) //商家管理-列表
  109. r.DELETE("/delete/:merchant_id", hdl2.MerchantDelete) //商家管理-删除
  110. }
  111. func rDataStatistics(r *gin.RouterGroup) {
  112. r.POST("/centralKitchenForSchool/export", hdl2.CentralKitchenForSchoolDataStatisticsExport) //数据统计-(央厨-学校)-导出
  113. r.POST("/centralKitchenForSchool/contrast", hdl2.CentralKitchenForSchoolDataStatisticsContrast) //数据统计-(央厨-学校)-数据对比
  114. r.POST("/centralKitchenForSchool/list", hdl2.CentralKitchenForSchoolDataStatisticsList) //数据统计-(央厨-学校)-列表
  115. r.POST("/centralKitchenForSchool/delete", hdl2.CentralKitchenForSchoolDataStatisticsDelete) //数据统计-(央厨-学校)-删除
  116. r.POST("/nursingHome/export", hdl2.NursingHomeDataStatisticsExport) //数据统计-(养老院)-导出
  117. r.POST("/nursingHome/list", hdl2.NursingHomeDataStatisticsList) //数据统计-(养老院)-列表
  118. r.POST("/nursingHome/delete", hdl2.NursingHomeDataStatisticsDelete) //数据统计-(养老院)-删除
  119. r.POST("/selfSupportForSchool/export", hdl2.SelfSupportForSchoolDataStatisticsExport) //数据统计-(自营-学校)-导出
  120. r.POST("/selfSupportForSchool/list", hdl2.SelfSupportForSchoolDataStatisticsList) //数据统计-(自营-学校)-列表
  121. r.POST("/selfSupportForSchool/delete", hdl2.SelfSupportForSchoolDataStatisticsDelete) //数据统计-(自营-学校)-删除
  122. }
  123. func rUser(r *gin.RouterGroup) {
  124. r.POST("/list", hdl2.UserList) //列表
  125. r.POST("centralKitchenForSchool/list", hdl2.CentralKitchenForSchoolUserList) //央厨用户列表
  126. r.POST("/centralKitchenForSchool/userUpdate", hdl2.CentralKitchenForSchoolUserUpdate) //"央厨-学校"用户编辑
  127. r.POST("/centralKitchenForSchool/userDelete", hdl2.CentralKitchenForSchoolUserDelete) //"央厨-学校"用户删除
  128. r.POST("/update", hdl2.UserUpdate) //编辑
  129. r.DELETE("/delete/:id", hdl2.UserDelete) //删除
  130. }
  131. func rEnterprise(r *gin.RouterGroup) {
  132. r.POST("/list", hdl2.EnterpriseList)
  133. r.POST("/add", hdl2.EnterpriseAdd)
  134. r.POST("/centralKitchenForSchoolUpdate", hdl2.CentralKitchenForSchoolUpdate)
  135. r.POST("/selfSupportForSchoolUpdate", hdl2.SelfSupportForSchoolUpdate)
  136. r.POST("/delete", hdl2.EnterpriseDelete)
  137. r.POST("/updateState", hdl2.EnterpriseUpdateState)
  138. r.POST("/addGrade", hdl2.EnterpriseAddGrade)
  139. r.GET("/detail", hdl2.Detail)
  140. r.GET("/schoolBelowPeriod", hdl2.SchoolBelowPeriod) //"学校"下学段
  141. r.GET("/periodBelowGrade", hdl2.PeriodBelowGrade) //"学段"下年级
  142. r.GET("/schoolBelowGrade", hdl2.SchoolBelowGrade) //"学校"下年级
  143. r.GET("/schoolGradeBelowClass", hdl2.SchoolGradeBelowClass) //"学校"年级下班级
  144. r.POST("/setCentralKitchenForSchoolWithSpecForSystem", hdl2.SetCentralKitchenForSchoolWithSpecForSystem) //"央厨-学校-套餐-系统" 价格设置
  145. r.GET("/getCentralKitchenForSchoolWithSpecForSystem", hdl2.GetCentralKitchenForSchoolWithSpecForSystem) //"央厨-学校-套餐-系统" 价格获取
  146. r.POST("/listCentralKitchenForSchoolPackageForSystem", hdl2.ListCentralKitchenForSchoolPackageForSystem) //"央厨-学校-套餐-系统" 列表
  147. r.POST("/saveCentralKitchenForSchoolPackage", hdl2.SaveCentralKitchenForSchoolPackageForSystem) //新增/编辑 "央厨-学校-套餐-系统"
  148. r.DELETE("/deleteCentralKitchenForSchoolPackage/:id", hdl2.DeleteCentralKitchenForSchoolPackageForSystem) //删除 "央厨-学校-套餐-系统"
  149. r.POST("/syncCentralKitchenForSchoolPackageForSystem", hdl2.SyncCentralKitchenForSchoolPackageForSystem) //"央厨-学校-套餐-系统" 同步数据
  150. }
  151. func rEnterpriseManage(r *gin.RouterGroup) {
  152. r.GET("/info", hdl.EnterpriseManageInfo) //校企管理信息
  153. r.POST("/userIdentityList", hdl.UserIdentityList) //用户列表
  154. r.POST("/centralKitchenForSchool/userUpdate", hdl.CentralKitchenForSchoolUserUpdate) //"央厨-学校"用户编辑
  155. r.POST("/centralKitchenForSchool/userDelete", hdl.CentralKitchenForSchoolUserDelete) //"央厨-学校"用户删除
  156. r.POST("/centralKitchenForSchool/studentList", hdl.CentralKitchenForSchoolStudentList) //"央厨-学校"学生列表
  157. r.POST("/centralKitchenForSchool/studentUpdate", hdl.CentralKitchenForSchoolStudentUpdate) //"央厨-学校"学生编辑
  158. r.POST("/centralKitchenForSchool/studentDelete", hdl.CentralKitchenForSchoolStudentDelete) //"央厨-学校"学生删除
  159. r.POST("/centralKitchenForSchool/batchStudentAdmission", hdl.CentralKitchenForSchoolBatchStudentAdmission) //"央厨-学校"学生升学
  160. r.POST("/centralKitchenForSchool/studentAdmission", hdl.CentralKitchenForSchoolStudentAdmission) //"央厨-学校"学生升学
  161. r.POST("/centralKitchenForSchool/teacherList", hdl.CentralKitchenForSchoolTeacherList) //"央厨-学校"教师列表
  162. r.POST("/centralKitchenForSchool/teacherUpdate", hdl.CentralKitchenForSchoolTeacherUpdate) //"央厨-学校"教师编辑
  163. r.POST("/centralKitchenForSchool/teacherDelete", hdl.CentralKitchenForSchoolTeacherDelete) //"央厨-学校"教师删除
  164. r.POST("/centralKitchenForSchool/gradeList", hdl.CentralKitchenForSchoolGradeList) //"央厨-学校"年级列表
  165. r.DELETE("/centralKitchenForSchool/gradeDelete/:id", hdl.CentralKitchenForSchoolGradeDelete) //"央厨-学校"年级删除
  166. r.POST("/centralKitchenForSchool/classList", hdl.CentralKitchenForSchoolClassList) //"央厨-学校"班级列表
  167. r.DELETE("/centralKitchenForSchool/classDelete/:id", hdl.CentralKitchenForSchoolClassDelete) //"央厨-学校"班级删除
  168. r.GET("/centralKitchenForSchool/classDeleteCheck/:id", hdl.CentralKitchenForSchoolClassDeleteCheck) //"央厨-学校"检测班级删除
  169. r.POST("/centralKitchenForSchool/ordList", hdl.CentralKitchenForSchoolOrdList) //"央厨-学校"订单列表
  170. r.GET("/centralKitchenForSchool/ordDetail", hdl.CentralKitchenForSchoolOrdDetail) //"央厨-学校"订单详情
  171. r.POST("/centralKitchenForSchool/ordRefund", hdl.CentralKitchenForSchoolOrdRefund) //"央厨-学校"订单退款
  172. r.POST("/centralKitchenForSchool/batchAskForLeave", hdl.CentralKitchenForSchoolBatchAskForLeave) //"央厨-学校"批量请假
  173. r.POST("/centralKitchenForSchool/reserveList", hdl.CentralKitchenForSchoolReserveList) //"央厨-学校"预定列表
  174. r.GET("/centralKitchenForSchool/reserveUpdateStudent", hdl.CentralKitchenForSchoolReserveUpdateStudent) //"央厨-学校"获取修改学生预定数据
  175. r.POST("/centralKitchenForSchool/reserveUpdateStudent", hdl.CentralKitchenForSchoolReserveUpdateStudent) //"央厨-学校"修改学生预定
  176. r.GET("/centralKitchenForSchool/reserveDetail", hdl.CentralKitchenForSchoolReserveDetail) //"央厨-学校"预定详情
  177. r.POST("/centralKitchenForSchoolOrderRefundList", hdl2.CentralKitchenForSchoolOrderRefundList) //"央厨-学校"订单退款列表
  178. //r.POST("/centralKitchenForSchoolOrderRefundAudit", hdl2.CentralKitchenForSchoolOrderRefundAudit) //"央厨-学校"订单退款审核
  179. r.POST("/setBasicCentralKitchenForSchool", hdl.SetBasicCentralKitchenForSchool) //"央厨-学校"设置基础设置
  180. r.GET("/getBasicCentralKitchenForSchool", hdl.GetBasicCentralKitchenForSchool) //"央厨-学校"获取基础设置
  181. r.POST("/setCentralKitchenForSchoolWithSpecByTeacher", hdl.SetCentralKitchenForSchoolWithSpecByTeacher) //设置教师"央厨-学校-规格"
  182. r.GET("/getCentralKitchenForSchoolWithSpecByTeacher", hdl.GetCentralKitchenForSchoolWithSpecByTeacher) //获取教师"央厨-学校-规格"
  183. r.POST("/setCentralKitchenForSchoolWithSpecByPeriod", hdl.SetCentralKitchenForSchoolWithSpecByPeriod) //设置学段"央厨-学校-规格"
  184. r.POST("/listCentralKitchenForSchoolPackage", hdl.ListCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 列表
  185. r.GET("/detailCentralKitchenForSchoolPackage", hdl.DetailCentralKitchenForSchoolPackage) //"央厨-学校-套餐" 详情
  186. r.POST("/saveCentralKitchenForSchoolPackage", hdl.SaveCentralKitchenForSchoolPackage) //新增/编辑 "央厨-学校-套餐"
  187. r.DELETE("/deleteCentralKitchenForSchoolPackage/:id", hdl.DeleteCentralKitchenForSchoolPackage) //删除 "央厨-学校-套餐"
  188. r.POST("/selfSupportForSchool/userUpdate", hdl.SelfSupportForSchoolUserUpdate) //"自营-学校"用户编辑
  189. r.POST("/selfSupportForSchool/userDelete", hdl.SelfSupportForSchoolUserDelete) //"自营-学校"用户删除
  190. r.POST("/selfSupportForSchool/studentList", hdl.SelfSupportForSchoolStudentList) //"自营-学校"学生列表
  191. r.POST("/selfSupportForSchool/studentUpdate", hdl.SelfSupportForSchoolStudentUpdate) //"自营-学校"学生编辑
  192. r.POST("/selfSupportForSchool/studentDelete", hdl.SelfSupportForSchoolStudentDelete) //"自营-学校"学生删除
  193. r.POST("/selfSupportForSchool/studentAdmission", hdl.SelfSupportForSchoolStudentAdmission) //"自营-学校"学生升学
  194. r.POST("/selfSupportForSchool/teacherList", hdl.SelfSupportForSchoolTeacherList) //"自营-学校"教师列表
  195. r.POST("/selfSupportForSchool/teacherUpdate", hdl.SelfSupportForSchoolTeacherUpdate) //"自营-学校"教师编辑
  196. r.POST("/selfSupportForSchool/teacherDelete", hdl.SelfSupportForSchoolTeacherDelete) //"自营-学校"教师删除
  197. r.POST("/selfSupportForSchool/workerList", hdl.SelfSupportForSchoolWorkerList) //"自营-学校"工作人员列表
  198. r.POST("/selfSupportForSchool/workerUpdate", hdl.SelfSupportForSchoolWorkerUpdate) //"自营-学校"工作人员编辑
  199. r.POST("/selfSupportForSchool/workerDelete", hdl.SelfSupportForSchoolWorkerDelete) //"自营-学校"工作人员删除
  200. r.POST("/selfSupportForSchool/gradeList", hdl.SelfSupportForSchoolGradeList) //"自营-学校"年级列表
  201. r.DELETE("/selfSupportForSchool/gradeDelete/:id", hdl.SelfSupportForSchoolGradeDelete) //"自营-学校"年级删除
  202. r.POST("/selfSupportForSchool/classList", hdl.SelfSupportForSchoolClassList) //"自营-学校"班级列表
  203. r.DELETE("/selfSupportForSchool/classDelete/:id", hdl.SelfSupportForSchoolClassDelete) //"自营-学校"班级删除
  204. r.GET("/selfSupportForSchool/classDeleteCheck/:id", hdl.SelfSupportForSchoolClassDeleteCheck) //"自营-学校"班级删除
  205. r.POST("/selfSupportForSchool/addStudent", hdl.SelfSupportForSchoolAddStudent) //"自营-学校"添加学生
  206. r.POST("/selfSupportForSchool/addWorker", hdl.SelfSupportForSchoolAddWorker) //"自营-学校"添加工作人员
  207. r.POST("/selfSupportForSchool/addTeacher", hdl.SelfSupportForSchoolAddTeacher) //"自营-学校"添加老师
  208. r.POST("/selfSupportForSchool/importTeacher", hdl.SelfSupportForSchoolImportTeacher) //"自营-学校"导入老师
  209. r.GET("/selfSupportForSchool/downloadTemplateExcel", hdl.SelfSupportForSchoolDownloadTemplateExcel) //"自营-学校"下载表格模板
  210. r.POST("/selfSupportForSchool/ordList", hdl.SelfSupportForSchoolOrdList) //"自营-学校"订单列表
  211. r.Any("/selfSupportForSchool/ordListExport", hdl.SelfSupportForSchoolOrdListExport) //"自营-学校"订单列表-导出
  212. r.POST("/selfSupportForSchool/consumeLimit", hdl.SelfSupportForSchoolConsumeLimit) //"自营-学校"消费限制-编辑
  213. r.POST("/selfSupportForSchool/consumeLimitList", hdl.SelfSupportForSchoolConsumeLimitList) //"自营-学校"消费限制-列表
  214. r.POST("/selfSupportForSchool/arrearsOrdList", hdl.SelfSupportForSchoolArrearsOrdList) //"自营-学校"订单欠费列表
  215. r.Any("/selfSupportForSchool/arrearsOrdListExport", hdl.SelfSupportForSchoolArrearsOrdListExport) //"自营-学校"订单欠费列表-导出
  216. r.POST("/selfSupportForSchool/blackList", hdl.SelfSupportForSchoolBlackList) //"自营-学校"黑名单列表
  217. r.POST("/selfSupportForSchool/arrearsOrdDebtRepay", hdl.SelfSupportForSchoolArrearsOrdDebtRepay) //"自营-学校"订单欠费催缴
  218. r.POST("/selfSupportForSchool/arrearsOrdDebtCancel", hdl.SelfSupportForSchoolArrearsOrdDebtCancel) //"自营-学校"撤销欠款
  219. r.GET("/selfSupportForSchool/educateSceneKidsClose", hdl.SelfSupportForSchoolEducateSceneKidsClose) //"自营-学校"人脸识别关闭
  220. r.GET("/selfSupportForSchool/educateFacepayClose", hdl.SelfSupportForSchoolEducateFacepayClose) //"自营-学校"刷脸支付关闭
  221. //r.POST("/selfSupportForSchool/statisticsExport", hdl2.SelfSupportForSchoolDataStatisticsExport) //"自营-学校-数据统计"-导出
  222. //r.POST("/selfSupportForSchool/statisticsList", hdl2.SelfSupportForSchoolDataStatisticsList) //"自营-学校-数据统计"-列表
  223. //r.DELETE("/selfSupportForSchool/statisticsDelete/:id", hdl2.SelfSupportForSchoolDataStatisticsDelete) //"自营-学校-数据统计"-删除
  224. r.POST("/nursingHome/userUpdate", hdl.NursingHomeUserUpdate) //"养老院"用户编辑
  225. r.POST("/nursingHome/userDelete", hdl.NursingHomeUserDelete) //"养老院"用户删除
  226. r.POST("/nursingHome/ordList", hdl.NursingHomeOrdList) //"养老院"订单列表
  227. r.GET("/nursingHome/ordDetail", hdl.NursingHomeOrdDetail) //"养老院"订单详情
  228. r.POST("/nursingHome/ordRefund", hdl.NursingHomeOrdRefund) //"养老院"订单退款
  229. r.POST("/nursingHome/reserveList", hdl.NursingHomeReserveList) //"养老院"预定列表
  230. r.GET("/nursingHome/reserveDetail", hdl.NursingHomeReserveDetail) //"养老院"预定详情
  231. r.POST("/nursingHome/orderRefundList", hdl2.NursingHomeOrderRefundList) //"养老院"订单退款列表
  232. r.POST("/setBasicNursingHome", hdl.SetBasicNursingHome) //"养老院"设置基础设置
  233. r.GET("/getBasicNursingHome", hdl.GetBasicNursingHome) //"养老院"获取基础设置
  234. r.POST("/setNursingHomeWithSpec", hdl.SetNursingHomeWithSpec) //设置"养老院-规格"
  235. r.GET("/getNursingHomeWithSpec", hdl.GetNursingHomeWithSpec) //获取"养老院-规格"
  236. r.POST("/listNursingHomePackage", hdl.ListNursingHomePackage) //"养老院-套餐" 列表
  237. r.GET("/detailNursingHomePackage", hdl.DetailNursingHomePackage) //"养老院-套餐" 详情
  238. r.POST("/saveNursingHomePackage", hdl.SaveNursingHomePackage) //新增/编辑 "养老院-套餐"
  239. r.DELETE("/deleteNursingHomePackage/:id", hdl.DeleteNursingHomePackage) //删除 "养老院-套餐"
  240. //r.POST("/nursingHome/statisticsExport", hdl2.NursingHomeDataStatisticsExport) //"养老院-数据统计"-导出
  241. //r.POST("/nursingHome/statisticsList", hdl2.NursingHomeDataStatisticsList) //"养老院-数据统计"-列表
  242. //r.DELETE("/nursingHome/statisticsDelete/:id", hdl2.NursingHomeDataStatisticsDelete) //"养老院-数据统计"-删除
  243. }
  244. func rRole(r *gin.RouterGroup) {
  245. r.GET("/roleList", hdl2.RoleList) //角色列表
  246. r.POST("/addRole", hdl2.AddRole) //角色添加
  247. r.POST("/roleBindPermissionGroup", hdl2.RoleBindPermissionGroup) //角色绑定权限组
  248. r.POST("/updateRoleState", hdl2.UpdateRoleState) //修改角色状态
  249. r.POST("/updateRole", hdl2.UpdateRole) //修改角色状态
  250. r.DELETE("/deleteRole/:id", hdl2.DeleteRole) //删除角色
  251. r.GET("/permissionGroupList", hdl2.PermissionGroupList) //权限组列表
  252. r.POST("/adminList", hdl2.AdminList) //管理员列表
  253. r.POST("/updateAdminState", hdl2.UpdateAdminState) //修改管理员状态
  254. r.POST("/updateAdmin", hdl2.UpdateAdmin) //修改管理员信息
  255. r.POST("/addAdmin", hdl2.AddAdmin) //新增管理员
  256. r.DELETE("/deleteAdmin/:adm_id", hdl2.DeleteAdmin) //删除管理员
  257. r.GET("/adminInfo", hdl2.AdminInfo) //获取管理员信息
  258. r.POST("/bindAdminRole", hdl2.BindAdminRole) //绑定角色
  259. r.POST("/bindAdminWithEnterprise", hdl2.BindAdminWithEnterprise) //绑定校企
  260. }
  261. func AdminRoute(r *gin.RouterGroup) {
  262. r.GET("/demo", hdl2.Demo)
  263. r.GET("/test", hdl2.DemoV1)
  264. r.POST("/login", hdl2.Login)
  265. //r.GET("/import", hdl.ImportV2) //"自营-学校"导入老师
  266. r.Use(mw.Auth) //检测登录状态
  267. r.GET("/userInfo", hdl2.UserInfo) //用户信息
  268. r.GET("/sysCfg", hdl2.GetSysCfg) //基础配置-获取
  269. rOss(r.Group("/oss"))
  270. rComm(r.Group("/comm"))
  271. r.Use(mw.CheckPermission) //检测权限
  272. rHomePage(r.Group("/homePage")) //首页
  273. rCompany(r.Group("/company")) //公司管理
  274. rNotice(r.Group("/notice")) //公告管理
  275. rSuggestedFeedback(r.Group("/suggestedFeedback")) //反馈建议
  276. rBanner(r.Group("/banner")) //轮播图管理
  277. rEnterprise(r.Group("/enterprise")) //校企管理
  278. rEnterpriseManage(r.Group("/enterpriseManage")) //校企管理详情
  279. rRole(r.Group("/role")) //权限管理
  280. rSetCenter(r.Group("/setCenter")) //设置中心
  281. rUser(r.Group("/user")) //用户管理
  282. rAuditCenter(r.Group("/auditCenter")) //审核中心
  283. rFinanceManage(r.Group("/financeManage")) //财务管理
  284. rDeviceManage(r.Group("/deviceManage")) //设备管理
  285. rDataStatistics(r.Group("/dataStatistics")) //数据统计
  286. rMerchant(r.Group("/merchant")) //商家管理
  287. }