企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 ``` /** * <b>方法描述:</b> 是否为0 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-05-11 11:49:33 <br/> * * @param amt * 入参|输入金额|{@link Object} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "是否为0", style = "判断型", type = "同步组件", comment = "判断输入金额是否为0", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-11 11:49:33") @InParams(param = {@Param(name = "amt", comment = "输入金额", type = Object.class)}) @Returns(returns = {@Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功")}) public static ResultBase P_isZero(Object amt) { BigDecimal d = transform(amt); if (d == null) return ResultBase.newFailureResult("TPTA0006", "输入不是合法金额数据,输入数据:" + amt); if (d.compareTo(BigDecimal.ZERO) != 0) { return ResultBase.newFailureResult("TPTA0006", "输入金额不为0:" + amt); } else { return ResultBase.newSuccessResult(); } } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/12/5b/125b6b35b46e7ba39dbd0d1223a598e8_1869x864.png) # 参数说明及示例 ## 入口参数 输入金额:输入一个数值型参数,示例: `0`