基于Java的网吧管理系统的设计与实现

基于Java的网吧管理系统的设计与实现登录注册界面

基于Java的网吧管理系统的设计与实现mysql数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '超级管理员账号',
	password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');

网吧版权表创建语句如下:


create table t_bq(
	id int primary key auto_increment comment '主键',
	bqName varchar(100) comment '网吧版权',
	kfxx varchar(100) comment '开发信息'
) comment '网吧版权';

消费记录表创建语句如下:


create table t_dl(
	id int primary key auto_increment comment '主键',
	kaId int comment '卡号',
	jqId int comment '机器',
	inDate datetime comment '登录日期',
	outDate datetime comment '登出日期'
) comment '消费记录';

普通管理员表创建语句如下:


create table t_gly(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '姓名',
	password varchar(100) comment '密码',
	yonghuName varchar(100) comment '姓名',
	age varchar(100) comment '年龄',
	sex varchar(100) comment '性别',
	phone varchar(100) comment '电话',
	address varchar(100) comment '地址',
	idcard varchar(100) comment '身份证'
) comment '普通管理员';

计费表创建语句如下:


create table t_jf(
	id int primary key auto_increment comment '主键',
	jf int comment '计费'
) comment '计费';

机器表创建语句如下:


create table t_jq(
	id int primary key auto_increment comment '主键',
	jqName varchar(100) comment '机器编号',
	jqAddress varchar(100) comment '机器位置',
	status varchar(100) comment '状态'
) comment '机器';

登录卡表创建语句如下:


create table t_ka(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '卡号',
	password varchar(100) comment '密码',
	ye int comment '余额'
) comment '登录卡';

基于Java的网吧管理系统的设计与实现oracle数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id integer,
	username varchar(100),
	password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超级管理员字段加注释
comment on column t_admin.id is '主键';
comment on column t_admin.username is '超级管理员账号';
comment on column t_admin.password is '超级管理员密码';
--超级管理员表加注释
comment on table t_admin is '超级管理员';

网吧版权表创建语句如下:


create table t_bq(
	id integer,
	bqName varchar(100),
	kfxx varchar(100)
);
--网吧版权字段加注释
comment on column t_bq.id is '主键';
comment on column t_bq.bqName is '网吧版权';
comment on column t_bq.kfxx is '开发信息';
--网吧版权表加注释
comment on table t_bq is '网吧版权';

消费记录表创建语句如下:


create table t_dl(
	id integer,
	kaId int,
	jqId int,
	inDate datetime,
	outDate datetime
);
--消费记录字段加注释
comment on column t_dl.id is '主键';
comment on column t_dl.kaId is '卡号';
comment on column t_dl.jqId is '机器';
comment on column t_dl.inDate is '登录日期';
comment on column t_dl.outDate is '登出日期';
--消费记录表加注释
comment on table t_dl is '消费记录';

普通管理员表创建语句如下:


create table t_gly(
	id integer,
	username varchar(100),
	password varchar(100),
	yonghuName varchar(100),
	age varchar(100),
	sex varchar(100),
	phone varchar(100),
	address varchar(100),
	idcard varchar(100)
);
--普通管理员字段加注释
comment on column t_gly.id is '主键';
comment on column t_gly.username is '姓名';
comment on column t_gly.password is '密码';
comment on column t_gly.yonghuName is '姓名';
comment on column t_gly.age is '年龄';
comment on column t_gly.sex is '性别';
comment on column t_gly.phone is '电话';
comment on column t_gly.address is '地址';
comment on column t_gly.idcard is '身份证';
--普通管理员表加注释
comment on table t_gly is '普通管理员';

计费表创建语句如下:


create table t_jf(
	id integer,
	jf int
);
--计费字段加注释
comment on column t_jf.id is '主键';
comment on column t_jf.jf is '计费';
--计费表加注释
comment on table t_jf is '计费';

机器表创建语句如下:


create table t_jq(
	id integer,
	jqName varchar(100),
	jqAddress varchar(100),
	status varchar(100)
);
--机器字段加注释
comment on column t_jq.id is '主键';
comment on column t_jq.jqName is '机器编号';
comment on column t_jq.jqAddress is '机器位置';
comment on column t_jq.status is '状态';
--机器表加注释
comment on table t_jq is '机器';

登录卡表创建语句如下:


create table t_ka(
	id integer,
	username varchar(100),
	password varchar(100),
	ye int
);
--登录卡字段加注释
comment on column t_ka.id is '主键';
comment on column t_ka.username is '卡号';
comment on column t_ka.password is '密码';
comment on column t_ka.ye is '余额';
--登录卡表加注释
comment on table t_ka is '登录卡';

oracle特有,对应序列如下:


create sequence s_t_bq;
create sequence s_t_dl;
create sequence s_t_gly;
create sequence s_t_jf;
create sequence s_t_jq;
create sequence s_t_ka;

基于Java的网吧管理系统的设计与实现sqlserver数据库版本源码:

超级管理员表创建语句如下:


--超级管理员
create table t_admin(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--超级管理员账号
	password varchar(100)--超级管理员密码
);
insert into t_admin(username,password) values('admin','123456');

网吧版权表创建语句如下:


--网吧版权表注释
create table t_bq(
	id int identity(1,1) primary key not null,--主键
	bqName varchar(100),--网吧版权
	kfxx varchar(100)--开发信息
);

消费记录表创建语句如下:


--消费记录表注释
create table t_dl(
	id int identity(1,1) primary key not null,--主键
	kaId int,--卡号
	jqId int,--机器
	inDate datetime,--登录日期
	outDate datetime--登出日期
);

普通管理员表创建语句如下:


--普通管理员表注释
create table t_gly(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--姓名
	password varchar(100),--密码
	yonghuName varchar(100),--姓名
	age varchar(100),--年龄
	sex varchar(100),--性别
	phone varchar(100),--电话
	address varchar(100),--地址
	idcard varchar(100)--身份证
);

计费表创建语句如下:


--计费表注释
create table t_jf(
	id int identity(1,1) primary key not null,--主键
	jf int--计费
);

机器表创建语句如下:


--机器表注释
create table t_jq(
	id int identity(1,1) primary key not null,--主键
	jqName varchar(100),--机器编号
	jqAddress varchar(100),--机器位置
	status varchar(100)--状态
);

登录卡表创建语句如下:


--登录卡表注释
create table t_ka(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--卡号
	password varchar(100),--密码
	ye int--余额
);

基于Java的网吧管理系统的设计与实现登录后主页

基于Java的网吧管理系统的设计与实现spring+springMVC+hibernate框架对象(javaBean,pojo)设计:

网吧版权javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//网吧版权
@Table(name = "t_bq")
public class Bq {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//网吧版权
private String bqName;
//开发信息
private String kfxx;
public String getBqName() {return bqName;}
public void setBqName(String bqName) {this.bqName = bqName;}
public String getKfxx() {return kfxx;}
public void setKfxx(String kfxx) {this.kfxx = kfxx;}
}

消费记录javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//消费记录
@Table(name = "t_dl")
public class Dl {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//卡号
private Integer kaId;
//机器
private Integer jqId;
//登录日期
private Date inDate;
//登出日期
private Date outDate;
public Integer getKaId() {return kaId;}
public void setKaId(Integer kaId) {this.kaId = kaId;}
public Integer getJqId() {return jqId;}
public void setJqId(Integer jqId) {this.jqId = jqId;}
public Date getInDate() {return inDate;}
public void setInDate(Date inDate) {this.inDate = inDate;}
public Date getOutDate() {return outDate;}
public void setOutDate(Date outDate) {this.outDate = outDate;}
}

普通管理员javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//普通管理员
@Table(name = "t_gly")
public class Gly {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String username;
//密码
private String password;
//姓名
private String yonghuName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//地址
private String address;
//身份证
private String idcard;
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 getYonghuName() {return yonghuName;}
public void setYonghuName(String yonghuName) {this.yonghuName = yonghuName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
}

计费javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//计费
@Table(name = "t_jf")
public class Jf {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//计费
private Integer jf;
public Integer getJf() {return jf;}
public void setJf(Integer jf) {this.jf = jf;}
}

机器javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//机器
@Table(name = "t_jq")
public class Jq {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//机器编号
private String jqName;
//机器位置
private String jqAddress;
//状态
private String status;
public String getJqName() {return jqName;}
public void setJqName(String jqName) {this.jqName = jqName;}
public String getJqAddress() {return jqAddress;}
public void setJqAddress(String jqAddress) {this.jqAddress = jqAddress;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

登录卡javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//登录卡
@Table(name = "t_ka")
public class Ka {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//卡号
private String username;
//密码
private String password;
//余额
private Integer ye;
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 Integer getYe() {return ye;}
public void setYe(Integer ye) {this.ye = ye;}
}

基于Java的网吧管理系统的设计与实现spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

网吧版权javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//网吧版权
public class Bq  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//网吧版权
private String bqName;
//开发信息
private String kfxx;
public String getBqName() {return bqName;}
public void setBqName(String bqName) {this.bqName = bqName;}
public String getKfxx() {return kfxx;}
public void setKfxx(String kfxx) {this.kfxx = kfxx;}
}

消费记录javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//消费记录
public class Dl  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//卡号
private Integer kaId;
//机器
private Integer jqId;
//登录日期
private Date inDate;
//登出日期
private Date outDate;
public Integer getKaId() {return kaId;}
public void setKaId(Integer kaId) {this.kaId = kaId;}
public Integer getJqId() {return jqId;}
public void setJqId(Integer jqId) {this.jqId = jqId;}
public Date getInDate() {return inDate;}
public void setInDate(Date inDate) {this.inDate = inDate;}
public Date getOutDate() {return outDate;}
public void setOutDate(Date outDate) {this.outDate = outDate;}
}

普通管理员javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//普通管理员
public class Gly  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//姓名
private String username;
//密码
private String password;
//姓名
private String yonghuName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//地址
private String address;
//身份证
private String idcard;
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 getYonghuName() {return yonghuName;}
public void setYonghuName(String yonghuName) {this.yonghuName = yonghuName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
}

计费javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//计费
public class Jf  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//计费
private Integer jf;
public Integer getJf() {return jf;}
public void setJf(Integer jf) {this.jf = jf;}
}

机器javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//机器
public class Jq  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//机器编号
private String jqName;
//机器位置
private String jqAddress;
//状态
private String status;
public String getJqName() {return jqName;}
public void setJqName(String jqName) {this.jqName = jqName;}
public String getJqAddress() {return jqAddress;}
public void setJqAddress(String jqAddress) {this.jqAddress = jqAddress;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

登录卡javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//登录卡
public class Ka  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//卡号
private String username;
//密码
private String password;
//余额
private Integer ye;
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 Integer getYe() {return ye;}
public void setYe(Integer ye) {this.ye = ye;}
}

源代码下载点这里

评论