fund.go 578 B

1234567891011121314151617181920212223242526
  1. package controller
  2. import (
  3. "context"
  4. "gof_ppw_api/api"
  5. "gof_ppw_api/internal/service"
  6. )
  7. var Fund = new(FundController)
  8. type FundController struct{}
  9. // List 基金列表
  10. func (p *FundController) List(ctx context.Context, req *api.FundListReq) (res *api.CommonRes, err error) {
  11. return
  12. }
  13. // Detail 基金详情
  14. func (p *FundController) Detail(ctx context.Context, req *api.FundDetailReq) (res api.CommonRes, err error) {
  15. data, err := service.Fund.Detail(ctx, req.FundId)
  16. //g.RequestFromCtx(ctx).Response.WriteJson(data)
  17. res = api.CommonRes{
  18. Data: data,
  19. }
  20. return
  21. }