bug fix in saving date while updating data
This commit is contained in:
parent
3dad97038a
commit
05de042fb0
|
@ -59,20 +59,30 @@ public class MainController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/updateSourceRowById", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateSourceRowById", method = RequestMethod.POST)
|
||||||
public String updateSourceRowById(@RequestBody Map<String, Object> map) throws Exception {
|
public Map<String, Object> updateSourceRowById(@RequestBody Map<String, Object> map) throws Exception {
|
||||||
|
|
||||||
System.out.println(map);
|
System.out.println(map);
|
||||||
|
|
||||||
return service.updateSourceRowById(map);
|
Map<String,Object> statusMap = new HashMap<>();
|
||||||
|
String status = service.updateSourceRowById(map);
|
||||||
|
|
||||||
|
statusMap.put("status", status);
|
||||||
|
|
||||||
|
return statusMap;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/updateDestRowById", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateDestRowById", method = RequestMethod.POST)
|
||||||
public String updateDestRowById(@RequestBody Map<String, Object> map) throws Exception {
|
public Map<String, Object> updateDestRowById(@RequestBody Map<String, Object> map) throws Exception {
|
||||||
|
|
||||||
System.out.println(map);
|
System.out.println(map);
|
||||||
|
|
||||||
return service.updateDestRowById(map);
|
Map<String,Object> statusMap = new HashMap<>();
|
||||||
|
String status =service.updateDestRowById(map);
|
||||||
|
|
||||||
|
statusMap.put("status", status);
|
||||||
|
|
||||||
|
return statusMap;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -474,8 +474,10 @@ public class CompareTwoTables {
|
||||||
Connection con = ds.getConnection();
|
Connection con = ds.getConnection();
|
||||||
|
|
||||||
System.out.println("Connection established......");
|
System.out.println("Connection established......");
|
||||||
|
con.prepareStatement("alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS'").execute();
|
||||||
|
|
||||||
Statement stmt = con.createStatement();
|
Statement stmt = con.createStatement();
|
||||||
|
|
||||||
PreparedStatement ps = con
|
PreparedStatement ps = con
|
||||||
.prepareStatement("UPDATE " + tableName + " SET " + key + " = ? WHERE " + tableKey + "= ?");
|
.prepareStatement("UPDATE " + tableName + " SET " + key + " = ? WHERE " + tableKey + "= ?");
|
||||||
|
|
||||||
|
@ -520,6 +522,7 @@ public class CompareTwoTables {
|
||||||
Connection con = ds.getConnection();
|
Connection con = ds.getConnection();
|
||||||
|
|
||||||
System.out.println("Connection established......");
|
System.out.println("Connection established......");
|
||||||
|
con.prepareStatement("alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS'").execute();
|
||||||
|
|
||||||
Statement stmt = con.createStatement();
|
Statement stmt = con.createStatement();
|
||||||
PreparedStatement ps = con
|
PreparedStatement ps = con
|
||||||
|
|
Loading…
Reference in New Issue
Block a user