@Transactional
	@EtTcc(confirmMethod="doConfirmPay",cancelMethod="doCancelPay",idempotentType=BusinessProvider.IDENPOTENT_TYPE_FRAMEWORK,cfgClass=WalletPayRequestCfg.class)
	public WalletPayResponseVO doTryPay(WalletPayRequestVO param) {
		int update = jdbcTemplate.update("update `wallet` set freeze_amount = freeze_amount + ? where user_id = ? and (total_amount - freeze_amount) >= ?;", 
				param.getPayAmount(),param.getUserId(),param.getPayAmount());
		
		if(update != 1){
			throw new RuntimeException("can not find specific user id or have not enought money");
		}
		
		WalletPayResponseVO walletPayTccMethodResult = new WalletPayResponseVO();
		walletPayTccMethodResult.setFreezeAmount(param.getPayAmount());
		return walletPayTccMethodResult;
	}
@ Transactional @ EtTcc ( confirmMethod = "doConfirmPay" , cancelMethod = "doCancelPay" , idempotentType = BusinessProvider . IDENPOTENT_TYPE_FRAMEWORK , cfgClass = WalletPayRequestCfg . class ) public WalletPayResponseVO doTryPay ( WalletPayRequestVO param ) { int update = jdbcTemplate . update ( "update `wallet` set freeze_amount = freeze_amount + ? where user_id = ? and (total_amount - freeze_amount) >= ?;" , param . getPayAmount ( ) , param . getUserId ( ) , param . getPayAmount ( ) ) ; if ( update != 1 ) { throw new RuntimeException ( "can not find specific user id or have not enought money" ) ; } WalletPayResponseVO walletPayTccMethodResult = new WalletPayResponseVO ( ) ; walletPayTccMethodResult . setFreezeAmount ( param . getPayAmount ( ) ) ; return walletPayTccMethodResult ; }
如果doTryPay的入参为集成了EasyTransRequest并带有BusinessIdentiffer的话则无需指定cfgClass