Files
platforms/backend/api/internal/routers/gas_business.go

108 lines
4.9 KiB
Go
Raw Normal View History

package routers
import (
gaslogic "git.apinb.com/heqiapp/platforms/backend/api/internal/logic/gas"
"github.com/gin-gonic/gin"
)
func registerGasBusinessRoutes(group *gin.RouterGroup) {
group.GET("/dashboard/overview", gaslogic.DashboardOverview)
group.GET("/dashboard/reports", gaslogic.DashboardReport)
delivery := group.Group("/delivery_basic")
delivery.GET("", gaslogic.ListDelivery)
delivery.POST("", gaslogic.CreateDelivery)
delivery.GET("/:identity", gaslogic.GetDelivery)
delivery.PUT("/:identity", gaslogic.UpdateDelivery)
delivery.PATCH("/:identity/status", gaslogic.UpdateDeliveryStatus)
delivery.DELETE("/:identity", gaslogic.ArchiveDelivery)
deliveryAccount := group.Group("/delivery_account")
deliveryAccount.GET("", gaslogic.ListDeliveryAccount)
deliveryAccount.POST("", gaslogic.CreateDeliveryAccount)
deliveryAccount.GET("/:identity", gaslogic.GetDeliveryAccount)
deliveryAccount.PUT("/:identity", gaslogic.UpdateDeliveryAccount)
deliveryAccount.PUT("/:identity/password", gaslogic.ResetDeliveryAccountPassword)
deliveryAccount.PATCH("/:identity/status", gaslogic.UpdateDeliveryAccountStatus)
deliveryAccount.DELETE("/:identity", gaslogic.ArchiveDeliveryAccount)
staff := group.Group("/staff_account")
staff.GET("", gaslogic.ListStaff)
staff.POST("", gaslogic.CreateStaff)
staff.GET("/:identity", gaslogic.GetStaff)
staff.PUT("/:identity", gaslogic.UpdateStaff)
staff.PUT("/:identity/password", gaslogic.ResetStaffPassword)
staff.PATCH("/:identity/status", gaslogic.UpdateStaffStatus)
staff.DELETE("/:identity", gaslogic.ArchiveStaff)
credential := group.Group("/staff_credential")
credential.GET("", gaslogic.ListCredential)
credential.POST("", gaslogic.CreateCredential)
credential.GET("/:identity", gaslogic.GetCredential)
credential.PUT("/:identity", gaslogic.UpdateCredential)
credential.PATCH("/:identity/status", gaslogic.UpdateCredentialStatus)
credential.DELETE("/:identity", gaslogic.ArchiveCredential)
user := group.Group("/user_account")
user.GET("", gaslogic.ListUser)
user.POST("", gaslogic.CreateUser)
user.GET("/:identity", gaslogic.GetUser)
user.PUT("/:identity", gaslogic.UpdateUser)
user.PUT("/:identity/password", gaslogic.ResetUserPassword)
user.PATCH("/:identity/status", gaslogic.UpdateUserStatus)
user.DELETE("/:identity", gaslogic.ArchiveUser)
address := group.Group("/user_address")
address.GET("", gaslogic.ListUserAddress)
address.POST("", gaslogic.CreateUserAddress)
address.GET("/:identity", gaslogic.GetUserAddress)
address.PUT("/:identity", gaslogic.UpdateUserAddress)
address.PATCH("/:identity/status", gaslogic.UpdateUserAddressStatus)
address.DELETE("/:identity", gaslogic.ArchiveUserAddress)
contract := group.Group("/gasorder_contract")
contract.GET("", gaslogic.ListGasorderContract)
contract.POST("", gaslogic.CreateGasorderContract)
contract.GET("/:identity", gaslogic.GetGasorderContract)
contract.PUT("/:identity", gaslogic.UpdateGasorderContract)
contract.POST("/:identity/activate", gaslogic.ActivateGasorderContract)
contract.POST("/:identity/renew", gaslogic.RenewGasorderContract)
contract.POST("/:identity/terminate", gaslogic.TerminateGasorderContract)
contractProduct := group.Group("/gasorder_contract_product")
contractProduct.GET("", gaslogic.ListGasorderContractProduct)
contractProduct.POST("", gaslogic.BindGasorderContractProduct)
contractProduct.POST("/:identity/unbind", gaslogic.UnbindGasorderContractProduct)
group.GET("/gasorder_contract_revision", gaslogic.ListGasorderContractRevision)
group.GET("/product_info", gaslogic.ListContractProductCandidate)
order := group.Group("/gasorder_basic")
order.GET("", gaslogic.ListGasorderBasic)
order.POST("", gaslogic.CreateGasorderBasic)
order.GET("/:identity", gaslogic.GetGasorderBasic)
order.POST("/:identity/assign", gaslogic.AssignGasorderBasic)
order.POST("/:identity/filling", gaslogic.GasorderStartFilling)
order.POST("/:identity/ready", gaslogic.GasorderReady)
order.POST("/:identity/exception", gaslogic.GasorderException)
order.POST("/:identity/recover", gaslogic.GasorderRecover)
order.POST("/:identity/cancel", gaslogic.GasorderCancel)
group.GET("/wallet_basic", gaslogic.ListWalletBasic)
group.GET("/wallet_bank", gaslogic.ListWalletBank)
group.GET("/payment_order", gaslogic.ListPaymentOrder)
group.GET("/wallet_record", gaslogic.ListWalletRecord)
group.GET("/payment_refund", gaslogic.ListPaymentRefund)
group.GET("/wallet_apply_cash", gaslogic.ListWalletApplyCash)
group.POST("/wallet_apply_cash", gaslogic.CreateWalletApplyCash)
group.GET("/fin_settlement", gaslogic.ListFinSettlement)
group.GET("/fin_reconciliation", gaslogic.ListFinReconciliation)
ticket := group.Group("/cs_ticket")
ticket.GET("", gaslogic.ListTicket)
ticket.POST("", gaslogic.CreateTicket)
ticket.GET("/:identity", gaslogic.GetTicket)
ticket.PUT("/:identity", gaslogic.UpdateTicket)
ticket.PATCH("/:identity/status", gaslogic.UpdateTicketStatus)
ticket.DELETE("/:identity", gaslogic.ArchiveTicket)
}