This commit is contained in:
2026-04-14 13:37:39 +08:00
parent c4dd44ae89
commit 2334588b26
11 changed files with 342 additions and 85 deletions
+3 -3
View File
@@ -139,7 +139,7 @@ func ApiPurchase(r *gin.RouterGroup) {
for _, b := range binds {
fileIDs = append(fileIDs, b.FileID)
}
var files []models.TabFileInfo_
var files []TabFileInfo_
if len(fileIDs) > 0 {
models.DB.Where("id IN ?", fileIDs).Find(&files)
}
@@ -448,7 +448,7 @@ func ApiPurchase(r *gin.RouterGroup) {
//绑定文件
for i := 0; i < len(jsondata.Photos); i++ {
findFile := models.TabFileInfo_{
findFile := TabFileInfo_{
Sha256: jsondata.Photos[i],
Type: "image",
}
@@ -588,7 +588,7 @@ func ApiPurchase(r *gin.RouterGroup) {
// 重建图片绑定:先删旧,再插新
models.DB.Where("order_id = ?", from.ID).Delete(&TabPurchaseFileBind{})
for _, hash := range from.Photos {
findFile := models.TabFileInfo_{Sha256: hash, Type: "image"}
findFile := TabFileInfo_{Sha256: hash, Type: "image"}
if models.DB.Where(&findFile).First(&findFile).Error == nil {
models.DB.Create(&TabPurchaseFileBind{
OrderID: from.ID,