Package icu.easyj.core.util.shortcode
Interface IShortCodeService
- All Known Implementing Classes:
DefaultShortCodeServiceImpl,MinIdShortCodeServiceImpl,MinLengthShortCodeServiceImpl
public interface IShortCodeService
long型ID 与 短字符串 互相转换的服务类
用途:邀请码、短链接码、...等等
- Author:
- wangliang181230
-
Method Summary
-
Method Details
-
toCode
long型ID 转换为 短字符串- Parameters:
id- ID(必须大于等于0)- Returns:
- 短字符串
- Throws:
IllegalArgumentException- ID为null 或 ID小于0
-
toId
短字符串 转换为 long长整形ID- Parameters:
shortCode- 短字符串- Returns:
- 原ID
- Throws:
IllegalArgumentException- shortCode为null
-