| | |
| | | import com.ruoyi.account.api.model.TAppUserAddress; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.dto.PointChangeDto; |
| | | import io.seata.core.exception.TransactionException; |
| | | import io.seata.tm.api.GlobalTransactionContext; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | |
| | | |
| | | @Override |
| | | public R<TAppUser> getUserById(Long id) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("根据id查询用户失败:"+throwable.getMessage()); |
| | | } |
| | | |