修改文件表的名字

This commit is contained in:
2026-04-28 16:43:40 +08:00
parent 5d9d73cb56
commit 3610f489f4
5 changed files with 27 additions and 27 deletions
+3 -3
View File
@@ -180,7 +180,7 @@ func ApiPurchase(r *gin.RouterGroup) {
for _, b := range binds {
fileIDs = append(fileIDs, b.FileID)
}
var files []TabFileInfo_
var files []TabFileInfo
if len(fileIDs) > 0 {
models.DB.Where("id IN ?", fileIDs).Find(&files)
}
@@ -585,7 +585,7 @@ func ApiPurchase(r *gin.RouterGroup) {
//绑定文件
for i := 0; i < len(jsondata.Photos); i++ {
findFile := TabFileInfo_{
findFile := TabFileInfo{
Sha256: jsondata.Photos[i],
Type: "image",
}
@@ -731,7 +731,7 @@ func ApiPurchase(r *gin.RouterGroup) {
// 重建图片绑定:先删旧,再插新
models.DB.Where("order_id = ?", from.ID).Delete(&TabPurchaseFileBind{})
for _, hash := range from.Photos {
findFile := 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,