| | |
| | | // ServiceType 服务方式 |
| | | ServiceType 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"` |
| | | } |
| | | |
| | | // ServiceTypeSearch 服务方式搜索条件 |
| | | ServiceTypeSearch struct { |
| | | ServiceType |
| | | Orm *gorm.DB |
| | | QueryClass constvar.ServiceTypeQueryClass |
| | | KeywordType constvar.ServiceTypeKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | Orm *gorm.DB |
| | | QueryClass constvar.ServiceTypeQueryClass |
| | | KeywordType constvar.ServiceTypeKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | } |
| | | ) |
| | | |
| | |
| | | if total != 0 { |
| | | return nil |
| | | } |
| | | records := []*ServiceType{} |
| | | records := []*ServiceType{ |
| | | {1, "电话"}, |
| | | {2, "远程"}, |
| | | {3, "送修"}, |
| | | {4, "上门"}, |
| | | {5, "其他"}, |
| | | } |
| | | return slf.CreateBatch(records) |
| | | } |