package service import ( "context" "gof_ppw_api/internal/dao" ) var Fund = new(FundService) type FundService struct { Service } // List 基金列表 func (p *FundService) List() { } // Detail 特定基金详情 func (p *FundService) Detail(ctx context.Context, fundId string) (m interface{}, err error) { one, err := dao.FundInformation.Ctx(ctx). Where("fund_id", fundId). Fields("fund_id,fund_name,fund_short_name"). One() if err != nil { return nil, err } return one.Map(), nil }