25 lines
420 B
Go
25 lines
420 B
Go
package service
|
|
|
|
import (
|
|
"f5"
|
|
"main/model"
|
|
"main/constant"
|
|
)
|
|
|
|
type bag struct {
|
|
|
|
}
|
|
|
|
func (this *bag) init() {
|
|
}
|
|
|
|
func (this *bag) unInit() {
|
|
}
|
|
|
|
func (this *bag) List(accountId string) (error, []*model.Bag) {
|
|
bags := []*model.Bag{}
|
|
result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Table(new(model.Bag).TableName()).Where(
|
|
"account_id = ? AND item_num > ?", accountId, 0).Find(&bags)
|
|
return result.Error, bags
|
|
}
|