BusinessAssert

interface BusinessAssert

断言工具类

Functions

Link copied to clipboard
open fun allNonNull(errMsg: String, check: Array<Any>)
所有参数不能为null 错误信息在前
Link copied to clipboard
open fun checkMustParam(object: Array<Any>)
校验必传参数
Link copied to clipboard
open fun collectionSizeGtOne(collection: Collection<out Any>, errorMsg: String)
集合数据大于一个则抛出异常
Link copied to clipboard
open fun ifCollectionEmpty(collection: Collection<out Any>, errorMsg: String)
集合为空则抛出异常
Link copied to clipboard
open fun ifEmpty(object: Any, errorMsg: String)
为空抛出异常
Link copied to clipboard
open fun ifFalse(expression: Boolean, errorMsg: String)
表达式为假则抛出异常
Link copied to clipboard
open fun ifNull(object: Any, errorMsg: String)
对象为空则抛出异常
Link copied to clipboard
open fun ifTrue(expression: Boolean, errorMsg: String)
表达式为真则抛出异常
Link copied to clipboard
open fun <T> linkDataOpt(data: T): T
检查数据是否存在并返回
Link copied to clipboard
open fun paramNotNull(param: Any)
参数不为空
Link copied to clipboard
open fun userDataCheck(belongId: Long, belongCheck: IUserBelongCheck)
数据越权检查