package router import ( "github.com/fonchain_enterprise/fonchain-main/pkg/middleware" "github.com/fonchain_enterprise/fonchain-main/pkg/service" service_copyright "github.com/fonchain_enterprise/fonchain-main/pkg/service/copyright" "github.com/gin-gonic/gin" ) func CopyrightRoute(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)) copyrightAuth := auth.Group("copyright") { copyrightAuth.POST("create-aw-dci", service_copyright.CreateArtworkDci) copyrightAuth.POST("aw-additional-info", service_copyright.AwAdditionalInfo) copyrightAuth.POST("list", service_copyright.CopyrightList) copyrightAuth.POST("detail", service_copyright.CopyrightDetail) copyrightAuth.POST("del", service_copyright.DeleteCopyright) copyrightAuth.POST("schedule", service_copyright.CopyrightSchedule) copyrightAuth.POST("status-info", service_copyright.CopyrightStatusInfo) copyrightAuth.POST("dci-retry", service_copyright.RetryDigitalRegister) //补正申请 copyrightAuth.POST("dci-content-info", service_copyright.DciContentInfo) //查询申领信息 copyrightAuth.POST("dci-registration", service_copyright.DciRegistration) //数登申请 copyrightAuth.POST("dci-query-registration", service_copyright.DciQueryRegistration) //查询数登申请 copyrightAuth.POST("dci-pay-url", service_copyright.DciGetPayUrl) //获取支付链接 copyrightAuth.POST("dci-pay-query", service_copyright.DciGetPayQuery) // 查询支付结果 copyrightAuth.POST("dci-cert", service_copyright.DciGetRegistrationCert) // 获取数登证书 copyrightAuth.POST("dci-close", service_copyright.CloseDigitalRegister) copyrightAuth.POST("dci-update-user", service_copyright.UpdateUser) // copyrightAuth.POST("dci-user-info", service_copyright.DciUserInfo) // copyrightAuth.POST("data-summary", service_copyright.DataSummary) // copyrightAuth.POST("category-data-summary", service_copyright.CategoryDataSummary) // copyrightAuth.POST("category-day-summary", service_copyright.CategoryDaySummary) // copyrightAuth.POST("all-status-info", service_copyright.AllStatusInfo) // copyrightAuth.POST("batch-dci", service_copyright.BatchDci) //批量申请 copyrightAuth.POST("update-supplement", service_copyright.UpdateSupplement) // 版权补充 copyrightAuth.POST("copyright-info", service_copyright.CopyrightInfo) // 版权详情 copyrightAuth.POST("supplement-detail", service_copyright.SupplementDetail) // 版权详情 copyrightAuth.POST("supplement-list", service_copyright.SupplementList) copyrightAuth.POST("refresh-copyright", service_copyright.RefreshCopyright) copyrightAuth.POST("update-payinfo-result", service_copyright.UpdatePayInfoResult) } copyrightNoAuth := noAuth.Group("copyright") { copyrightNoAuth.POST("no-auth-dci-content-info", service_copyright.DciContentInfo) copyrightNoAuth.POST("no-auth-dci-query-registration", service_copyright.DciQueryRegistration) //查询数登申请 copyrightNoAuth.POST("unpack-callback", service_copyright.UnpackCallback) //查询数登申请 copyrightNoAuth.POST("test", service_copyright.Test) //查询数登申请 } //软件版权登记 softwareAuth := auth.Group("software") { softwareAuth.POST("save-copyright", service_copyright.SaveSoftwareCopyright) softwareAuth.POST("list", service_copyright.SoftwareCopyrightList) softwareAuth.POST("delete", service_copyright.DelSoftwareCopyright) } //商标管理 trademarkAuth := auth.Group("trademark") { trademarkAuth.POST("save-trademark", service_copyright.SaveTrademark) trademarkAuth.POST("list", service_copyright.TrademarkList) trademarkAuth.POST("delete", service_copyright.DelTrademark) } }