feat(media-supply): resource cache sync and order flow refinements
Add a resource cache sync entrypoint (RunMediaResourceSyncOnce) driven by the new scheduler job, and rework the backlink/sync worker around it. Tune the meijiequan client and slow the default backlink sync interval from 10m to 30m to reduce upstream pressure. Trim unused public/transport surface (handler + router + swagger) and simplify admin-web order management and ops-web media-supply views, dropping stale shared-types fields.
This commit is contained in:
@@ -241,15 +241,6 @@ func (h *MediaSupplyHandler) SessionStatus(c *gin.Context) {
|
||||
response.Success(c, data)
|
||||
}
|
||||
|
||||
func (h *MediaSupplyHandler) SyncBacklinks(c *gin.Context) {
|
||||
data, err := h.svc.SyncBacklinks(c.Request.Context())
|
||||
if err != nil {
|
||||
response.Error(c, err)
|
||||
return
|
||||
}
|
||||
response.Success(c, data)
|
||||
}
|
||||
|
||||
func parseOptionalIntQuery(c *gin.Context, key string) (int, error) {
|
||||
raw := c.Query(key)
|
||||
if raw == "" {
|
||||
|
||||
@@ -116,7 +116,6 @@ func RegisterRoutes(app *bootstrap.App) {
|
||||
mediaSupply.PUT("/resources/:id/price", mediaSupplyHandler.SetResourcePrice)
|
||||
mediaSupply.POST("/orders", middleware.RequireCurrentBrand(), mediaSupplyHandler.CreateOrder)
|
||||
mediaSupply.GET("/orders", mediaSupplyHandler.ListOrders)
|
||||
mediaSupply.POST("/orders/sync-backlinks", mediaSupplyHandler.SyncBacklinks)
|
||||
mediaSupply.GET("/orders/:id", mediaSupplyHandler.GetOrder)
|
||||
mediaSupply.GET("/wallet", mediaSupplyHandler.WalletStatus)
|
||||
mediaSupply.GET("/wallet/ledgers", mediaSupplyHandler.ListWalletLedgers)
|
||||
|
||||
Reference in New Issue
Block a user