コード例 #1
0
ファイル: sale_service.go プロジェクト: yonglehou/go2o
func (this *saleService) setChild(list []sale.ICategory, dst *sale.Category) {
	for _, v := range list {
		if vv := v.GetValue(); vv.ParentId == dst.Id && vv.Enabled == 1 {
			if dst.Child == nil {
				dst.Child = []*sale.Category{}
			}
			vv.Icon = format.GetResUrl(vv.Icon)
			dst.Child = append(dst.Child, vv)
		}
	}
}