|
|
@@ -3,6 +3,7 @@ package com.uas.erp.database.api.v1;
|
|
|
import com.uas.erp.database.entity.DBA;
|
|
|
import com.uas.erp.database.service.DBAService;
|
|
|
import com.uas.erp.database.service.MasterService;
|
|
|
+import com.uas.erp.database.support.BackupDBFileUtils;
|
|
|
import com.uas.erp.database.web.ResponseWrap;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
@@ -29,6 +30,7 @@ public class DBAController {
|
|
|
@PostMapping
|
|
|
public ResponseEntity save(DBA dba) {
|
|
|
dbaService.save(dba);
|
|
|
+ BackupDBFileUtils.createFile();
|
|
|
masterService.scanAll();
|
|
|
return ResponseWrap.ok();
|
|
|
}
|
|
|
@@ -36,6 +38,7 @@ public class DBAController {
|
|
|
@DeleteMapping(path = "/{id}")
|
|
|
public ResponseEntity delete(@PathVariable("id") long id) {
|
|
|
dbaService.delete(id);
|
|
|
+ BackupDBFileUtils.createFile();
|
|
|
masterService.scanAll();
|
|
|
return ResponseWrap.ok();
|
|
|
}
|