| | |
| | | */ |
| | | @Override |
| | | public List<BtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException { |
| | | return CollectionUtils.isEmpty(idCollection) ? null : baseMapper.selectList(Wrappers.<BtmType>query().lambda().in(BtmType::getId, idCollection)); |
| | | return CollectionUtils.isEmpty(idCollection) ? null : baseMapper.selectByIdCollection(idCollection); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (btmTypeDTO.getId().length() > 24) { |
| | | throw new VciBaseException("业务类型英文名称不能超过18,目前长度为{0}", new Object[]{btmTypeDTO.getId().length()}); |
| | | } |
| | | List<BtmType> btmTypeDOList = listBtmTypeDOByIdCollection(VciBaseUtil.str2List(btmTypeDTO.getId())); |
| | | List<BtmType> btmTypeDOList = listBtmTypeDOByIdCollection(VciBaseUtil.str2List(btmTypeDTO.getId().toLowerCase(Locale.ROOT))); |
| | | if (!CollectionUtils.isEmpty(btmTypeDOList) && btmTypeDOList.size() > 0) { |
| | | boolean exist = btmTypeDOList.stream().filter(btm -> StringUtils.isNotBlank(btm.getOid())).anyMatch(btm -> !StringUtils.equals(btmTypeDTO.getOid(), btm.getOid())); |
| | | BtmType existBtmType = btmTypeDOList.get(0); |
| | | throw new VciBaseException("业务类型英文名称已经存在(不区分大小写),这个英文名称对应的中文名称为{0},创建人{1},创建时间{2}" |
| | | , new Object[]{existBtmType.getName(), existBtmType.getCreator(), VciDateUtil.date2Str(existBtmType.getCreateTime(), VciDateUtil.DateFormat)}); |
| | | if (exist) { |
| | | throw new VciBaseException("业务类型英文名称已经存在(不区分大小写),这个英文名称对应的中文名称为{0},创建人{1},创建时间{2}" |
| | | , new Object[]{existBtmType.getName(), existBtmType.getCreator(), VciDateUtil.date2Str(existBtmType.getCreateTime(), VciDateUtil.DateFormat)}); |
| | | } |
| | | } |
| | | if (btmTypeDTO.isRevisionFlag()){ |
| | | // 需要控制版本 |