feat: ad manager
This commit is contained in:
@@ -2,7 +2,6 @@ package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"lone-services/pkg/log"
|
||||
"lone-services/pkg/modelbase"
|
||||
"lone-services/pkg/utils"
|
||||
"lone-services/pkg/validate"
|
||||
@@ -50,7 +49,7 @@ func (l *StatusLogic) Status(in *product.StatusReq) (*product.Response, error) {
|
||||
m := model.ProductModel{}.Init()
|
||||
err := m.GetOne(w, &info)
|
||||
if err != nil {
|
||||
log.Errorf("product status get: %v", err)
|
||||
l.Errorf("product status get: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if info.Id < 1 {
|
||||
@@ -69,7 +68,7 @@ func (l *StatusLogic) Status(in *product.StatusReq) (*product.Response, error) {
|
||||
AdminId: int(adminInfo.ID),
|
||||
}
|
||||
if _, err = m.Edit(w, &update); err != nil {
|
||||
log.Errorf("product status edit: %v", err)
|
||||
l.Errorf("product status edit: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user