// Path: springcloud-sample/sample-consumer/src/main/java/com/bytesvc/consumer/dao/TransferDao.java
// @Mapper
// public interface TransferDao {
// 
// 	@Update("update tb_account_two set amount = amount + #{amount} where acct_id = #{acctId}")
// 	public int increaseAmount(@Param("acctId") String accountId, @Param("amount") double amount);
// 
// 	@Update("update tb_account_two set amount = amount - #{amount} where acct_id = #{acctId}")
// 	public int cancelIncrease(@Param("acctId") String accountId, @Param("amount") double amount);
// 
// }
// 
// Path: springcloud-sample/sample-consumer/src/main/java/com/bytesvc/consumer/service/ITransferService.java
// public interface ITransferService {
// 
// 	public void transfer(String sourceAcctId, String targetAcctId, double amount);
// 
// }


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.bytesvc.consumer.dao.TransferDao;
import com.bytesvc.consumer.service.ITransferService;
package com.bytesvc.consumer.service.impl;



@Service("transferServiceCancel")
public class TransferServiceCancel implements ITransferService {

	@Autowired
	private TransferDao transferDao;

	@Transactional
	public void transfer(String sourceAcctId, String targetAcctId, double amount) {
// Path: springcloud-sample/sample-consumer/src/main/java/com/bytesvc/consumer/dao/TransferDao.java
// @Mapper
// public interface TransferDao {
// 
// 	@Update("update tb_account_two set amount = amount + #{amount} where acct_id = #{acctId}")
// 	public int increaseAmount(@Param("acctId") String accountId, @Param("amount") double amount);
// 
// 	@Update("update tb_account_two set amount = amount - #{amount} where acct_id = #{acctId}")
// 	public int cancelIncrease(@Param("acctId") String accountId, @Param("amount") double amount);
// 
// }
// 
// Path: springcloud-sample/sample-consumer/src/main/java/com/bytesvc/consumer/service/ITransferService.java
// public interface ITransferService {
// 
// 	public void transfer(String sourceAcctId, String targetAcctId, double amount);
// 
// }


// Path: springcloud-sample/sample-consumer/src/main/java/com/bytesvc/consumer/service/impl/TransferServiceCancel.java
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.bytesvc.consumer.dao.TransferDao;
import com.bytesvc.consumer.service.ITransferService;

package com.bytesvc.consumer.service.impl;



@Service("transferServiceCancel")
public class TransferServiceCancel implements ITransferService {

	@Autowired
	private TransferDao transferDao;

	@Transactional
	public void transfer(String sourceAcctId, String targetAcctId, double amount) {
		this.transferDao.cancelIncrease(targetAcctId, amount);