企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 ``` /** * Copyright (c) 2018, com.ylink.,Ltd All Rights Reserved.<br/> * <b>文件名:</b> P_Container.java<br/> * <b>类描述:</b> 容器操作类组件<br/> * * @date 2018-04-12 14:31:53 * @author admin * @version v1.0 */ @ComponentGroup(level = "平台", groupName = "容器操作") public class P_Container { /** * <b>方法描述:</b> 容器变量删除(删除单个key) <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:53:09 <br/> * * @param dict * 入参|变量容器|{@link java.util.Map} * @param varname * 入参|变量名称|{@link java.lang.String} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "容器变量删除(删除单个key)", style = "判断型", type = "同步组件", comment = "删除容器中指定变量", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:53:09") @InParams(param = {@Param(name = "dict", comment = "变量容器", type = java.util.Map.class), @Param(name = "varname", comment = "变量名称", type = java.lang.String.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) public static ResultBase P_delVar(Map dict, String varname) { if (dict == null) return ResultBase.newFailureResult("TPTC2001", "变量容器空(Null)"); if (StringUtil.isEmpty(varname)) return ResultBase.newFailureResult("TPTC2001", "删除变量Key为 空"); dict.remove(varname); return ResultBase.newSuccessResult(); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/4e/2d/4e2d1b7274e24a591a345cde3389b616_1869x890.png) # 参数说明及示例 ## 入口参数 变量容器:一个 Map 对象,示例: `__INNER__` 变量名称:需要删除容器中的变量名称,示例: `"x"`