多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 组件源码 ``` /** * <b>方法描述:</b> 容器变量赋值 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:53:23 <br/> * * @param dict * 入参|变量容器|{@link java.util.Map} * @param varname * 入参|变量名称|{@link java.lang.String} * @param varval * 入参|变量值|{@link java.lang.Object} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "容器变量赋值", style = "判断型", type = "同步组件", comment = "给容器当中的变量赋值", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:53:23") @InParams(param = {@Param(name = "dict", comment = "变量容器", type = java.util.Map.class), @Param(name = "varname", comment = "变量名称", type = java.lang.String.class), @Param(name = "varval", comment = "变量值", type = java.lang.Object.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) public static ResultBase P_setVar(Map dict, String varname, Object varval) { if (dict != null) { dict.put(varname, varval); return ResultBase.newSuccessResult(); } return ResultBase.newFailureResult("TPTC2004", "容器不能为空"); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/e7/f7/e7f77980ff22c7952b8031b50b06bbbe_1867x893.png) # 参数说明及示例 ## 入口参数 变量容器:一个 Map 对象,示例: `__INNER__` 变量名称:容器中需要赋值的变量名称,示例: `"x"` 变量值:变量名称对应的值,示例: `{ "id":1, "name":"XX" }`