新增APP查询页
This commit is contained in:
		| @@ -40,30 +40,12 @@ func NewQueryServiceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Quer | ||||
| func (l *QueryServiceLogic) QueryService(req *types.QueryServiceReq) (resp *types.QueryServiceResp, err error) { | ||||
| 	if req.AgentIdentifier != "" { | ||||
| 		l.ctx = context.WithValue(l.ctx, "agentIdentifier", req.AgentIdentifier) | ||||
| 		return l.PreprocessLogic(req, req.Product) | ||||
| 	} else if req.App { | ||||
| 		l.ctx = context.WithValue(l.ctx, "app", req.App) | ||||
| 	} | ||||
| 	return l.PreprocessLogic(req, req.Product) | ||||
| } | ||||
|  | ||||
| //func (l *QueryServiceLogic) agentParsing(req *types.QueryServiceReq) (*types.AgentIdentifier, error) { | ||||
| //	key, decodeErr := hex.DecodeString("8e3e7a2f60edb49221e953b9c029ed10") | ||||
| //	if decodeErr != nil { | ||||
| //		return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "查询服务, 获取AES密钥失败: %+v", decodeErr) | ||||
| //	} | ||||
| // | ||||
| //	encrypted, err := crypto.AesDecryptURL(req.Product, key) | ||||
| //	if err != nil { | ||||
| //		return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "查询服务, %v", err) | ||||
| //	} | ||||
| //	var agentIdentifier types.AgentIdentifier | ||||
| //	err = json.Unmarshal(encrypted, &agentIdentifier) | ||||
| //	if err != nil { | ||||
| //		return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "查询服务,反序列化失败 %v", err) | ||||
| //	} | ||||
| //	l.ctx = context.WithValue(l.ctx, "agent", req.Agent) | ||||
| //	return &agentIdentifier, nil | ||||
| //} | ||||
|  | ||||
| var productProcessors = map[string]func(*QueryServiceLogic, *types.QueryServiceReq) (*types.QueryServiceResp, error){ | ||||
| 	"marriage":                         (*QueryServiceLogic).ProcessMarriageLogic, | ||||
| 	"homeservice":                      (*QueryServiceLogic).ProcessHomeServiceLogic, | ||||
| @@ -1387,7 +1369,8 @@ func (l *QueryServiceLogic) CacheData(params map[string]interface{}, Product str | ||||
|  | ||||
| func (l *QueryServiceLogic) GetOrCreateUser(mobile string) (int64, error) { | ||||
| 	agentIdentifier, ok := l.ctx.Value("agentIdentifier").(string) | ||||
| 	if !ok || agentIdentifier == "" { | ||||
| 	app, appOk := l.ctx.Value("app").(bool) | ||||
| 	if (!ok || agentIdentifier == "") && (!appOk || app == false) { | ||||
| 		// 不是代理查询 | ||||
| 		userID, getUidErr := ctxdata.GetUidFromCtx(l.ctx) | ||||
| 		if getUidErr != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user