yinbangzhong
2024-07-29 9f78e3b126b15a9b331c3a1a318da1ceea30114c
models/text.go
@@ -10,7 +10,7 @@
   // Word 文字
   Word struct {
      gorm.Model
      Content          string `gorm:"uniqueIndex:locomotive_number_Word;type:varchar(255);not null;default:'';comment:音频名称" json:"content"`         // 文字
      Content          string `gorm:"uniqueIndex:locomotive_number_Word;type:varchar(255);not null;default:'';comment:文字" json:"content"`           // 文字
      LocomotiveNumber string `gorm:"uniqueIndex:locomotive_number_Word;type:varchar(255);not null;default:'';comment:机车号" json:"locomotiveNumber"` // 机车号
   }
@@ -190,7 +190,7 @@
      db      = slf.build()
   )
   if err := db.Count(&total).Error; err != nil {
   if err := db.Where("deleted_at IS NULL").Count(&total).Error; err != nil {
      return records, int(total), fmt.Errorf("find count err: %v", err)
   }
   if slf.PageNum*slf.PageSize > 0 {
@@ -227,7 +227,7 @@
      db      = slf.Orm.Table(slf.TableName()).Where(query, args...)
   )
   if err := db.Count(&total).Error; err != nil {
   if err := db.Where("deleted_at IS NULL").Count(&total).Error; err != nil {
      return records, total, fmt.Errorf("find by query count err: %v", err)
   }
   if slf.PageNum*slf.PageSize > 0 {