多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 组件源码 ``` /** * <b>方法描述:</b> 容器变量赋值(批量) <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2020-12-17 16:16:01 <br/> * * @param dict * 入参|变量容器|{@link java.util.Map} * @param keyvalues * 入参|赋值键值对格式{'key1':value1,'key2':value2}|{@link java.util.Map} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "容器变量赋值(批量)", style = "判断型", type = "同步组件", comment = "给容器当中的多个变量赋值,参数格式{'key1':value1,'key2':value2}", version = "1.0.0", deprecated = false, author = "admin", date = "2020-12-17 04:16:01") @InParams(param = {@Param(name = "dict", comment = "变量容器", type = java.util.Map.class), @Param(name = "keyvalues", comment = "赋值键值对格式{'key1':value1,'key2':value2}", type = java.util.Map.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) @Order(value = 2) public static ResultBase P_setVars(Map dict, Map keyvalues) { if (dict == null) return ResultBase.newFailureResult("TPTC2005", "容器不能为空(Null)"); AppLog.debug("容器变量批量赋值:赋值内容:{}", keyvalues); if (keyvalues != null && !keyvalues.isEmpty()) { dict.putAll(keyvalues); } return ResultBase.newSuccessResult(); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/01/5f/015f3b19a8dfe8ea7ee622b495019a12_1869x892.png) # 参数说明及示例 ## 入口参数 变量容器:一个 Map 对象,示例: `__INNER__` 赋值键值对格式{'key1':value1,'key2':value2}:给容器当中的多个变量赋值,示例: `{ "x":"XX", "y":"YY" }`