| | |
| | | } |
| | | |
| | | @Override |
| | | public Boolean add(ServiceDonateorganBaseVO serviceDonateorganBaseVO) { |
| | | public long add(ServiceDonateorganBaseVO serviceDonateorganBaseVO) { |
| | | ServiceDonateorganBase serviceDonateorganBase = DtoConversionUtils.sourceToTarget(serviceDonateorganBaseVO, ServiceDonateorganBase.class); |
| | | boolean save = false; |
| | | if (ObjectUtils.isNotEmpty(serviceDonateorganBase)) { |
| | |
| | | } |
| | | } |
| | | |
| | | return save; |
| | | return serviceDonateorganBase.getId(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | b = updateById(serviceDonateorganBase); |
| | | if (b == true && CollectionUtils.isNotEmpty(serviceDonateorganBaseVO.getServiceDonateorganList())) { |
| | | for (ServiceDonateorgan serviceDonateorgan : serviceDonateorganBaseVO.getServiceDonateorganList()) { |
| | | serviceDonateorganMapper.updateById(serviceDonateorgan); |
| | | if(ObjectUtils.isNotEmpty(serviceDonateorgan.getId()) ) { |
| | | serviceDonateorganMapper.updateById(serviceDonateorgan); |
| | | }else { |
| | | serviceDonateorganMapper.insert(serviceDonateorgan); |
| | | } |
| | | } |
| | | } |
| | | } |