image: 模拟素材
This commit is contained in:
parent
37b9652006
commit
47c556abc0
@ -218,12 +218,24 @@ func (r *galleryRepository) GetExhibitionsByUser(userID, starID int64) ([]*model
|
||||
return exhibitions, err
|
||||
}
|
||||
|
||||
// CreateExhibition 创建展品展示记录
|
||||
// CreateExhibition 创建展品展示记录(支持软删除后重新展出)
|
||||
// asset_id 唯一索引冲突时:若旧记录已软删除则物理删除后重新插入;否则报错
|
||||
func (r *galleryRepository) CreateExhibition(exhibition *models.Exhibition) error {
|
||||
now := time.Now().UnixMilli()
|
||||
exhibition.CreatedAt = now
|
||||
exhibition.UpdatedAt = now
|
||||
return r.db.Create(exhibition).Error
|
||||
exhibition.DeletedAt = nil
|
||||
|
||||
// 在事务中:先物理删除已软删除的旧记录,再插入新记录
|
||||
return r.db.Transaction(func(tx *gorm.DB) error {
|
||||
if err := tx.Exec(`
|
||||
DELETE FROM exhibitions
|
||||
WHERE asset_id = ? AND deleted_at IS NOT NULL
|
||||
`, exhibition.AssetID).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return tx.Create(exhibition).Error
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteExhibition 软删除展品展示记录(根据ID)
|
||||
|
||||
BIN
frontend/static/sucai/ChatGPT一键生成_1_Grace Sim_来自小红书网页版.jpg
Normal file
BIN
frontend/static/sucai/ChatGPT一键生成_1_Grace Sim_来自小红书网页版.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 443 KiB |
BIN
frontend/static/sucai/GPT咒語_1_My mind_来自小红书网页版.jpg
Normal file
BIN
frontend/static/sucai/GPT咒語_1_My mind_来自小红书网页版.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 305 KiB |
BIN
frontend/static/sucai/这三组提示词,可以让你你照片美爆朋友圈啊_1_谋为上_来自小红书网页版.jpg
Normal file
BIN
frontend/static/sucai/这三组提示词,可以让你你照片美爆朋友圈啊_1_谋为上_来自小红书网页版.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
@ -1,7 +1,7 @@
|
||||
// API 基础配置
|
||||
const baseURL = 'http://101.132.250.62:8080'
|
||||
// const baseURL = 'http://101.132.250.62:8080'
|
||||
// const baseURL = 'http://192.168.110.60:8080'
|
||||
// const baseURL = 'http://localhost:8080'
|
||||
const baseURL = 'http://localhost:8080'
|
||||
|
||||
// 是否使用模拟数据(开发调试时设为 true,后端API准备好后改为 false)
|
||||
const USE_MOCK_API = false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user