ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 组件源码 ``` /** * <b>方法描述:</b> 容器变量获取(批量) <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:54:00 <br/> * * @param map * 入参|容器|{@link java.util.Map} * @param keys * 入参|字段列表|{@link com.ylink.ide.trade.runtime.context.JavaList} * @param values * 出参|值列表|{@link com.ylink.ide.trade.runtime.context.JavaList} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "容器变量获取(批量)", style = "判断型", type = "同步组件", comment = "获取指定容中多个列表key对应的值。反回key顺序对应的valueList", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:54:00") @InParams(param = {@Param(name = "map", comment = "容器", type = java.util.Map.class), @Param(name = "keys", comment = "字段列表", type = List.class)}) @OutParams(param = {@Param(name = "values", comment = "值列表", type = List.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) public static ResultBase P_getValues(Map map, List keys) { AppLog.debug("批量获取容器变量:keys={}", keys); JavaList values = new JavaList(); if (map != null && keys != null && !keys.isEmpty()) { for (Object obj : keys) { String key = obj.toString(); values.add(map.get(key)); } } return ResultBase.newSuccessResult(values); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/c6/04/c604dc9aceddba91049e99f1bca1d30a_1869x891.png) # 参数说明及示例 ## 入口参数 容器:一个 Map 对象,示例: `__INNER__` 字段列表:容器中的 key 值列表,示例: `["id","name"]` ## 出口参数 值列表:返回 key 对应的值列表,示例: `__INNER__["result"]`