feat: ad manager
This commit is contained in:
@@ -3,7 +3,6 @@ package logic
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"lone-services/pkg/log"
|
||||
"lone-services/pkg/modelbase"
|
||||
"lone-services/pkg/utils"
|
||||
"lone-services/pkg/validate"
|
||||
@@ -63,7 +62,7 @@ func (l *CreateLogic) Create(in *product.CreateReq) (*product.Response, error) {
|
||||
Eq: map[string]string{"name": req.Name},
|
||||
}, &check)
|
||||
if err != nil {
|
||||
log.Errorf("check product name: %v", err)
|
||||
l.Errorf("check product name: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if check.Id > 0 {
|
||||
@@ -148,7 +147,7 @@ func (l *CreateLogic) Create(in *product.CreateReq) (*product.Response, error) {
|
||||
return model.VerifyModel{}.Init().WithTX(tx).Create(&verify)
|
||||
})
|
||||
if err != nil {
|
||||
log.Errorf("create product: %v", err)
|
||||
l.Errorf("create product: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user