This commit is contained in:
Leufolium 2024-03-07 01:49:37 +08:00
parent 8dfbc2326b
commit 279263fd54
1 changed files with 15 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import (
"service/api/errcode" "service/api/errcode"
"service/api/errs" "service/api/errs"
accountproto "service/api/proto/account/proto" accountproto "service/api/proto/account/proto"
account_cancellationproto "service/api/proto/account_cancellation/proto"
accountrelationproto "service/api/proto/accountrelation/proto" accountrelationproto "service/api/proto/accountrelation/proto"
appconfigproto "service/api/proto/app_config/proto" appconfigproto "service/api/proto/app_config/proto"
bannerproto "service/api/proto/banner/proto" bannerproto "service/api/proto/banner/proto"
@ -100,6 +101,7 @@ var (
_DefaultXxlJob *logic.XxlJob _DefaultXxlJob *logic.XxlJob
_DefaultAppConfig *logic.AppConfig _DefaultAppConfig *logic.AppConfig
_DefaultMomentAuditTask *logic.MomentAuditTask _DefaultMomentAuditTask *logic.MomentAuditTask
_DefaultAccountCancellation *logic.AccountCancellation
) )
type Service struct { type Service struct {
@ -176,6 +178,7 @@ func (s *Service) Init(c any) (err error) {
_DefaultXxlJob = logic.NewXxlJob(store, cfg.XxlJob) _DefaultXxlJob = logic.NewXxlJob(store, cfg.XxlJob)
_DefaultAppConfig = logic.NewAppConfig(store) _DefaultAppConfig = logic.NewAppConfig(store)
_DefaultMomentAuditTask = logic.NewMomentAuditTask(store) _DefaultMomentAuditTask = logic.NewMomentAuditTask(store)
_DefaultAccountCancellation = logic.NewAccountCancellation(store)
return return
} }
@ -2883,3 +2886,15 @@ func (s *Service) OpGetAppConfigListByKey(ctx *gin.Context, req *appconfigproto.
} }
return 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
}