f458e00431
CI / changes (push) Successful in 38s
CI / ad (push) Successful in 46s
CI / admin (push) Successful in 47s
CI / bff (push) Successful in 3s
CI / chore (push) Successful in 49s
CI / equipment (push) Successful in 52s
CI / express (push) Successful in 48s
CI / factory (push) Successful in 48s
CI / message (push) Failing after 5s
CI / payment (push) Successful in 42s
CI / product (push) Successful in 48s
CI / record (push) Successful in 50s
CI / sale (push) Successful in 51s
CI / task (push) Successful in 47s
CI / user (push) Successful in 48s
CI / wecom (push) Successful in 46s
36 lines
759 B
Go
36 lines
759 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
"lone-services/pkg/utils"
|
|
|
|
"lone-services/rpc/equipment/pb"
|
|
"lone-services/services/equipment/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type ApiBindItemsLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
BaseLogic
|
|
}
|
|
|
|
func NewApiBindItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ApiBindItemsLogic {
|
|
return &ApiBindItemsLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
func (l *ApiBindItemsLogic) ApiBindItems(in *equipment.EmptyRequest) (*equipment.Response, error) {
|
|
adminInfo := utils.GetUserFromCtx(l.ctx)
|
|
if adminInfo.ID < utils.NumberOne {
|
|
return l.fail(utils.ErrorNoLoginInfo)
|
|
}
|
|
|
|
return &equipment.Response{}, nil
|
|
}
|