fonchain-fiee/pkg/router/artwork.go
2025-02-19 14:24:15 +08:00

137 lines
6.3 KiB
Go

package router
import (
"github.com/fonchain_enterprise/fonchain-main/pkg/middleware"
"github.com/fonchain_enterprise/fonchain-main/pkg/service"
service_artwork "github.com/fonchain_enterprise/fonchain-main/pkg/service/artwork"
"github.com/gin-gonic/gin"
)
func ArtworkRoute(r *gin.RouterGroup) {
noAuth := r.Group("")
auth := r.Group("")
auth.Use(middleware.CheckLogin(service.AccountProvider), middleware.CheckAuth(service.AccountProvider, service.RuleProvider), middleware.AutoLog(service.AccountProvider, service.GrpcLogImpl))
artwork := auth.Group("artwork")
{
artwork.POST("add", service.CreateAwProfile)
artwork.PUT("edit", service.UpdateAwProfile)
artwork.DELETE("del", service.DelAwProfile)
artwork.PUT("market-edit", service.UpdateMarketInfo)
artwork.PUT("ext-data", service.UpdateExtInfo)
artwork.PUT("digi-info", service.DigiInfo)
artwork.PUT("tags", service.AwTags)
artwork.PUT("auth-data", service.AuthData)
artwork.POST("verify-data", service.VerifyData)
artwork.PUT("auth-img", service.AuthImg)
artwork.PUT("storage", service.Storage) // 更新仓储数据
artwork.POST("detail", service.AwDetail)
artwork.POST("storage-info", service.StorageInfo)
artwork.POST("market-info", service.MarketInfo)
artwork.POST("list", service.AwList)
artwork.GET("tag-list", service.AwTagList)
artwork.DELETE("auth-del", service.DelAuthData)
artwork.DELETE("market-del", service.DelMarketData)
artwork.DELETE("storage-del", service.DelStorageData)
artwork.GET("random-hash", service.RandomHash)
artwork.POST("cat-list", service.CatList)
artwork.POST("get-chunk-list", service.GetFileChunkInfo)
artwork.POST("upload-chunk", service.UploadChunk)
artwork.PUT("third-party-edit", service.UpdateThirdParty)
artwork.DELETE("third-party-del", service.DelThirdParty)
artwork.POST("third-party-list", service.ThirdPartyList)
artwork.POST("my-aw-list", service.MyAwList)
artwork.PUT("edit-aw-status", service.EditAwStatus)
artwork.POST("allot-artwork", service.AllotArtwork)
artwork.POST("shelf-no-list", service.ShelfNoList)
artwork.POST("update-copyright", service.UpdateCopyright)
artwork.POST("export-artwork", service.ExportArtwork)
artwork.POST("export-field-list", service.ExportArtworkField)
artwork.POST("update-copyright-info", service.UpdateCopyrightInfo)
artwork.POST("update-transfer-info", service.UpdateTransferInfo)
artwork.POST("transfer-info-list", service.TransferInfoList)
artwork.POST("update-price-run", service.UpdateAwPriceRun)
artwork.POST("download", service.DownloadArtwork)
artwork.POST("download-hash", service.DownloadHash)
artwork.POST("sync-aw-signdate", service.SyncAwSignDate)
artwork.POST("sync-aw-storage", service.SyncAwStorage)
artwork.POST("auth-img-batch", service.AuthImgBatch)
artwork.POST("update-info-with-kv", service.UpdateAwInfoWithKey)
artwork.POST("add-brand", service.AddBrand)
artwork.POST("update-aw-batch", service.UpdateAwBatch)
artwork.POST("verify-list", service.VerifyList)
artwork.POST("sync-artwork-data", service.SyncArtworkData)
artwork.POST("update-aw-comment", service.UpdateAwComment)
artwork.POST("download-tf-image", service.DownloadTfImage)
artwork.POST("count-verify-similar", service.CountVerifySimilar)
artwork.POST("one-query-list", service.OneQueryList)
artwork.POST("one-query-export", service.OneQueryExport)
artwork.POST("one-query-audit", service.ArtworkOneQueryAudit)
artwork.POST("one-query-audit-syncTest", service.SyncArtworkTest)
artwork.POST("filter-list", service.ArtworkFilterList)
artwork.POST("edit-filter", service.ArtworkEditFilter)
artwork.POST("batch-dci-list", service.BatchDciList)
artwork.POST("second-list", service_artwork.SecondArtworkList)
artwork.POST("traditional-to-simplified", service_artwork.TraditionalToSimplified)
artwork.POST("generate-supplement", service_artwork.GenerateSupplement)
}
// 画作服不需要登录的接口
artworkNoLogin := noAuth.Group("artwork")
{
//artworkNoLogin.Use(middleware.AutoLog(service.AccountProvider, service.GrpcLogImpl))
artworkNoLogin.GET("export-artwork", service.ExportArtwork)
artworkNoLogin.POST("nfc-list", service.NfcList)
artworkNoLogin.Any("load-data", service.LoadData)
artworkNoLogin.POST("add-collector", service.AddCollector)
}
{
artwork.POST("rate-list", service_artwork.RateList)
artwork.POST("update-rate-status", service_artwork.UpdateRateStatus)
artwork.POST("scale-info", service_artwork.ScaleInfo)
}
// 比率
{
artwork.POST("repair-list", service_artwork.RepairList)
artwork.POST("repair-update", service_artwork.RepairUpdate)
artwork.POST("repair-del", service_artwork.RepairDel)
artwork.POST("repair-detail", service_artwork.RepairDetail)
artwork.POST("repair-export", service_artwork.RepairExport)
}
//工作台
workbench := auth.Group("workbench")
{
workbench.POST("index-count", service.IndexCount)
workbench.POST("add-shelf", service.AddShelf)
workbench.POST("del-shelf", service.DelShelf)
workbench.POST("shelf-list", service.ShelfList)
workbench.POST("shelf-detail", service.ShelfDetail)
workbench.POST("shelf-add-artwork", service.ShelfAddArtwork)
workbench.POST("artwork-list", service.SimpleArtworkList)
workbench.POST("shelf-drag-artwork", service.ShelfDragArtwork)
workbench.POST("update-aw-shelf", service.UpdateAwShelf)
workbench.POST("exportby-showid", service.ExportByShowId)
workbench.POST("artshow-done", service.ArtShowDone)
workbench.POST("list-show", service.ListShow)
workbench.PUT("aws-storage", service.AwsStorage) //批量更新画作仓储
workbench.POST("schedule-add", service.ScheduleAdd)
workbench.POST("schedule-info", service.ScheduleInfo)
workbench.POST("schedule-list", service.ScheduleList)
workbench.POST("schedule-read", service.ScheduleRead)
workbench.POST("common-seal-list", service.CommonSealList)
workbench.POST("post-batch-art", service.PostBatchArt)
workbench.POST("recheck-artist-list", service.RecheckArtistList)
workbench.POST("recheck-artwork-list", service.RecheckArtworkList)
workbench.POST("recheck-edit", service.RecheckEdit)
workbench.POST("recheck-submit", service.RecheckSubmit)
workbench.POST("submit-info", service.SubmitInfo)
}
artworkShop := auth.Group("artwork-shop")
{
artworkShop.POST("artwork-list", service.AwShopList)
artworkShop.POST("sync-order", service.SyncOrder)
}
}