Commit 7795a4a8 authored by 张永's avatar 张永

1

parent a57013a2
......@@ -1576,7 +1576,7 @@ public class OrderServiceImpl implements OrderService {
@Override
public String submitV2(Map<String,Object> map) {
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
/* DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
......@@ -1585,7 +1585,7 @@ public class OrderServiceImpl implements OrderService {
DataSource dataSource = jdbcTemplate.getDataSource();
// 此处PlatformTransactionManager对象初始化,应单独用一个类管理,不应每次都创建一个新的
PlatformTransactionManager transactionManager = new DataSourceTransactionManager(dataSource);
TransactionStatus status = transactionManager.getTransaction(def);
TransactionStatus status = transactionManager.getTransaction(def);*/
String LangID = "" + map.get("langID");
try {
......@@ -1648,14 +1648,14 @@ public class OrderServiceImpl implements OrderService {
} else {
errorMsg = (String) pcommitMap.get(0).get("StatusName");
}
transactionManager.rollback(status);
//transactionManager.rollback(status);
return Rjx.jsonErr().setMessage(errorMsg).set("errorMsg", errorMsg).setData(pcommitMap).toJson();
}
}
}
transactionManager.commit(status);
//transactionManager.commit(status);
return Rjx.jsonOk().setData(commitMap).toJson();
} else {
String errorMsg = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment