| | |
| | | // CourierCompany 物流公司 |
| | | CourierCompany 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"` |
| | | } |
| | | |
| | | // CourierCompanySearch 物流公司搜索条件 |
| | | CourierCompanySearch struct { |
| | | CourierCompany |
| | | Orm *gorm.DB |
| | | QueryClass constvar.CourierCompanyQueryClass |
| | | KeywordType constvar.CourierCompanyKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | Orm *gorm.DB |
| | | QueryClass constvar.CourierCompanyQueryClass |
| | | KeywordType constvar.CourierCompanyKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | } |
| | | ) |
| | | |
| | |
| | | if total != 0 { |
| | | return nil |
| | | } |
| | | records := []*CourierCompany{} |
| | | records := []*CourierCompany{ |
| | | {1, "顺丰"}, |
| | | {2, "德邦"}, |
| | | {3, "中远海运"}, |
| | | } |
| | | return slf.CreateBatch(records) |
| | | } |