企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 ``` /** * <b>方法描述:</b> 随机正整数 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-04-04 17:35:55 <br/> * * @param bound 入参|参数范围|int * @param no 出参|随机数|int * @return 1 成功<br/> */ @Component(label = "随机正整数", style = "处理型", type = "同步组件", comment = "产生随机一个[1,bound] 区间内的正整数", version = "1.0.0", deprecated = false, author = "admin", date = "2018-04-04 05:35:55") @InParams(param = { @Param(name = "bound", comment = "区间范围", type = int.class) }) @OutParams(param = { @Param(name = "no", comment = "随机数", type = int.class) }) @Returns(returns = { @Return(id = "1", desp = "成功") }) public static ResultBase P_randomNumber(int bound) { Random r = new Random(); return ResultBase.newSuccessResult(r.nextInt(bound) + 1); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/0e/8a/0e8a68a7e2f900fead17984aefe662ef_1868x890.png) # 参数说明及示例 ## 入口参数 区间范围:设置区间的结束位置,示例: `100` ## 出口参数 随机数:获取区间中的随机数,示例: `__INNER__["result"]`