wangpengfei
2023-08-18 104db2ea4e4c76ed83e04b5ea7f9d427d16474a0
model/faultType.go
@@ -12,18 +12,18 @@
   // FaultType 故障类别
   FaultType struct {
      Id   int    `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
      Name   string    `json:"name" gorm:"column:name"`
      Name string `json:"name" gorm:"column:name"`
   }
   // FaultTypeSearch 故障类别搜索条件
   FaultTypeSearch struct {
      FaultType
      Orm *gorm.DB
        QueryClass  constvar.FaultTypeQueryClass
        KeywordType constvar.FaultTypeKeywordType
        Keyword     string
        PageNum  int
        PageSize int
      Orm         *gorm.DB
      QueryClass  constvar.FaultTypeQueryClass
      KeywordType constvar.FaultTypeKeywordType
      Keyword     string
      PageNum     int
      PageSize    int
   }
)
@@ -130,6 +130,13 @@
   if total != 0 {
      return nil
   }
   records := []*FaultType{}
   records := []*FaultType{
      {1, "设备安装"},
      {2, "设备调教"},
      {3, "设备升级"},
      {4, "电气故障"},
      {5, "设备故障"},
      {6, "设备良品率低"},
   }
   return slf.CreateBatch(records)
}