1 Star 0 Fork 0

gabbble / app

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
appGetIflytekKeyLogic.go 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
haozhiyuan0204 提交于 2023-11-08 14:34 . modify
package logic
import (
"context"
"gitee.com/gabbble/comm_pkg/utils"
"gitee.com/gabbble/app/apppb"
"gitee.com/gabbble/app/internal/svc"
"github.com/zeromicro/go-zero/core/logx"
)
type AppGetIflytekKeyLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewAppGetIflytekKeyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AppGetIflytekKeyLogic {
return &AppGetIflytekKeyLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *AppGetIflytekKeyLogic) AppGetIflytekKey(in *apppb.AppGetIflytekKeyReq) (*apppb.AppGetIflytekKeyRsp, error) {
fun := utils.GetSelfFuncName() + " --"
info, err := l.svcCtx.ModelInstAppLflytekKeyInfo.FindOneLatest(l.ctx)
if err != nil {
logx.WithContext(l.ctx).Infof("%s Find Fail: %v, req: %+v", fun, err, in)
return &apppb.AppGetIflytekKeyRsp{
ErrInfo: &apppb.ErrorInfo{
ErrCode: -1,
ErrMsg: err.Error(),
},
}, nil
}
return &apppb.AppGetIflytekKeyRsp{
Data: &apppb.AppGetIflytekKeyData{
AppID: info.AppID,
ApiSecret: info.ApiSecret,
ApiKey: info.ApiKey,
},
}, nil
}
Go
1
https://gitee.com/gabbble/app.git
git@gitee.com:gabbble/app.git
gabbble
app
app
36597e3bdeb3

搜索帮助

53164aa7 5694891 3bd8fe86 5694891