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

66 lines
3.0 KiB
Go

package router
import (
"github.com/fonchain_enterprise/fonchain-main/pkg/middleware"
"github.com/fonchain_enterprise/fonchain-main/pkg/service"
serviceArtist "github.com/fonchain_enterprise/fonchain-main/pkg/service/artist"
"github.com/gin-gonic/gin"
)
func ArtistRoute(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))
//需要登陆保护
artist := auth.Group("artist")
{
artist.POST("add", service.CreateProfile)
artist.PUT("edit", service.UpdateProfile)
artist.POST("edit-limit", serviceArtist.EditLimit)
artist.POST("detail", service.Detail)
artist.POST("list", service.List)
artist.PUT("media", service.Media)
artist.PUT("indexs", service.Indexs)
artist.PUT("honor", service.Honor)
artist.DELETE("honor-del", service.HonorDel)
artist.POST("list-export", service.ListExport)
artist.POST("export-field-list", service.ExportArtistField)
artist.POST("contract-add", service.ContractAdd)
artist.PUT("contract", service.ContractEdit)
artist.POST("contract-list", service.ContractList)
artist.DELETE("del", service.DelArtist)
artist.POST("idname", service.IdName)
artist.POST("invitation-add", service.InvitationAdd)
artist.POST("invitation-list", service.InvitationList)
artist.POST("invitation-update", service.InvitationUpdate)
artist.POST("invitation-update2", service.InvitationUpdate2)
artist.POST("invitation-del", service.InvitationDel)
artist.POST("invitation-reAdd", service.InvitationReAdd) //重新发起邀请函
artist.POST("download", service.DownloadArtist)
artist.POST("get-cardid-withimg", service.GetCardIdWithImg)
artist.POST("del-contract", service.DelContract)
artist.POST("one-query-list", service.ArtistOneQueryList)
artist.POST("one-query-export", service.ArtistOneQueryExport)
artist.POST("one-query-audit", service.ArtistOneQueryAudit)
artist.POST("one-query-show-time-point", service.ArtistOneQueryShowTimePoint) //未核验的画展再画展时间组件标记红点
artist.POST("send-indexes", service.SendIndexes)
artist.POST("indexes-log", service.IndexesLog)
artist.POST("sync-low-artist", service.BatchUpdLowArtist)
artist.POST("save-low-artist", service.SaveLowArtist)
artist.POST("low-artist-list", service.LowArtistList)
artist.POST("base-info", service.ArtistBaseInfo)
artist.POST("base-info-list", service.ArtistBaseList)
artist.POST("black-list-update", serviceArtist.BlackListUpdate)
artist.POST("black-list", serviceArtist.BlackList)
artist.POST("search-list", service.SearchList)
artist.POST("update-contract", serviceArtist.UpdateContract)
}
// 画作服不需要登录的接口
artistNoLogin := noAuth.Group("artist")
{
artistNoLogin.POST("invitation-info", service.InvitationInfo)
artistNoLogin.POST("invitation-detail", service.InvitationDetail) //查看邀请函详情
artistNoLogin.GET("list-export", service.ListExport)
}
}