🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 组件源码 ``` /** * <b>方法描述:</b> 字符串连接 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-08 18:15:36 <br/> * * @param list * 入参|待连接列表|{@link com.ylink.ide.trade.runtime.context.JavaList} * @param concatStr * 入参|连接符|{@link java.lang.String} * @param newStr * 出参|连接后字符串|{@link java.lang.String} * @return -1 异常<br/> * 1 成功<br/> */ @Component(label = "字符串连接", style = "判断型", type = "同步组件", comment = "将字符串列表用连接字符连接成字符串", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-08 06:15:36") @InParams(param = { @Param(name = "list", comment = "待连接列表", type = com.ylink.ide.trade.runtime.context.JavaList.class), @Param(name = "concatStr", comment = "连接符", type = java.lang.String.class) }) @OutParams(param = { @Param(name = "newStr", comment = "连接后字符串", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "-1", desp = "异常"), @Return(id = "1", desp = "成功") }) public static ResultBase P_concat(JavaList list, String concatStr) { try { return ResultBase .newSuccessResult(StringUtil.join(list, concatStr)); } catch (Exception e) { AppLog.error(e); } return ResultBase.newExceptionResult("TPTS1013", "参数错误,不能拼接,list=" + list + ",连接符=" + concatStr); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/c4/a1/c4a13b4b56c30dfc817d6eedac8ff880_1870x891.png) # 参数说明及示例 ## 入口参数 待连接列表:字符串列表,示例: `["你好","世界"]` 连接符:连接字符串的字符,示例: `","` ## 出口参数 连接后字符串:经过连接后的字符串,示例: `__INNER__["result"]`