package com.transaction_.service.impl;

import com.transaction_.dao.AccountDao;
import com.transaction_.entity.AccountEntity;
import com.transaction_.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class AccountServiceImpl implements AccountService {
    @Autowired
    AccountDao accountDao;
    @Override
    public void initAccount() {
        AccountEntity accountEntity = new AccountEntity();
        accountEntity.setUserName("mr.zhang");
        accountEntity.setBalance(new BigDecimal("500.5"));
        int i = accountDao.saveAccount(accountEntity);
    }
}
