📄 wealthbiz.java
字号:
package com.yhbbs.bbs.biz;
import java.sql.SQLException;
import org.apache.log4j.Logger;
import com.yhbbs.bbs.dao.WealthDaoIm;
import com.yhbbs.bbs.itface.Wealth;
import com.yhbbs.bbs.itface.WealthDto;
import com.yhbbs.bbs.itface.dao.WealthDao;
/**
* <p>Title:系统财富分配相关操作Bean</p>
* <li> 系统财富分配相关操作<br>
* <br><b>WebSite: www.yyhweb.com</b>
* <br><b>CopyRight: yhbbs[永恒论坛]</b>
* @author stephen
* @version YH-1.0
*/
public class WealthBiz {
private static Logger bbslog = Logger.getLogger(WealthBiz.class);
private static WealthDao wealthdao = WealthDaoIm.getInstance();
/**
* @return 取得论坛用户登录分配的财富
*/
public static Wealth getWealth(){
try {
return wealthdao.getWealth();
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke getLoginWth():\n" + e.toString());
}
return null;
}
/**
* @return 取得论坛用户登录分配的财富
*/
public static WealthDto getLoginWth(){
try {
return wealthdao.getLoginWth();
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke getLoginWth():\n" + e.toString());
}
return null;
}
/**
* @return 取得论坛用户注册分配的财富
*/
public static WealthDto getRegWealth(){
try {
return wealthdao.getRegWealth();
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke getRegWealth():\n" + e.toString());
}
return null;
}
/**
* @return 取得论坛用户发表帖子分配的财富
*/
public static WealthDto getPostArtWth(){
try {
return wealthdao.getPostArtWth();
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke getPostArtWth():\n" + e.toString());
}
return null;
}
/**
* @return 取得论坛用户回复帖子分配的财富
*/
public static WealthDto getRepArtWth(){
try {
return wealthdao.getRepArtWth();
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke getRepArtWth():\n" + e.toString());
}
return null;
}
/**
* @return 取得论坛用户回复帖子分配的财富
*/
public static WealthDto getDelArtWth(){
try {
return wealthdao.getDelArtWth();
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke getDelArtWth():\n" + e.toString());
}
return null;
}
/**
* @return 取得论坛用户帖子被设置为精华分配的财富
*/
public static WealthDto getArtEliteWth(){
try {
return wealthdao.getArtEliteWth();
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke getArtEliteWth():\n" + e.toString());
}
return null;
}
// 后台管理使用
/** 更新系统财富
* @param wealth 系统所有财富
* @return true:成功 false:失败
* @throws SQLException
*/
public static boolean updateWealth(Wealth wealth){
boolean flag = true;
try {
flag = wealthdao.updateWealth(wealth);
}
catch(SQLException e) {
bbslog.error("Throws a SqlException when invoke updateWealth(Wealth wealth):\n" + e.toString());
flag = false;
}
return flag;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -