Merge pull request 'd' (#159) from feat-IRONFANS-62-Robin into test

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/159
This commit is contained in:
chenhao 2024-03-07 01:50:04 +08:00
commit dcf617df52
1 changed files with 15 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import (
"service/api/errcode"
"service/api/errs"
accountproto "service/api/proto/account/proto"
account_cancellationproto "service/api/proto/account_cancellation/proto"
accountrelationproto "service/api/proto/accountrelation/proto"
appconfigproto "service/api/proto/app_config/proto"
bannerproto "service/api/proto/banner/proto"
@ -100,6 +101,7 @@ var (
_DefaultAppConfig *logic.AppConfig
_DefaultXxlJob *logic.XxlJob
_DefaultMomentAuditTask *logic.MomentAuditTask
_DefaultAccountCancellation *logic.AccountCancellation
)
type Service struct {
@ -176,6 +178,7 @@ func (s *Service) Init(c any) (err error) {
_DefaultAppConfig = logic.NewAppConfig(store)
_DefaultXxlJob = logic.NewXxlJob(store, cfg.XxlJob)
_DefaultMomentAuditTask = logic.NewMomentAuditTask(store)
_DefaultAccountCancellation = logic.NewAccountCancellation(store)
return
}
@ -2883,3 +2886,15 @@ func (s *Service) OpGetAppConfigListByKey(ctx *gin.Context, req *appconfigproto.
}
return
}
// AccountCancellation
func (s *Service) OpGetAccountCancellationList(ctx *gin.Context, req *account_cancellationproto.OpListReq) (list []*dbstruct.AccountCancellation, ec errcode.ErrCode) {
ec = errcode.ErrCodeAccountCancellationSrvOk
list, err := _DefaultAccountCancellation.OpList(ctx, req)
if err != nil {
logger.Error("OpGetAccountCancellationList fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeAccountCancellationSrvFail
return
}
return
}