修改文件表的名字
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user