25 lines
745 B
Go
25 lines
745 B
Go
package complete
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
"sundynix-micro-go/app/plant/api/internal/svc"
|
|
"sundynix-micro-go/app/plant/api/internal/types"
|
|
plantPb "sundynix-micro-go/app/plant/rpc/plant"
|
|
)
|
|
|
|
type GetLevelConfigDetailLogic struct {
|
|
logx.Logger
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
}
|
|
|
|
func NewGetLevelConfigDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetLevelConfigDetailLogic {
|
|
return &GetLevelConfigDetailLogic{Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx}
|
|
}
|
|
|
|
func (l *GetLevelConfigDetailLogic) GetLevelConfigDetail(req *types.IdPathReq) (*plantPb.LevelConfigInfo, error) {
|
|
return l.svcCtx.PlantRpc.GetLevelConfigDetail(l.ctx, &plantPb.IdReq{Id: req.Id})
|
|
}
|