You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
test/Supermarket/lib/dao/UserService.java

27 lines
1.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.lingnan.supermarket.dao;
import java.util.Vector;
import com.lingnan.supermarket.dto.User;
// 用户服务接口,定义了一系列与用户操作相关的方法
public interface UserService {
// 查询所有用户的方法返回一个存储用户对象的Vector数组
Vector<User> allUser();
// 根据用户真实姓名查找用户的方法返回一个存储匹配用户对象的Vector数组
Vector<User> findByrnameUser(User user);
// 用户登录方法传入用户名、密码和用户级别参数返回一个User对象可能表示登录成功的用户信息
User login(String loginName, String password, int usuper);
// 添加用户的方法传入一个User对象返回一个整数表示添加操作是否成功1表示成功0表示失败
int addUser(User user);
// 根据用户id删除用户记录的方法传入用户id返回一个整数表示删除操作是否成功1表示成功0表示失败
int deleteUser(int id);
// 根据用户id更新用户信息的方法传入一个User对象返回一个整数表示更新操作是否成功1表示成功0表示失败
int updateByIdUser(User user);
}