This commit is contained in:
lwl0608 2024-12-05 00:33:43 +08:00
parent 9970ba8b8e
commit 330ffa3a47
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,9 @@ func (p *Share) GetZoneShareUrl(ctx *gin.Context) (string, error) {
logger.Error("GetValidShareUrl fail, nil, list: %v", util.ToJson(list))
return "", nil
}
if len(list) == 1 {
return list[0].Url, nil
}
doc := list[rand.Intn(len(list))-1]
retUrl := doc.Url
err1 := p.store.IncShareUrlUseCnt(ctx, retUrl)