waybill_logistics.go 863 B

1234567891011121314151617181920212223242526272829303132
  1. package router
  2. import (
  3. "cold-logistics/app/admin/controller"
  4. "cold-logistics/common/actions"
  5. "github.com/gin-gonic/gin"
  6. jwt "gogs.baozhida.cn/zoie/OAuth-core/pkg/jwtauth"
  7. )
  8. func init() {
  9. routerNoCheckRole = append(routerNoCheckRole, registerWaybillLogisticsRouter)
  10. routerCheckRole = append(routerCheckRole, registerWaybillLogisticsRouter2)
  11. }
  12. // 物流详情
  13. // 需认证的路由代码
  14. func registerWaybillLogisticsRouter(v1 *gin.RouterGroup) {
  15. cont := controller.WaybillLogisticsController{}
  16. r := v1.Group("/waybill-logistics")
  17. {
  18. r.GET("", cont.GetPage)
  19. }
  20. }
  21. func registerWaybillLogisticsRouter2(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
  22. cont := controller.WaybillLogisticsController{}
  23. r := v1.Group("/waybill-logistics").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction())
  24. {
  25. r.PUT("", cont.Update)
  26. }
  27. }