|
@@ -67,6 +67,9 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public void add(SupplierVo supplierVo) {
|
|
public void add(SupplierVo supplierVo) {
|
|
|
|
+
|
|
|
|
+ // TODO 创建供应商账号
|
|
|
|
+
|
|
save(supplierVo);
|
|
save(supplierVo);
|
|
|
|
|
|
Long id = supplierVo.getId();
|
|
Long id = supplierVo.getId();
|
|
@@ -159,8 +162,14 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
|
|
|
|
|
supplierBankService.remove(SupplierBank::getSupplierId, id);
|
|
supplierBankService.remove(SupplierBank::getSupplierId, id);
|
|
supplierContactsService.remove(SupplierContacts::getSupplierId, id);
|
|
supplierContactsService.remove(SupplierContacts::getSupplierId, id);
|
|
|
|
+
|
|
|
|
+ List<SupplierKeep> list = supplierKeepService.list(SupplierKeep::getSupplierId, id);
|
|
|
|
+ List<Long> fileList = list.stream().map(SupplierKeep::getFileLinkedId).collect(Collectors.toList());
|
|
|
|
+
|
|
supplierKeepService.remove(SupplierKeep::getSupplierId, id);
|
|
supplierKeepService.remove(SupplierKeep::getSupplierId, id);
|
|
- commonFileService.delete(id);
|
|
|
|
|
|
+
|
|
|
|
+ fileList.add(id);
|
|
|
|
+ commonFileService.delete(fileList);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|