123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package router
- import (
- "cold-delivery/app/admin/controller"
- "cold-delivery/common/actions"
- "github.com/gin-gonic/gin"
- jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth"
- )
- func init() {
- routerCheckRole = append(routerCheckRole, registerWaybillRouter)
- routerNoCheckRole = append(routerNoCheckRole, registerWaybillRouter2)
- }
- // 派费管理
- // 需认证的路由代码
- func registerWaybillRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
- cont := controller.WaybillController{}
- r := v1.Group("/waybill").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction())
- {
- r.GET("", cont.GetPage)
- r.GET("/:id", cont.Get)
- r.POST("", cont.Insert)
- r.POST("/delivery", cont.Delivery)
- r.PUT("", cont.Update)
- r.DELETE("", cont.Delete)
- r.PUT("/adminaudit", cont.AdminAudit) //管理员审核订单
- r.POST("/receipt", cont.Receipt) // 签收
- r.GET("/customer", cont.GetCustomerPage) // 客户下单列表
- r.POST("/customer", cont.CustomerInsert) // 客户下单
- r.PUT("/update-status", cont.UpdateStatus) // 修改订单状态
- r.PUT("/audit", cont.Audit) // 审核订单
- r.GET("/applet", cont.GetAppletPage) // app 运单列表
- r.GET("/applet-count", cont.GetAppletCount) // app 运单-统计
- r.POST("/import", cont.Import) // 导入运单
- r.GET("/export-template", cont.ExportTemplate) // 导出运单模板
- r.GET("/home", cont.Home) // 首页统计
- r.POST("/user-stats", cont.UserStats) // 用户运单统计
- r.GET("/export", cont.Export) // 运单管理-导出
- r.GET("/customer/export", cont.CustomerExport) // 客户下单
- r.GET("/temperature-pdf", cont.TemperaturePDF) // 导出温湿度pdf
- }
- }
- func registerWaybillRouter2(v1 *gin.RouterGroup) {
- cont := controller.WaybillController{}
- r := v1.Group("/waybill")
- {
- r.POST("/customer/receipt", cont.CustomerReceipt) // 客户签收
- r.GET("/no", cont.GetByWaybillNo)
- }
- }
|