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"
|
||||
@@ -42,7 +41,7 @@ func (l *EditApplyLogic) EditApply(in *product.EditApplyReq) (*product.Response,
|
||||
Eq: map[string]string{"id": strconv.FormatInt(req.Id, 10)},
|
||||
}, &exist)
|
||||
if err != nil {
|
||||
log.Errorf("edit apply product get: %v", err)
|
||||
l.Errorf("edit apply product get: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if exist.Id < 1 {
|
||||
@@ -57,7 +56,7 @@ func (l *EditApplyLogic) EditApply(in *product.EditApplyReq) (*product.Response,
|
||||
|
||||
info, err := apply.Get(l.ctx, adminId, int(req.Id))
|
||||
if err != nil {
|
||||
log.Errorf("edit apply get: %v", err)
|
||||
l.Errorf("edit apply get: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if info.Status == dao.ApplyStatusWaitPass || info.Status == dao.ApplyStatusDone {
|
||||
@@ -65,7 +64,7 @@ func (l *EditApplyLogic) EditApply(in *product.EditApplyReq) (*product.Response,
|
||||
}
|
||||
|
||||
if err = apply.Set(l.ctx, adminId, int(req.Id), req.Reason); err != nil {
|
||||
log.Errorf("edit apply set: %v", err)
|
||||
l.Errorf("edit apply set: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
|
||||
@@ -84,7 +83,7 @@ func (l *EditApplyLogic) EditApplyPass(in *product.EditApplyPassReq) (*product.R
|
||||
Eq: map[string]string{"id": strconv.FormatInt(req.Id, 10)},
|
||||
}, &exist)
|
||||
if err != nil {
|
||||
log.Errorf("edit apply pass product get: %v", err)
|
||||
l.Errorf("edit apply pass product get: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if exist.Id < 1 {
|
||||
@@ -101,7 +100,7 @@ func (l *EditApplyLogic) EditApplyPass(in *product.EditApplyPassReq) (*product.R
|
||||
if apply.IsAlreadyHandled(err) {
|
||||
return outResponse(utils.Fail, err.Error()), nil
|
||||
}
|
||||
log.Errorf("edit apply pass: %v", err)
|
||||
l.Errorf("edit apply pass: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user