|
@@ -50,13 +50,17 @@ public class ModelDataUtil {
|
|
|
public void insertDB(String caseNumber, Map<String, Map<String, String>> changxDocs) {
|
|
|
PropertiesUtil propertiesUtil = new PropertiesUtil("kernel.properties");
|
|
|
MysqlJdbc mysqlJdbc = new MysqlJdbc(propertiesUtil.getProperty("mysql.test.user"),
|
|
|
- propertiesUtil.getProperty("mysql.local.password"),
|
|
|
- propertiesUtil.getProperty("mysql.local.url"));
|
|
|
+ propertiesUtil.getProperty("mysql.test.password"),
|
|
|
+ propertiesUtil.getProperty("mysql.test.url"));
|
|
|
Connection connect = null;
|
|
|
PreparedStatement pst = null;
|
|
|
- String sql = "INSERT INTO qc_model_input_info(case_number,title,sub_title,text) VALUES(?,?,?,?)";
|
|
|
+ String sql = "TRUNCATE qc_model_input_info";
|
|
|
try {
|
|
|
connect = mysqlJdbc.connect();
|
|
|
+ pst = connect.prepareStatement(sql);
|
|
|
+ pst.execute();
|
|
|
+
|
|
|
+ sql = "INSERT INTO qc_model_input_info(case_number,title,sub_title,text) VALUES(?,?,?,?)";
|
|
|
connect.setAutoCommit(false);
|
|
|
pst = connect.prepareStatement(sql);
|
|
|
for (Map.Entry<String, Map<String, String>> changxDoc : changxDocs.entrySet()) {
|