ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 组件源码 /** * <b>方法描述:</b> 异步应答 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2020-12-17 16:03:19 <br/> * * @param yfeaddr * 入参|YFE地址(http://ip地址:端口)|{@link java.lang.String} * @param resp * 入参|应答字段列表|{@link Object} * @param syncKey * 入参|同步字段名称|{@link java.lang.String} * @param result * 出参|处理结果|{@link Object} * @return -1 异常<br/> * 1 成功<br/> */ @Component(label = "异步应答", style = "判断型", type = "同步组件", comment = "通过ip+端口调用。异步应答YFE,", version = "1.0.0", deprecated = false, author = "admin", date = "2020-12-17 04:03:19") @InParams(param = {@Param(name = "yfeaddr", comment = "YFE地址(http://ip地址:端口)", type = java.lang.String.class), @Param(name = "resp", comment = "应答字段列表", type = Object.class), @Param(name = "syncKey", comment = "同步字段名称", type = java.lang.String.class)}) @OutParams(param = {@Param(name = "result", comment = "处理结果", type = Object.class)}) @Returns(returns = {@Return(id = "-1", desp = "异常"), @Return(id = "1", desp = "成功")}) @Order(value = 2) public static ResultBase P_syncResponse(String yfeaddr, Object resp, String syncKey) { String strErr = ""; try { yfeaddr = yfeaddr + "/yfaAsyncResp"; java.util.Map mapResp = new java.util.LinkedHashMap(); mapResp.put("syncKey", syncKey); mapResp.put("response", resp); return ResultBase.newSuccessResult(BundleUtil.doPostYfe(yfeaddr, mapResp, 30000, 30000)); } catch (Exception ex) { strErr = ex.getMessage(); } return ResultBase.newExceptionResult("TPTK0002", "syncResponse-异步应答错误," + strErr); } # 交易中组件使用方式 ![](https://img.kancloud.cn/81/19/81190587af95c9c4d5ffd9627c89fdc5_1327x750.jpg) # 参数说明及示例 ## 入口参数 YFE地址(http://ip地址:端口):YFE地址即为通讯前置服务的地址,示例: `"192.168.1.63:5004"` 应答字段列表:请求应答字段列表,根据实际情况设置对应的对象类型,示例: `{"sex":"man","age":"54"}` 同步字段名称:mq等工具需要的同步字段名称,示例: `"field"` ## 出口参数 处理结果:返回通讯前置处理结果,示例: `__INNER__["result"]` > 通过ip+端口调用。异步应答YFE