fujunling
2023-05-26 087511862a295eda0cf808a92f2ed2df348d54ff
Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/AttributeServiceImpl.java
@@ -53,9 +53,6 @@
   private final String REGEXP = "^[A-Za-z]+$";
   @Resource
   private BtmTypeMapper btmTypeMapper;
   @Override
   public boolean deleteLogic(@NotEmpty List<Long> ids) {
      return false;
@@ -86,17 +83,17 @@
    */
   @Override
   public boolean submit(AttributeDTO dto) {
      if (Pattern.compile(REGEXP).matcher(dto.getId()).matches()){
      if (!Pattern.compile(REGEXP).matcher(dto.getId()).matches()){
         throw new VciBaseException("属性名称{0}只能是英文",new Object[]{dto.getId()});
      }
      LambdaQueryWrapper<Attribute> wrapper = Wrappers.<Attribute>query().lambda().eq(Attribute::getId, dto.getId());
      Long count = baseMapper.selectCount((Func.isEmpty(dto.getId())) ? wrapper : wrapper.notIn(Attribute::getId, dto.getId()));
      Long count = baseMapper.selectCount((Func.isEmpty(dto.getOid())) ? wrapper : wrapper.notIn(Attribute::getOid, dto.getOid()));
      if (count > 0L) {
         throw new ServiceException("属性名已存在!");
      }
      Attribute omdAttribute = BeanUtil.copy(dto, Attribute.class);
      Attribute attribute = AttributeWrapper.build().copyBeforeSave(dto);
      CacheUtil.clear(OmdCacheConstant.ATTR_CACHE);
      return saveOrUpdate(omdAttribute);
      return saveOrUpdate(attribute);
   }
   /**