package data type ChargeGiftTableExtend struct { *ChargeGiftTable extMap map[int][]*ChargeGift } func (this *ChargeGiftTableExtend) init() error { if this.ChargeGiftTable == nil { return nil } this.extMap = map[int][]*ChargeGift{} for _, d := range this.l { this.extMap[d.Type] = append(this.extMap[d.Type], d) } return nil } func (this *ChargeGiftTableExtend) List(tipe int) []*ChargeGift { return this.extMap[tipe] }