求职招聘系统计划书
一、 项目设计分析
该求职招聘系统可帮助企业招揽人才,寻找人才;可帮助求职者寻找心仪企业,公开求职。
二、 程序功能简介
1.登录注册功能:企业用户可以注册、登录企业系统,求职者可以注册、登录求职系统,管理员可以用管理员账号登录系统。
2.密保设置与找回功能:企业用户及求职用户可以对其账号进行密保设置以及密保和密码的找回,管理员可以对管理员账号进行密保设置以及密保和密码的找回。
3.修改密码与修改密保功能:用户可以对用户账号进行密码修改和密保修改,管理员可以对管理员账号进行密码修改和密保修改。
4.发布招聘功能:企业用户可以发布招聘信息,供求职者查看。
5.投递简历功能:求职者可对心仪企业投出简历,供企业选择。
6.公开求职功能:求职者可以发布公开求职信息,供所有企业查看。
7.邀请功能:企业可选择投入本企业的求职者或公开求职者发出邀请。
8.入职功能:应聘者收到企业邀请并接受即可加入对应企业,成为正式员工,同时所投所有简历及其公开求职信息被自动删除。
9.统计功能:系统自动对成功入职人数进行统计,用于新用户注册时宣传。
10.监察功能:管理员可查看所有企业及求职者信息。
11.清理功能:管理员可对信息不符或恶意企业、求职者账户进行冻结。
Controller
package org.dxj.restaurantmanagementsystem.controller;
import org.dxj.restaurantmanagementsystem.entity.Meal;
import org.dxj.restaurantmanagementsystem.entity.User;
import org.dxj.restaurantmanagementsystem.service.IMealService;
import org.dxj.restaurantmanagementsystem.service.IUserService;
import org.dxj.restaurantmanagementsystem.service.impl.MealServiceImpl;
import org.dxj.restaurantmanagementsystem.service.impl.UserServiceImpl;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/12/7 20:18
*/
public class MealController {
/**
* 创建MealService对象
*/
IMealService iMealService = new MealServiceImpl();
/**
* 发布招聘信息Controller
* @param meal
* @return
* @throws IOException
*/
public boolean InsertController(Meal meal) throws IOException {
return iMealService.insertMealService(meal);
}
/**
* 根据招聘信息序号删除招聘信息Controller
* @param id
* @return
* @throws IOException
*/
public boolean deleteController(Integer id) throws IOException {
return iMealService.deleteMealService(id);
}
/**
* 根据招聘信息序号更改招聘信息Controller
* @param meal
* @param id
* @return
* @throws IOException
*/
public boolean updateController(Meal meal, Integer id) throws IOException {
return iMealService.updateMealService(meal, id);
}
/**
* 根据招聘信息序号查询招聘信息Controller
* @param id
* @return List<Meal>
* @throws IOException
*/
public List<Meal> selectController(Integer id) throws IOException {
return iMealService.selectMealService(id);
}
/**
* 查询所有招聘信息Controller
* @return List<Meal>
* @throws IOException
*/
public List<Meal> selectController() throws IOException {
return iMealService.selectMealService();
}
}
package org.dxj.restaurantmanagementsystem.controller;
import org.dxj.restaurantmanagementsystem.entity.Meal;
import org.dxj.restaurantmanagementsystem.entity.Order;
import org.dxj.restaurantmanagementsystem.service.IOrderService;
import org.dxj.restaurantmanagementsystem.service.IUserService;
import org.dxj.restaurantmanagementsystem.service.impl.OrderServiceImpl;
import org.dxj.restaurantmanagementsystem.service.impl.UserServiceImpl;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/12/7 20:18
*/
public class OrderController {
/**
* 创建OrderService对象
*/
IOrderService iOrderService=new OrderServiceImpl();
/**
* 增加公开求职信息Controller
* @param order
* @return boolean
* @throws IOException
*/
public boolean InsertController(Order order) throws IOException {
return iOrderService.insertOrderService(order);
}
/**
* 根据用户id删除公开求职信息Controller
* @param id
* @return boolean
* @throws IOException
*/
public boolean deleteController(Integer id) throws IOException {
return iOrderService.deleteOrderService(id);
}
/**
* 根据用户id更改公开求职信息Controller
* @param id
* @param order
* @return boolean
* @throws IOException
*/
public boolean updateController(Integer id, Order order) throws IOException {
return iOrderService.updateOrderService(order,id);
}
/**
* 根据id查询公开求职信息Controller
* @param id
* @return List<Order>
* @throws IOException
*/
public List<Order> selectController(Integer id) throws IOException {
return iOrderService.selectOrderByIdService(id);
}
/**
* 查询所有公开求职信息Controller
* @return List<Order>
* @throws IOException
*/
public List<Order> selectController() throws IOException {
return iOrderService. selectOrderService();
}
public void updateMealService(Meal meal, Integer id) {
}
}
package org.dxj.restaurantmanagementsystem.controller;
import org.dxj.restaurantmanagementsystem.entity.User;
import org.dxj.restaurantmanagementsystem.service.IUserService;
import org.dxj.restaurantmanagementsystem.service.impl.UserServiceImpl;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/11/23 17:53
*/
public class UserController {
/**
* 创建UserService对象
*/
IUserService iUserService=new UserServiceImpl();
public boolean loginController(String userName,String password) throws IOException {
return iUserService.loginService(userName,password);
}
/**
* 用户注册登录
* @param user
* @return boolean
* @throws IOException
*/
public boolean registController(User user) throws IOException {
return iUserService.registService(user);
}
/**
* 增加用户信息Controller
* @param user
* @return boolean
* @throws IOException
*/
public boolean insertUserController(User user) throws IOException {
return iUserService.insertUserService(user);
}
/**
* 根据用户QQ删除用户信息Controller
* @param id
* @return boolean
* @throws IOException
*/
public boolean deleteUserController(Integer id) throws IOException {
return iUserService.deleteUserService(id);
}
/**
* 根据用户QQ更改用户信息Controller
* @param user
* @param id
* @return boolean
* @throws IOException
*/
public boolean updateUserController(User user,Integer id) throws IOException {
return iUserService.updateUserService(user,id);
}
/**
* 根据QQ查询用户信息Controller
* @param id
* @return List<User>
* @throws IOException
*/
public List<User> selectUserByIdController(Integer id) throws IOException {
return iUserService.selectUserByIdService(id);
}
/**
* 查询所有用户信息Controller
* @return List<User>
* @throws IOException
*/
public List<User> selectUserController() throws IOException {
return iUserService.selectUserService();
}
}
dao
package org.dxj.restaurantmanagementsystem.dao;
import org.dxj.restaurantmanagementsystem.entity.Meal;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/12/4 17:26
*/
public interface IMealDao {
/**
*增加招聘信息Meal
* @param meal
* @return
*/
boolean insertMealDao (Meal meal) throws IOException;
/**
*根据招聘信息序号删除除招聘信息Meal
* @param id
* @return
*/
boolean deleteMealDao(Integer id) throws IOException;
/**
*根据招聘信息序号更改招聘信息MealDao
* @param id
* @param meal
* @return boolean
* @theows IOException
*/
boolean updateMealDao(Integer id,Meal meal) throws IOException;
/**
*根据招聘信息序号查询招聘信息Meal
* @param id
* @return List<Meal>
*/
List<Meal> selectMealByIdDao(Integer id) throws IOException;
/**
*查询所有招聘信息MealDao
* @return LIst<Meal>
* @throws IOException
*/
List<Meal> selectMealDao()throws IOException;
}
package org.dxj.restaurantmanagementsystem.dao;
import org.dxj.restaurantmanagementsystem.entity.Meal;
import org.dxj.restaurantmanagementsystem.entity.Order;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/12/4 17:45
*/
public interface IOrderDao {
/**
*增加公开求职信息OrderD
* @param order
* @return boolean
* @throws IOException
*/
boolean insertOrderDao(Order order) throws IOException;
/**
*根据用户QQ删除公开求职信息OrderDao
* @param id
* @return boolean
* @throws IOException
*/
boolean deleteOrderDao(Integer id) throws IOException;
/**
*根据用户QQ更改公开求职信息OrderDao
* @param id
* @param order
* @return boolean
* @throws IOException
*/
boolean updateOrderDao(Integer id,Order order)throws IOException;
/**
*根据QQ查询公开求职信息OrderDao
* @param id
* @return
*/
List<Order> selectOrderByIdDao(Integer id) throws IOException;
/**
*查询所有公开求职信息OrderDao
* @return List<Order>
* @throws IOException
*/
List<Order> selectOrderDao()throws IOException;
}
package org.dxj.restaurantmanagementsystem.dao;
import org.dxj.restaurantmanagementsystem.entity.User;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/11/23 17:52
*/
public interface IUserDao {
/**
* 增加用户IUserDao
* @param user
* @return boolean
* @throws IOException
*/
boolean insertUserDao(User user) throws IOException;
/**
* 根据用户QQ删除用户IUserDao
* @param id
* @return boolean
* @throws IOException
*/
boolean deleteUserDao(Integer id) throws IOException;
/**
* 根据用户QQ更改用户信息IUserDao
* @param user
* @param id
* @return boolean
* @throws IOException
*/
boolean updateUserDao(User user,Integer id) throws IOException;
/**
* 根据用户QQ查询用户信息IUserDao
* @param id
* @return List<User>
* @throws IOException
*/
List<User> selectUserByIdDao(Integer id) throws IOException;
/**
*根据用户userName查询用户信息IUserDao
* @param userName
* @return
*/
List<User> selectUserByUserNameDao(String userName) throws IOException;
/**
* 查询所有用户信息IUserDao
* @return List<User>
* @throws IOException
*/
List<User> selectUserDao()throws IOException;
}
entity
package org.dxj.restaurantmanagementsystem.entity;
/**
* @author Ding
* @date 2019/11/30 22:06
*/
public class Meal {
/**
* 招聘信息序号
*/
private Integer id;
/**
* 职务名称
*/
private String mealName;
/**
* 年薪
*/
private Integer price;
/**
* 招聘详情
*/
private String number;
/**
* 招聘截止日期
*/
private Integer serialNumber;
/**
* Meal空参构造器
*/
public Meal() {
}
/**
* Meal初始化除id外所有参数的构造器
* @param mealName
* @param price
* @param number
* @param serialNumber
*/
public Meal(String mealName, Integer price, String number, Integer serialNumber) {
this.mealName = mealName;
this.price = price;
this.number = number;
this.serialNumber = serialNumber;
}
/**
* Meal初始化所有参数的构造器
* @param id
* @param mealName
* @param price
* @param number
* @param serialNumber
*/
public Meal(Integer id, String mealName, Integer price, String number, Integer serialNumber) {
this.id = id;
this.mealName = mealName;
this.price = price;
this.number = number;
this.serialNumber = serialNumber;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getMealName() {
return mealName;
}
public void setMealName(String mealName) {
this.mealName = mealName;
}
public Integer getPrice() {
return price;
}
public void setPrice(Integer price) {
this.price = price;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public Integer getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(Integer serialNumber) {
this.serialNumber = serialNumber;
}
@Override
public String toString() {
return "Meal{" +
"id=" + id +
", mealName='" + mealName + '\'' +
", price=" + price +
", number='" + number + '\'' +
", serialNumber=" + serialNumber +
'}';
}
}
package org.dxj.restaurantmanagementsystem.entity;
import java.util.Date;
/**
* @author Ding
* @date 2019/11/30 22:04
*/
public class Order {
/**
* 公开求职信息序号
*/
private Integer id;
/**
* 目标薪资
*/
private Integer payment;
/**
* 本人年龄
*/
private Integer createTime;
/**
* 目标职业
*/
private String updateTime;
/**
* 工作经验
*/
private String deleteTime;
/**
* 联系方式
*/
private String closeTime;
/**
* Order空参构造器
*/
public Order() {
}
/**
* Order初始化除id外所有参数的构造器
* @param payment
* @param createTime
* @param updateTime
* @param deleteTime
* @param closeTime
*/
public Order(Integer payment, Integer createTime, String updateTime, String deleteTime, String closeTime) {
this.payment = payment;
this.createTime = createTime;
this.updateTime = updateTime;
this.deleteTime = deleteTime;
this.closeTime = closeTime;
}
/**
* Order初始化所有参数的构造器
* @param id
* @param payment
* @param createTime
* @param updateTime
* @param deleteTime
* @param closeTime
*/
public Order(Integer id, Integer payment, Integer createTime, String updateTime, String deleteTime, String closeTime) {
this.id = id;
this.payment = payment;
this.createTime = createTime;
this.updateTime = updateTime;
this.deleteTime = deleteTime;
this.closeTime = closeTime;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getPayment() {
return payment;
}
public void setPayment(Integer payment) {
this.payment = payment;
}
public Integer getCreateTime() {
return createTime;
}
public void setCreateTime(Integer createTime) {
this.createTime = createTime;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public String getDeleteTime() {
return deleteTime;
}
public void setDeleteTime(String deleteTime) {
this.deleteTime = deleteTime;
}
public String getCloseTime() {
return closeTime;
}
public void setCloseTime(String closeTime) {
this.closeTime = closeTime;
}
@Override
public String toString() {
return "Order{" +
"id=" + id +
", payment=" + payment +
", createTime='" + createTime + '\'' +
", updateTime='" + updateTime + '\'' +
", deleteTime='" + deleteTime + '\'' +
", closeTime='" + closeTime + '\'' +
'}';
}
}
package org.dxj.restaurantmanagementsystem.entity;
/**
* @author Ding
* @date 2019/11/23 17:51
*/
public class User {
/**
* id
*/
private Integer id;
/**
* 用户名
*/
private String userName;
/**
* 密码
*/
private String password;
/**
* 密保问题
*/
private String question;
/**
* 密保答案
*/
private String answer;
/**
* 用户权限
*/
private Integer level;
/**
* User空参构造器
*/
public User() {
}
/**
* User初始化除id外所有参数的构造器
* @param userName
* @param password
* @param question
* @param answer
* @param level
*/
public User(String userName, String password, String question, String answer, Integer level) {
this.userName = userName;
this.password = password;
this.question = question;
this.answer = answer;
this.level = level;
}
/**
* User初始化所有参数的构造器
* @param id
* @param userName
* @param password
* @param question
* @param answer
* @param level
*/
public User(Integer id, String userName, String password, String question, String answer, Integer level) {
this.id = id;
this.userName = userName;
this.password = password;
this.question = question;
this.answer = answer;
this.level = level;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getQuestion() {
return question;
}
public void setQuestion(String question) {
this.question = question;
}
public String getAnswer() {
return answer;
}
public void setAnswer(String answer) {
this.answer = answer;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", userName='" + userName + '\'' +
", password='" + password + '\'' +
", question='" + question + '\'' +
", answer='" + answer + '\'' +
", level=" + level +
'}';
}
}
service
package org.dxj.restaurantmanagementsystem.service;
import org.dxj.restaurantmanagementsystem.entity.Meal;
import org.dxj.restaurantmanagementsystem.entity.User;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/12/4 18:01
*/
public interface IMealService {
/**
* 增加IService
* @param meal
* @return boolean
* @throws IOException
*/
boolean insertMealService(Meal meal) throws IOException;
/**
*根据用户id删除菜单信息IService
*@param id
*@return boolean
*@throws IOException
*/
boolean deleteMealService(Integer id) throws IOException;
/**
*根据用户id更改菜单IService
*@param meal
*@param id
*@return boolean
*@throws IOException
*/
boolean updateMealService(Meal meal,Integer id) throws IOException;
/**
* 根据用户id查询菜单信息IService
* @param id
* @return List<Meal>
*@throws IOException
*/
List<Meal> selectMealService(Integer id) throws IOException;
/**
*查询所有菜单信息IService
*@return List<Meal>
*@throws IOException
*/
List<Meal> selectMealService() throws IOException;
}
package org.dxj.restaurantmanagementsystem.service;
import org.dxj.restaurantmanagementsystem.entity.Order;
import org.dxj.restaurantmanagementsystem.entity.User;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/12/4 18:02
*/
public interface IOrderService {
/**
* 增加公开求职信息IService
* @param order
* @return boolean
* @throws IOException
*/
boolean insertOrderService(Order order) throws IOException;
/**
* 根据用户id删除公开求职信息IService
* @param id
* @return boolean
* @throws IOException
*/
boolean deleteOrderService(Integer id) throws IOException;
/**
* 根据用户id更改公开求职信息IService
* @param order
* @param id
* @return boolean
* @throws IOException
*/
boolean updateOrderService(Order order,Integer id) throws IOException;
/**
* 根据用户id查询公开求职信息IService
* @param id
* @return List<Order>
* @throws IOException
*/
List<Order> selectOrderByIdService(Integer id) throws IOException;
List<Order> selectOrderService() throws IOException;
}
package org.dxj.restaurantmanagementsystem.service;
import org.dxj.restaurantmanagementsystem.entity.User;
import java.io.IOException;
import java.util.List;
/**
* @author Ding
* @date 2019/11/23 17:51
*/
public interface IUserService {
/**
*创建小号IService
* @param userName
* @param password
* @return boolean
* @throws IOException
*/
boolean loginService(String userName,String password) throws IOException;
/**
*
* @param user
* @return boolean
* @throws IOException
*/
boolean registService(User user) throws IOException;
/**
* 创建小号IService
* @param user
* @return boolean
* @throws IOException
*/
boolean insertUserService(User user) throws IOException;
/**
* 根据用户id删除小号信息IService
* @param id
* @return boolean
* @throws IOException
*/
boolean deleteUserService(Integer id) throws IOException;
/**
* 根据用户id更改用户IService
* @param user
* @param id
* @return boolean
* @throws IOException
*/
boolean updateUserService(User user,Integer id) throws IOException;
/**
* 根据用户id查询小号信息IService
* @param id
* @return List<User>
* @throws IOException
*/
List<User> selectUserByIdService(Integer id) throws IOException;
/**
*查询所有用户信息IService
* @return List<User>
* @throws IOException
*/
List<User> selectUserService() throws IOException;
}
test
package org.dxj.restaurantmanagementsystem.test;
import org.dxj.restaurantmanagementsystem.dao.IOrderDao;
import org.dxj.restaurantmanagementsystem.dao.impl.OrderDaoImpl;
import org.dxj.restaurantmanagementsystem.entity.Order;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author Ding
* @date 2019/12/4 18:03
*/
public class ReleaseTest {
public static void main(String[] args) throws IOException {
IOrderDao iOrderDao=new OrderDaoImpl(); Date date= new Date();
// SimpleDateFormat s1 = new SimpleDateFormat("YYYY-MM-dd HH:MM:ss");
// System.out.println(s1.format(date));
// //简写格式
// String s = new SimpleDateFormat("YYYY-MM-dd HH:MM:ss").format(new Date());
// System.out.println(s);
// iOrderDao.insertOrderDao(new Order(1,1,s,s,s,s));
//
iOrderDao.selectOrderDao();
}
}
package org.dxj.restaurantmanagementsystem.test;
import org.dxj.restaurantmanagementsystem.dao.IMealDao;
import org.dxj.restaurantmanagementsystem.dao.IUserDao;
import org.dxj.restaurantmanagementsystem.dao.impl.IMealDaoImpl;
import org.dxj.restaurantmanagementsystem.dao.impl.UserDaoImpl;
import java.io.IOException;
import java.util.Scanner;
/**
* @author Ding
* @date 2019/12/4 18:03
*/
public class SeekTest {
public static void main(String[] args) throws IOException {
IMealDao iMealDao=new IMealDaoImpl();
Scanner scanner=new Scanner(System.in);
iMealDao.deleteMealDao(scanner.nextInt());
}
}
```java
package org.dxj.restaurantmanagementsystem.test;
import org.dxj.restaurantmanagementsystem.dao.IOrderDao;
import org.dxj.restaurantmanagementsystem.dao.IUserDao;
import org.dxj.restaurantmanagementsystem.dao.impl.UserDaoImpl;
import java.io.IOException;
import java.util.Scanner;
/**
* @author Ding
* @date 2019/11/23 20:32
*/
public class UserTest {
public static void main(String[] args) throws IOException {
IUserDao iUserDao=new UserDaoImpl();
Scanner scanner=new Scanner(System.in);
iUserDao.deleteUserDao(scanner.nextInt());
}
}
utils
package org.dxj.restaurantmanagementsystem.utils;
import java.io.IOException;
/**
* @author Ding
* @date 2019/11/23 19:55
*/
public class Create {
public static void main(String[] args) throws IOException {
CreateFileName createFileName=new CreateFileName();
CreatePathName createPathName=new CreatePathName();
createPathName.create("UserList");
createFileName.create("UserList\\User.txt");
createFileName.create("UserList\\Order.txt");
createFileName.create("UserList\\Meal.txt");
}
}
package org.dxj.restaurantmanagementsystem.utils;
import java.io.File;
import java.io.IOException;
/**
* @author Ding
* @date 2019/11/23 19:54
*/
public class CreateFileName {
/**
* 创建文件
* @param filename
* @return boolean
* @throws IOException
*/
public boolean create(String filename) throws IOException {
File file = new File(filename);
file.createNewFile();
if (file.exists()) {
return false;
}
if (file.createNewFile()) {
return true;
} else {
return false;
}
}
}
package org.dxj.restaurantmanagementsystem.utils;
import java.io.File;
import java.io.IOException;
/**
* @author Ding
* @date 2019/11/23 19:53
*/
public class CreatePathName {
/**
* 创建目录
* @param Filename
* @return boolean
* @throws IOException
*/
public boolean create(String Filename) throws IOException {
File file = new File(Filename);
if (file.exists()) {
return false;
}
if (!Filename.endsWith(File.separator)) {
Filename = Filename + File.separator;
}
if (file.mkdir()) {
return true;
} else {
return false;
}
}
}
views
package org.dxj.restaurantmanagementsystem.views;
import org.dxj.restaurantmanagementsystem.controller.MealController;
import org.dxj.restaurantmanagementsystem.entity.Meal;
import java.io.IOException;
import java.util.List;
import java.util.Scanner;
/**
* @author Ding
* @date 2019/12/4 18:04
*/
public class MealViews {
protected MealController mealController=new MealController();
public boolean insertMealView() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("欢迎发布招聘信息");
System.out.println("请输入招聘信息序号");
Integer id=scanner.nextInt();
System.out.println("请输入招聘职位名称");
String mealName=scanner.next();
System.out.println("请输入年薪");
Integer price=scanner.nextInt();
System.out.println("请输入招聘简介");
String number=scanner.next();
System.out.println("请输入招聘截止日期");
Integer serialNumber=scanner.nextInt();
Meal meal =new Meal(id,mealName,price,number,serialNumber);
return mealController.InsertController(meal);
}
public void deleteView() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("感谢您及时删除失效招聘信息");
System.out.println("请输入要删除的招聘信息序号:");
Integer id=scanner.nextInt();
mealController.deleteController(id);
}
public boolean updateView() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("请勿频繁更改招聘信息");
System.out.println("请输入要更改的招聘信息序号");
Integer id=scanner.nextInt();
System.out.println("请输入招聘职位名称");
String mealName=scanner.next();
System.out.println("请输入年薪");
Integer price=scanner.nextInt();
System.out.println("请输入招聘简介");
String number=scanner.next();
System.out.println("请输入招聘截止日期");
Integer serialNumber=scanner.nextInt();
Meal meal =new Meal(id,mealName,price,number,serialNumber);
return mealController.updateController(meal,id);
}
public void selectUserView() throws IOException {
System.out.println("欢迎进入查询界面:");
System.out.println("请选择你要选择的查询方式:");
System.out.println("1.查所有 2.根据招聘信息序号查询");
Scanner scanner=new Scanner(System.in);
switch (scanner.nextInt()){
case 1:
List<Meal> mealList=mealController.selectController();
if (mealList==null)
{
System.out.println("还没有企业发布招聘信息");
}
else {
for (int i = 0; i < mealList.size(); i++) {
System.out.print("查询的结果为:");
System.out.println(mealList.get(i));
}
}
break;
case 2:
System.out.println("请输入你要查询的招聘信息序号");
Integer id=scanner.nextInt();
List<Meal> mealIdList=mealController.selectController(id);
if (mealIdList==null)
{
System.out.println("还没有人发布公开招聘信息");
}
else {
for (int i = 0; i <mealIdList.size() ; i++) {
System.out.print("查询的结果为:");
System.out.println(mealIdList.get(i));
}
}
break;
default:
System.out.println("您输入的数字有误,请重新输入");
break;
}
}
}
package org.dxj.restaurantmanagementsystem.views;
import org.dxj.restaurantmanagementsystem.controller.OrderController;
import org.dxj.restaurantmanagementsystem.entity.Order;
import java.io.IOException;
import java.util.List;
import java.util.Scanner;
/**
* @author Ding
* @date 2019/12/4 18:04
*/
public class OrderViews {
protected OrderController orderController = new OrderController();
public boolean insertOrderView() throws IOException {
Scanner scanner = new Scanner(System.in);
System.out.println("欢迎发布公开求职信息");
System.out.println("请输入公开求职信息序号");
Integer id = scanner.nextInt();
System.out.println("请输入目标薪资");
Integer payment = scanner.nextInt();
System.out.println("请输入您真实年龄");
Integer createTime = scanner.nextInt();
System.out.println("请输入目标职业");
String updateTime = scanner.next();
System.out.println("请输入本人工作经验");
String deleteTime = scanner.next();
System.out.println("请输入本人联系方式");
String closeTime = scanner.next();
Order order = new Order(id, payment, createTime, updateTime, deleteTime, closeTime);
return orderController.InsertController(order);
}
public void deleteView() throws IOException {
Scanner scanner = new Scanner(System.in);
System.out.println("接下来您要删除公开求职信息");
System.out.println("请输入要删除的招聘信息序号:");
Integer id = scanner.nextInt();
orderController.deleteController(id);
}
public void updateView() throws IOException {
Scanner scanner = new Scanner(System.in);
System.out.println("请勿频繁更改公开求职信息");
System.out.println("请输入要更改的公开求职信息序号");
Integer id = scanner.nextInt();
System.out.println("请输入目标薪资");
Integer payment = scanner.nextInt();
System.out.println("请输入您真实年龄");
Integer createTime = scanner.nextInt();
System.out.println("请输入目标职业");
String updateTime = scanner.next();
System.out.println("请输入本人工作经验");
String deleteTime = scanner.next();
System.out.println("请输入本人联系方式");
String closeTime = scanner.next();
Order order = new Order(id, payment, createTime, updateTime, deleteTime, closeTime);
orderController.updateController(id, order);
}
public void selectUserView() throws IOException {
System.out.println("欢迎进入查询界面:");
System.out.println("请选择你要选择的查询方式:");
System.out.println("1.查所有 2.根据公开求职信息序号查询");
Scanner scanner2 = new Scanner(System.in);
switch (scanner2.nextInt()) {
case 1:
List<Order> mealList = orderController.selectController();
for (int i = 0; i < mealList.size(); i++) {
System.out.print("查询的结果为:");
System.out.println(mealList.get(i));
}
break;
case 2:
System.out.println("请输入你要查询的招聘信息序号");
Integer id = scanner2.nextInt();
List<Order> mealIdList = orderController.selectController(id);
for (int i = 0; i < mealIdList.size(); i++) {
System.out.print("查询的结果为:");
System.out.println(mealIdList.get(i));
}
break;
default:
System.out.println("您输入的数字有误,请重新输入");
break;
}
}
}
package org.dxj.restaurantmanagementsystem.views;
import org.dxj.restaurantmanagementsystem.controller.UserController;
import org.dxj.restaurantmanagementsystem.entity.User;
import java.io.IOException;
import java.util.List;
import java.util.Scanner;
/**
* @author Ding
* @date 2019/11/23 20:07
*/
public class UserViews {
protected UserController userController=new UserController();
public boolean loginView() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("***********欢迎进入登录界面**********");
System.out.println();
System.out.println(" 请输入您的姓名或企业名 ");
String userName=scanner.next();
System.out.println();
System.out.println(" 请输入密码 ");
String password=scanner.next();
return userController.loginController(userName,password);
}
public boolean registViews() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("┏ (^ω^)=☞请按照指引完成注册");
System.out.println();
System.out.println("请输入您的QQ号");
Integer id=scanner.nextInt();
System.out.println();
System.out.println("请输入您的姓名或企业名");
String userName=scanner.next();
System.out.println();
System.out.println("请设置密码");
String password=scanner.next();
System.out.println();
System.out.println("为了您账号的安全请设置密保问题");
String question=scanner.next();
System.out.println();
System.out.println("请设置密保答案");
String answer=scanner.next();
System.out.println();
System.out.println(" 请选择注册账号类型 ");
System.out.println("1:企业 ( ̄▽ ̄)~■ □~( ̄▽ ̄) 2:求职者");
Integer level=scanner.nextInt();
System.out.println();
User user=new User(id,userName,password,question,answer,level);
return userController.registController(user);
}
public boolean insertUserView() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("欢迎进入用户界面:");
System.out.println("请输入用户id:");
Integer id=scanner.nextInt();
System.out.println("请输入用户名:");
String userName=scanner.next();
System.out.println("请输入密码:");
String password=scanner.next();
System.out.println("请输入密保问题:");
String question=scanner.next();
System.out.println("请输入密保答案:");
String answer=scanner.next();
System.out.println("请输入用户权限:");
Integer level=scanner.nextInt();
User user=new User(id,userName,password,question,answer,level);
return userController.insertUserController(user);
}
public boolean deleteView() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("欢迎进入删除界面");
System.out.println("请输入删除的id:");
Integer id=scanner.nextInt();
return userController.deleteUserController(id);
}
public boolean updateView() throws IOException {
Scanner scanner=new Scanner(System.in);
System.out.println("欢迎进入更改界面:");
System.out.println("请输入你要更改的id:");
Integer id=scanner.nextInt();
System.out.println("请输入用户名:");
String userName=scanner.next();
System.out.println("请输入密码:");
String password=scanner.next();
System.out.println("请输入密保问题:");
String question=scanner.next();
System.out.println("请输入密保答案:");
String answer=scanner.next();
System.out.println("请输入用户权限:");
Integer level=scanner.nextInt();
User user=new User(id,userName,password,question,answer,level);
return userController.updateUserController(user,id);
}
public void selectUserView() throws IOException {
System.out.println("欢迎进入查询界面:");
System.out.println("请选择你要选择的查询方式:");
System.out.println("1.查所有,2.根据id查询");
Scanner scanner=new Scanner(System.in);
switch (scanner.nextInt()){
case 1:
List<User> userList=userController.selectUserController();
for (int i = 0 ; i <userList.size() ; i++) {
System.out.print("查询的结果为:");
System.out.println(userList.get(i));
}
break;
case 2:
System.out.println("请输入你要查询的id");
Integer id=scanner.nextInt();
List<User> userIdList=userController.selectUserByIdController(id);
for (int i = 0; i <userIdList.size() ; i++) {
System.out.print("查询的结果为:");
System.out.println(userIdList.get(i));
}
break;
default:
System.out.println("您输入的数字有误,请重新输入");
break;
}
}
}
System
package org.dxj.restaurantmanagementsystem;
import org.dxj.restaurantmanagementsystem.views.MealViews;
import org.dxj.restaurantmanagementsystem.views.OrderViews;
import org.dxj.restaurantmanagementsystem.views.UserViews;
import java.io.IOException;
import java.util.Scanner;
/**
* @author Ding
* @date 2019/11/23 20:322
*/
public class EmploySystem {
public static void main(String[] args) throws IOException {
UserViews userViews = new UserViews();
OrderViews orderViews = new OrderViews();
MealViews mealViews=new MealViews();
Scanner scanner = new Scanner(System.in);
boolean judgment = false;
System.out.println("----------请输入你要进入的界面----------");
System.out.println("+-----------------------------------+");
System.out.println("++ 1:登录 2:注册 ++");
System.out.println("+-----------------------------------+");
switch (scanner.nextInt()) {
case 1:
judgment = userViews.loginView();
break;
case 2:
userViews.registViews();
break;
default:
System.out.println("请输入1或2");
break;
}
if (judgment) {
System.out.println("----------请输入你要进入的界面----------");
System.out.println("1.发布招聘信息 2.删除招聘信息 3.更改招聘信息 4.查询招聘信息 ");
System.out.println("5.发布公开求职信息 6.删除公开求职信息 7.更改公开求职信息 8.查询公开求职信息");
System.out.println("9.创建小号 10.删除小号 11.更改账户信息 12.查询用户 ");
switch (scanner.nextInt()) {
case 1:
mealViews.insertMealView();
break;
case 2:
mealViews.deleteView();
break;
case 3:
mealViews.updateView();
break;
case 4:
mealViews.selectUserView();
break;
case 5:
orderViews.insertOrderView();
break;
case 6:
orderViews.deleteView();
break;
case 7:
orderViews.updateView();
break;
case 8:
orderViews.selectUserView();
case 9:
judgment = userViews.insertUserView();
break;
case 10:
judgment = userViews.deleteView();
break;
case 11:
judgment = userViews.updateView();
break;
case 12:
userViews.selectUserView();
break;
default:
System.out.println("你输入的代码有误:");
break;
}
}
}
}