xt6101serviceimpl.java
来自「一个完整的物流系统」· Java 代码 · 共 107 行
JAVA
107 行
package jp.com.cost.xt.service.impl;
import java.util.List;
import jp.com.cost.dao.AccountDao;
import jp.com.cost.dao.AccountroleDao;
import jp.com.cost.pojo.Account;
import jp.com.cost.xt.service.XT6101Service;
import jp.com.cost.xt.web.form.XT6103Form;
/**
* 该类是XT6101Service接口类的实现类,实现XT6101Service接口里的所有方法
*
* @author 莫建超
* @version 1.0
*/
public class XT6101ServiceImpl implements XT6101Service {
private AccountDao accountDao;
private AccountroleDao accountroleDao;
/**
* @return the accountDao
*/
public AccountDao getAccountDao() {
return accountDao;
}
/**
* @param accountDao
* the accountDao to set
*/
public void setAccountDao(AccountDao accountDao) {
this.accountDao = accountDao;
}
public List searchAllAccount() {
// TODO Auto-generated method stub
List list = accountDao.findAllAccount();
return list;
}
/**
* delAccount的实现,点击XT6101页面的删除按钮删除用户信息
*
* @param ID -
* 帐户的ID
* @return boolean
*/
public boolean deleteAccount(int id) {
// TODO Auto-generated method stub
boolean bln = false;
bln = accountDao.deleteAccount(id);
bln = accountroleDao.deleteAccountRole(id);
return bln;
}
/**
* searchByAid方法的实现,根据输入的用户帐号查询用户信息
*
* @param aid -
* 帐户帐号
* @return Account
*/
public List searchByAid(String aid) {
// TODO Auto-generated method stub
List list =accountDao.findByAid(aid);
return list;
}
/**
* updateAccount方法的实现,点击XT6101页面的修改按钮修改用户信息
*
* @param ID -
* 帐户的ID
* @return boolean
*/
public XT6103Form updateAccount(int ID) {
// TODO Auto-generated method stub
XT6103Form a = null;
XT6103Form form = accountDao.findByID(ID);
if (form != null) {
a = form;
} else {
a = null;
}
return a;
}
/**
* @return the accountroleDao
*/
public AccountroleDao getAccountroleDao() {
return accountroleDao;
}
/**
* @param accountroleDao
* the accountroleDao to set
*/
public void setAccountroleDao(AccountroleDao accountroleDao) {
this.accountroleDao = accountroleDao;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?