package com.transaction_anno.service.impl;

import com.transaction_anno.dao.AccountDao;
import com.transaction_anno.entity.AccountEntity;
import com.transaction_anno.service.AccountTwoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("annoAccountTwo")
public class AccountTwoServiceImpl implements AccountTwoService {
    @Autowired
    AccountDao accountDao;
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void addAccountBalance(AccountEntity addEntity) {
        int in = accountDao.incomeAccount(addEntity, "in");
        throw new RuntimeException("runtimeERROR");
    }
}
