Files
lone-services/services/equipment/internal/logic/apiMaskAddLogic.go
T
zzw 46d3f672bf
CI / changes (push) Successful in 1m30s
CI / ad (push) Successful in 31s
CI / admin (push) Successful in 24s
CI / bff (push) Successful in 31s
CI / chore (push) Successful in 27s
CI / equipment (push) Successful in 21s
CI / express (push) Successful in 23s
CI / factory (push) Successful in 21s
CI / message (push) Successful in 21s
CI / order (push) Successful in 22s
CI / payment (push) Successful in 20s
CI / percutaneous (push) Successful in 20s
CI / product (push) Successful in 20s
CI / record (push) Successful in 19s
CI / sale (push) Successful in 19s
CI / support (push) Successful in 20s
CI / task (push) Successful in 19s
CI / user (push) Successful in 21s
CI / wecom (push) Successful in 22s
feat: device info and bind
2026-10-16 15:36:17 +08:00

37 lines
769 B
Go

package logic
import (
"context"
"lone-services/pkg/utils"
equipment "lone-services/rpc/equipment/pb"
"lone-services/services/equipment/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type ApiMaskAddLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
BaseLogic
}
func NewApiMaskAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApiMaskAddLogic {
return &ApiMaskAddLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
// API
func (l *ApiMaskAddLogic) ApiMaskAdd(in *equipment.ApiMaskAddRequest) (*equipment.Response, error) {
adminInfo := utils.GetUserFromCtx(l.ctx)
if adminInfo.ID < utils.NumberOne {
return l.fail(utils.ErrorNoLoginInfo)
}
return &equipment.Response{}, nil
}