add 3 new api
This commit is contained in:
@@ -1330,16 +1330,16 @@ func (l *QueryServiceLogic) VerifyCode(mobile string, code string) error {
|
||||
|
||||
// 二、三要素验证
|
||||
func (l *QueryServiceLogic) Verify(Name string, IDCard string, Mobile string) error {
|
||||
agent, ok := l.ctx.Value("agent").(bool)
|
||||
if !ok {
|
||||
agent = false
|
||||
}
|
||||
if !l.svcCtx.Config.SystemConfig.ThreeVerify || agent {
|
||||
//agent, ok := l.ctx.Value("agent").(bool)
|
||||
//if !ok {
|
||||
// agent = false
|
||||
//}
|
||||
if !l.svcCtx.Config.SystemConfig.ThreeVerify {
|
||||
twoVerification := service.TwoFactorVerificationRequest{
|
||||
Name: Name,
|
||||
IDCard: IDCard,
|
||||
}
|
||||
verification, err := l.svcCtx.VerificationService.TwoFactorVerification(twoVerification)
|
||||
verification, err := l.svcCtx.VerificationService.TwoFactorVerificationWest(twoVerification)
|
||||
if err != nil {
|
||||
return errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "二要素验证失败: %v", err)
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ func NewQuerySingleTestLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Q
|
||||
}
|
||||
|
||||
func (l *QuerySingleTestLogic) QuerySingleTest(req *types.QuerySingleTestReq) (resp *types.QuerySingleTestResp, err error) {
|
||||
featrueModel, err := l.svcCtx.FeatureModel.FindOneByApiId(l.ctx, req.Api)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "单查测试, 获取接口失败 : %d", err)
|
||||
}
|
||||
//featrueModel, err := l.svcCtx.FeatureModel.FindOneByApiId(l.ctx, req.Api)
|
||||
//if err != nil {
|
||||
// return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "单查测试, 获取接口失败 : %d", err)
|
||||
//}
|
||||
marshalParams, err := json.Marshal(req.Params)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "单查测试, 序列化参数失败 : %d", err)
|
||||
@@ -46,6 +46,6 @@ func (l *QuerySingleTestLogic) QuerySingleTest(req *types.QuerySingleTestReq) (r
|
||||
}
|
||||
return &types.QuerySingleTestResp{
|
||||
Data: respData,
|
||||
Api: featrueModel.Name,
|
||||
Api: req.Api,
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user