use of com.hummer.dao.annotation.TargetDataSourceTM in project hummer-framework by hummer-team.
the class OrderService method save.
@GlobalTransactional(timeoutMills = 30000, name = "save-order")
@TargetDataSourceTM(dbName = "hj_classs_courseware", transactionManager = "hj_classs_courseware_TM", timeout = 5)
public int save() {
OrderPo po = new OrderPo();
po.setOrderTitle("test order");
po.setUserId(45677);
int result = orderDaoMapper.save(po);
log.info("save order done,db response {}", result);
return po.getOrderId();
}
Aggregations