⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usermgr.java

📁 大象购物系统
💻 JAVA
字号:
package com.shopping.business;

import java.sql.*;
import java.util.*;

import com.comm.*;
import com.comm.vo.*;
import com.shopping.dao.*;

public class UserMgr {

    public int registerUser(GenericVO gvo) throws AppException {
        try {
            return new UserDao().add(gvo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public void modifyUser(GenericVO gvo) throws AppException {
        try {
            new UserDao().modify(gvo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public ListVO searchUser(GenericVO gvo) throws AppException {
        try {
            return new UserDao().search(gvo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public GenericVO getUserDetail(int userId) throws AppException {
        try {
            return new UserDao().getDetail(userId);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public void updateUserDot(int userId, int dot) throws AppException {
        try {
            new UserDao().updateUserDot(userId, dot);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public GenericVO login(String userName, String password) throws
            AppException {
        try {
            return new UserDao().login(userName, password);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public Vector getOrdersByUserId(int userId) throws AppException {
        try {
            return new OrderDao().getOrdersByUserId(userId);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public Vector getOrdersByUserId(int userId, int status, int num) throws
            AppException {
        try {
            return new OrderDao().getOrdersByUserId(userId, status, num);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public void addRemit(GenericVO gvo) throws AppException {
        try {
            new RemitDao().add(gvo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public void addFavorite(GenericVO gvo) throws AppException {
        try {
            new FavoriteDao().add(gvo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public void deleteFavorite(int favoriteId) throws AppException {
        try {
            new FavoriteDao().delete(favoriteId);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public ListVO searchFavorite(GenericVO gvo) throws AppException {
        try {
            return new FavoriteDao().search(gvo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public int modifyUserPass(int userId, String oldPass, String newPass) throws
            AppException {
        try {
            return new UserDao().passModify(userId, oldPass, newPass);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public void addOrderStatus(GenericVO gvo) throws AppException {
        try {
            new OrderDao().addOrderStatus(gvo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }

    public Vector getOrderStatusByOrderNo(String orderNo) throws AppException {
        try {
            return new OrderDao().getOrderStatusByOrderNo(orderNo);
        } catch (SQLException ex) {
            throw new AppException(ex);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -