| | |
| | | transaction = dataSourceTransactionManager.getTransaction(def); |
| | | // 获得事务状态 |
| | | }*/ |
| | | checkBtmTypeBeforeSave(btmTypeDTO); |
| | | // checkBtmTypeBeforeSave(btmTypeDTO); |
| | | BtmType btmTypeDO = Optional.ofNullable(BeanUtil.copy(btmTypeDTO, BtmType.class)).orElseGet(BtmType::new); |
| | | btmTypeDO.setBizDomain(btmTypeDTO.getBizDomain()); |
| | | List<BtmTypeLinkAttributesDTO> attributes = btmTypeDTO.getAttributes(); |
| | |
| | | List<BtmTypeAttributeVO> beforeAttributes = btmTypeByOid.getAttributes(); |
| | | // 处理属性,多余的删除,不存在的添加 |
| | | afterAttributes = updateAttributeForBtm(btmTypeByOid.getOid(),beforeAttributes, attributes); |
| | | baseMapper.updateByPrimaryKey(btmTypeDO); |
| | | } |
| | | BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(btmTypeDO); |
| | | //在创建表的时候还需要把默认的字段带上。 |
| | |
| | | List<BtmTypeAttributeVO> voListAdd = btmTypeAttributeService.checkAndInsert(oid, addList, AuthUtil.getUserAccount(), new Date()); |
| | | List<BtmTypeAttributeVO> voListUpdate = btmTypeAttributeService.checkAndUpdate(oid, modifyList, AuthUtil.getUserAccount(), new Date()); |
| | | List<BtmTypeAttributeVO> returnList = new ArrayList<>(); |
| | | returnList.addAll(Objects.requireNonNull(voListAdd)); |
| | | returnList.addAll(Objects.requireNonNull(voListUpdate)); |
| | | if(!CollectionUtils.isEmpty(voListAdd)) { |
| | | returnList.addAll(Objects.requireNonNull(voListAdd)); |
| | | } |
| | | if(!CollectionUtils.isEmpty(voListUpdate)) { |
| | | returnList.addAll(Objects.requireNonNull(voListUpdate)); |
| | | } |
| | | return returnList; |
| | | } |
| | | |