feat: ad manager
This commit is contained in:
@@ -3,7 +3,6 @@ package logic
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"lone-services/pkg/log"
|
||||
"lone-services/pkg/modelbase"
|
||||
"lone-services/pkg/utils"
|
||||
"lone-services/pkg/validate"
|
||||
@@ -63,7 +62,7 @@ func (l *VerifyStatusLogic) verifyStatus(expectStatus uint8, in *product.VerifyS
|
||||
}
|
||||
err := model.VerifyModel{}.Init().GetOne(w, &info)
|
||||
if err != nil {
|
||||
log.Errorf("verify status get: %v", err)
|
||||
l.Errorf("verify status get: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if info.Id < 1 {
|
||||
@@ -89,7 +88,7 @@ func (l *VerifyStatusLogic) verifyStatus(expectStatus uint8, in *product.VerifyS
|
||||
var productExist dao.ProductCheckExist
|
||||
err = model.ProductModel{}.Init().GetOne(productWhere, &productExist)
|
||||
if err != nil {
|
||||
log.Errorf("verify product get: %v", err)
|
||||
l.Errorf("verify product get: %v", err)
|
||||
return failResponse(utils.Fail), nil
|
||||
}
|
||||
if productExist.Id < 1 {
|
||||
@@ -133,7 +132,7 @@ func (l *VerifyStatusLogic) verifyStatus(expectStatus uint8, in *product.VerifyS
|
||||
if nextStatus == dao.VerifyStatusPass {
|
||||
var content dao.ProductVerify
|
||||
if err := jsoniter.Unmarshal([]byte(info.Content), &content); err != nil {
|
||||
log.Errorf("product verify content json: %v content=%s", err, info.Content)
|
||||
l.Errorf("product verify content json: %v content=%s", err, info.Content)
|
||||
return err
|
||||
}
|
||||
_, err := pm.Edit(productWhere, &dao.ProductVerifySecondOkStatus{
|
||||
@@ -164,7 +163,7 @@ func (l *VerifyStatusLogic) verifyStatus(expectStatus uint8, in *product.VerifyS
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
log.Errorf("verify status tx: %v", err)
|
||||
l.Errorf("verify status tx: %v", err)
|
||||
if isJSONError(err) {
|
||||
return failResponse(utils.ErrorFormatDataError), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user