Search in sources :

Example 1 with OrderPo

use of com.hummer.api.po.OrderPo 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();
}
Also used : OrderPo(com.hummer.api.po.OrderPo) GlobalTransactional(io.seata.spring.annotation.GlobalTransactional) TargetDataSourceTM(com.hummer.dao.annotation.TargetDataSourceTM)

Aggregations

OrderPo (com.hummer.api.po.OrderPo)1 TargetDataSourceTM (com.hummer.dao.annotation.TargetDataSourceTM)1 GlobalTransactional (io.seata.spring.annotation.GlobalTransactional)1