12345678910111213141516 |
- package material
- import (
- "zhiyuan/models"
- "zhiyuan/pkg/app"
- "zhiyuan/pkg/db"
- )
- var MatItem models.MatItem
- func GetItemList(where map[string]interface{}, fields []string, page app.Page, retVal interface{}) ([]*models.MatItem, error) {
- if page.PageNum > 0 && page.PageSize > 0 {
- where["_limit"] = db.GetOffset(uint(page.PageNum), uint(page.PageSize))
- }
- return MatItem.GetMulti(where, fields, retVal)
- }
|