package com.yeshi.buwan.service.manager;
|
|
import org.springframework.stereotype.Component;
|
|
@Component
|
public class SeataManagerTest {
|
//
|
// @Resource
|
// private LoginUserDao loginUserDao;
|
//
|
// @Reference(version = "1.0")
|
// private GoldCornGetSourceService goldCornGetSourceService;
|
//
|
// @GlobalTransactional(timeoutMills = 30000, name = "buwan-order", rollbackFor = Exception.class)
|
// public void addGetResource() throws Exception {
|
// System.out.println("开始全局事务,XID = " + RootContext.getXID());
|
// LoginUser loginUser = new LoginUser();
|
// loginUser.setId("50134");
|
// loginUser.setName("test3");
|
// loginUserDao.updateSelective(loginUser);
|
//
|
// GoldCornGetSource get = new GoldCornGetSource();
|
// get.setAppId(15L);
|
// get.setSourceCode("test1");
|
// get.setSourceName("测试");
|
// get.setGoldCorn(1);
|
//
|
// goldCornGetSourceService.addSource(get);
|
// throw new Exception("手动报错");
|
// }
|
|
}
|