| | |
| | | .getOne(new LambdaQueryWrapper<SerialRule>() |
| | | .eq(SerialRule::getCode, code)); |
| | | if (Objects.isNull(serialRule)) { |
| | | |
| | | throw new CoolException("当前业务:" + code + ",编码规则不存在!!"); |
| | | } |
| | | SerialRuleItemService serialRuleItemService = SpringUtils.getBean(SerialRuleItemService.class); |
| | |
| | | if (Objects.isNull(start) || end == 0) { |
| | | buffer.append(str); |
| | | } else { |
| | | if (str.length() <= (end + start)) { |
| | | if (str.length() < (end + start)) { |
| | | throw new CoolException("截取字符起出字符串长度,请查看规则设定!!"); |
| | | } |
| | | //返回起始位置lenStr开始,终点位置为lenStr + len长度的字符串 |