首页>代码>基于spring+JdbcTemplate实现用户转账简单实例,适合初学者>/com.yyc.spring_transfer/src/main/java/com/yyc/dao/impl/AccountDaoImpl.java
package com.yyc.dao.impl;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

import com.yyc.dao.AccountDao;

public class AccountDaoImpl extends JdbcDaoSupport implements AccountDao {

	public void payer(String payer, Integer outer) {
		this.getJdbcTemplate().update("update account set money = money - ? where username = ?", outer,payer);
	}

	public void payee(String payee, Integer inner) {
		this.getJdbcTemplate().update("update account set money = money + ? where username = ?", inner,payee);
	}

}
最近下载更多
我是helloworld  LV23 2021年6月1日
yahuilyu  LV1 2020年4月15日
adminliu  LV4 2019年11月14日
C yf12  LV5 2019年9月24日
huaua7676  LV30 2018年4月23日
wanghuihedaben  LV2 2018年4月13日
jic499  LV27 2018年3月22日
Yettied  LV2 2018年2月24日
mike1994  LV4 2018年2月1日
ly292208586  LV8 2018年1月30日
最近浏览更多
jiemomo  LV12 2023年10月18日
你爹正在加载中  LV4 2023年7月28日
toparitly  LV1 2023年6月18日
sddssddsa  LV1 2022年8月31日
无名氏111  LV32 2021年12月21日
admin123456dawad  LV1 2021年7月28日
c15042361021  LV4 2021年7月8日
我是helloworld  LV23 2021年6月1日
codelife1224 2021年5月27日
暂无贡献等级
最代码-宋家辉  LV61 2021年5月21日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友