feat: ad manager
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"lone-services/pkg/log"
|
||||
"lone-services/pkg/modelbase"
|
||||
"lone-services/pkg/utils"
|
||||
"lone-services/pkg/validate"
|
||||
@@ -41,7 +40,7 @@ func (l *StatusLogic) Status(in *ad.StatusReq) (*ad.Response, error) {
|
||||
var info dao.AdStatus
|
||||
m := model.AdModel{}.Init()
|
||||
if err := m.GetOne(w, &info); err != nil {
|
||||
log.Errorf("ad status get: %v", err)
|
||||
l.Errorf("ad status get: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if info.Id < utils.NumberOne {
|
||||
@@ -59,7 +58,7 @@ func (l *StatusLogic) Status(in *ad.StatusReq) (*ad.Response, error) {
|
||||
info.AdminName = adminInfo.Name
|
||||
|
||||
if _, err := m.Edit(w, &info); err != nil {
|
||||
log.Errorf("ad status edit: %v", err)
|
||||
l.Errorf("ad status edit: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user