1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package manage
- import (
- "Cold_Logistic/internal/server/adapter/http/middleware"
- "github.com/gin-gonic/gin"
- )
- func Register(r *gin.RouterGroup) {
- api := NewApi()
- // 公共接口
- common := r.Group("/common")
- common.Use(middleware.ManageAuth(), middleware.PlatformAccount())
- common.POST("/userList", api.userList) // 冷链系统3.0用户列表
- common.POST("/deviceSensorList", api.deviceSensorList)
- common.POST("/sensorDataList", api.snDataList)
- // 车辆管理
- car := r.Group("/car")
- car.Use(middleware.ManageAuth(), middleware.PlatformAccount(), middleware.ManagePermis())
- car.POST("/page", api.carPage)
- car.POST("/add", api.addCar)
- car.POST("/update", api.updateCar)
- car.POST("/driverLog", api.driverLog)
- // 仓库管理
- warehouse := r.Group("/warehouse")
- warehouse.Use(middleware.ManageAuth(), middleware.PlatformAccount(), middleware.ManagePermis())
- warehouse.POST("/page", api.warehousePage)
- warehouse.POST("/add", api.addWarehouse)
- warehouse.POST("/update", api.updateWarehouse)
- warehouse.POST("/orderPage", api.warehouseOrder)
- // 订单管理
- order := r.Group("/order")
- order.Use(middleware.ManageAuth(), middleware.PlatformAccount(), middleware.ManagePermis())
- order.POST("/page", api.orderPage)
- order.POST("/detail", api.orderDetail)
- order.POST("/logistic", api.orderLogistic)
- order.POST("/assign", api.orderAssign)
- // 统计
- stat := r.Group("/statistic")
- stat.POST("/orderNum/byTime", api.statOrderNumByTime)
- stat.POST("/orderNum/byUser", api.statOrderNumByUser)
- return
- }
- type Api struct{}
- func NewApi() Api {
- return Api{}
- }
|