package core import ( "context" "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc" "gitlink.org.cn/JointCloud/pcm-coordinator/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type GetDomainResourceLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewGetDomainResourceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetDomainResourceLogic { return &GetDomainResourceLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *GetDomainResourceLogic) GetDomainResource() (resp *types.DomainResourceResp, err error) { resp = &types.DomainResourceResp{} l.svcCtx.DbEngin.Raw("select * from screen_domain where delete_flag = 0").Scan(&resp.DomainResourceList) return resp, nil }