api.go 921 B

123456789101112131415161718192021222324252627282930
  1. package insider
  2. import (
  3. "Cold_Logistic/internal/server/adapter/http/middleware"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func Register(r *gin.RouterGroup) {
  7. api := NewApi()
  8. driver := r.Group("/driver")
  9. driver.Use(middleware.Auth(), middleware.PlatformAccount())
  10. driver.POST("/carInfo", api.carInfo) // 车辆信息
  11. driver.POST("/taskPage", api.taskPage) // 司机任务列表
  12. driver.POST("/orderIntoCar", api.orderIntoCar) // 装车
  13. driver.POST("/signReceipt", api.signReceipt) // 签收
  14. house := r.Group("/warehouse")
  15. house.Use(middleware.Auth(), middleware.PlatformAccount())
  16. house.POST("/info", api.houseInfo) // 仓库信息
  17. house.POST("/orderPage", api.warehouseOrder) // 库中订单列表
  18. house.POST("/orderInto", api.orderIntoHouse) // 订单入库
  19. house.POST("/orderOut", api.orderOutHouse) // 订单出库
  20. return
  21. }
  22. type Api struct{}
  23. func NewApi() Api {
  24. return Api{}
  25. }