基于Java的英超联赛票务系统的设计与实现

用户模块:不需要用户登录,选座位买票时填姓名身份证号码,然后付款就好。

球队信息管理模块:球队信息方面要有英超6支球队就够了,不要太多,要有信息简介,要有赛程,球队只卖自己主场的票,是谁的主场谁卖票,一个赛季10轮联赛,有5个主场,5个客场;选座位不要太复杂,分区编号就好,六个区域,每个区域2000个座位,每个区域价格分两等,前一千座位号1000元,后一千座位号价格600元。买票之后随机生成一个五位数的数,当成一个取票码;买过的票不能再买。

赛程日期随便定就好。

 整个系统都没有用户的登录和退出,都是自主买票的,后台有权限可以管理信息就好。

6支球队为阿森纳,曼联,切尔西,曼城,利物浦,热刺。

球队的简介多贴点图,球场图城市图啥的。

基于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_lbt(
	id int primary key auto_increment comment '主键',
	pic varchar(100) comment '图片'
) comment '轮播图';

赛程表创建语句如下:


create table t_sc(
	id int primary key auto_increment comment '主键',
	zdId int comment '主队',
	kdId int comment '客队',
	showDate datetime comment '日期',
	ls varchar(100) comment '轮数'
) comment '赛程';

球队信息表创建语句如下:


create table t_team(
	id int primary key auto_increment comment '主键',
	teamName varchar(100) comment '名称',
	pic varchar(100) comment '简图',
	jj varchar(100) comment '简介'
) comment '球队信息';

票表创建语句如下:


create table t_ticket(
	id int primary key auto_increment comment '主键',
	scId int comment '赛程',
	qy int comment '区域',
	zw int comment '座位',
	jg int comment '价格',
	xm varchar(100) comment '姓名',
	sfz varchar(100) comment '身份证',
	ticketNum varchar(100) comment '票号',
	inseretDate datetime 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_lbt(
	id integer,
	pic varchar(100)
);
--轮播图字段加注释
comment on column t_lbt.id is '主键';
comment on column t_lbt.pic is '图片';
--轮播图表加注释
comment on table t_lbt is '轮播图';

赛程表创建语句如下:


create table t_sc(
	id integer,
	zdId int,
	kdId int,
	showDate datetime,
	ls varchar(100)
);
--赛程字段加注释
comment on column t_sc.id is '主键';
comment on column t_sc.zdId is '主队';
comment on column t_sc.kdId is '客队';
comment on column t_sc.showDate is '日期';
comment on column t_sc.ls is '轮数';
--赛程表加注释
comment on table t_sc is '赛程';

球队信息表创建语句如下:


create table t_team(
	id integer,
	teamName varchar(100),
	pic varchar(100),
	jj varchar(100)
);
--球队信息字段加注释
comment on column t_team.id is '主键';
comment on column t_team.teamName is '名称';
comment on column t_team.pic is '简图';
comment on column t_team.jj is '简介';
--球队信息表加注释
comment on table t_team is '球队信息';

票表创建语句如下:


create table t_ticket(
	id integer,
	scId int,
	qy int,
	zw int,
	jg int,
	xm varchar(100),
	sfz varchar(100),
	ticketNum varchar(100),
	inseretDate datetime
);
--票字段加注释
comment on column t_ticket.id is '主键';
comment on column t_ticket.scId is '赛程';
comment on column t_ticket.qy is '区域';
comment on column t_ticket.zw is '座位';
comment on column t_ticket.jg is '价格';
comment on column t_ticket.xm is '姓名';
comment on column t_ticket.sfz is '身份证';
comment on column t_ticket.ticketNum is '票号';
comment on column t_ticket.inseretDate is '购买日期';
--票表加注释
comment on table t_ticket is '票';

oracle特有,对应序列如下:


create sequence s_t_lbt;
create sequence s_t_sc;
create sequence s_t_team;
create sequence s_t_ticket;

基于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_lbt(
	id int identity(1,1) primary key not null,--主键
	pic varchar(100)--图片
);

赛程表创建语句如下:


--赛程表注释
create table t_sc(
	id int identity(1,1) primary key not null,--主键
	zdId int,--主队
	kdId int,--客队
	showDate datetime,--日期
	ls varchar(100)--轮数
);

球队信息表创建语句如下:


--球队信息表注释
create table t_team(
	id int identity(1,1) primary key not null,--主键
	teamName varchar(100),--名称
	pic varchar(100),--简图
	jj varchar(100)--简介
);

票表创建语句如下:


--票表注释
create table t_ticket(
	id int identity(1,1) primary key not null,--主键
	scId int,--赛程
	qy int,--区域
	zw int,--座位
	jg int,--价格
	xm varchar(100),--姓名
	sfz varchar(100),--身份证
	ticketNum varchar(100),--票号
	inseretDate datetime--购买日期
);

基于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_lbt")
public class Lbt {
//主键
@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 pic;
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

赛程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_sc")
public class Sc {
//主键
@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 zdId;
//客队
private Integer kdId;
//日期
private Date showDate;
//轮数
private String ls;
public Integer getZdId() {return zdId;}
public void setZdId(Integer zdId) {this.zdId = zdId;}
public Integer getKdId() {return kdId;}
public void setKdId(Integer kdId) {this.kdId = kdId;}
public Date getShowDate() {return showDate;}
public void setShowDate(Date showDate) {this.showDate = showDate;}
public String getLs() {return ls;}
public void setLs(String ls) {this.ls = ls;}
}

球队信息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_team")
public class Team {
//主键
@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 teamName;
//简图
private String pic;
//简介
private String jj;
public String getTeamName() {return teamName;}
public void setTeamName(String teamName) {this.teamName = teamName;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public String getJj() {return jj;}
public void setJj(String jj) {this.jj = jj;}
}

票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_ticket")
public class Ticket {
//主键
@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 scId;
//区域
private Integer qy;
//座位
private Integer zw;
//价格
private Integer jg;
//姓名
private String xm;
//身份证
private String sfz;
//票号
private String ticketNum;
//购买日期
private Date inseretDate;
public Integer getScId() {return scId;}
public void setScId(Integer scId) {this.scId = scId;}
public Integer getQy() {return qy;}
public void setQy(Integer qy) {this.qy = qy;}
public Integer getZw() {return zw;}
public void setZw(Integer zw) {this.zw = zw;}
public Integer getJg() {return jg;}
public void setJg(Integer jg) {this.jg = jg;}
public String getXm() {return xm;}
public void setXm(String xm) {this.xm = xm;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getTicketNum() {return ticketNum;}
public void setTicketNum(String ticketNum) {this.ticketNum = ticketNum;}
public Date getInseretDate() {return inseretDate;}
public void setInseretDate(Date inseretDate) {this.inseretDate = inseretDate;}
}

基于Java的英超联赛票务系统的设计与实现spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

轮播图javaBean创建语句如下:


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

//轮播图
public class Lbt  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//图片
private String pic;
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

赛程javaBean创建语句如下:


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

//赛程
public class Sc  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//主队
private Integer zdId;
//客队
private Integer kdId;
//日期
private Date showDate;
//轮数
private String ls;
public Integer getZdId() {return zdId;}
public void setZdId(Integer zdId) {this.zdId = zdId;}
public Integer getKdId() {return kdId;}
public void setKdId(Integer kdId) {this.kdId = kdId;}
public Date getShowDate() {return showDate;}
public void setShowDate(Date showDate) {this.showDate = showDate;}
public String getLs() {return ls;}
public void setLs(String ls) {this.ls = ls;}
}

球队信息javaBean创建语句如下:


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

//球队信息
public class Team  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//名称
private String teamName;
//简图
private String pic;
//简介
private String jj;
public String getTeamName() {return teamName;}
public void setTeamName(String teamName) {this.teamName = teamName;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public String getJj() {return jj;}
public void setJj(String jj) {this.jj = jj;}
}

票javaBean创建语句如下:


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

//票
public class Ticket  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//赛程
private Integer scId;
//区域
private Integer qy;
//座位
private Integer zw;
//价格
private Integer jg;
//姓名
private String xm;
//身份证
private String sfz;
//票号
private String ticketNum;
//购买日期
private Date inseretDate;
public Integer getScId() {return scId;}
public void setScId(Integer scId) {this.scId = scId;}
public Integer getQy() {return qy;}
public void setQy(Integer qy) {this.qy = qy;}
public Integer getZw() {return zw;}
public void setZw(Integer zw) {this.zw = zw;}
public Integer getJg() {return jg;}
public void setJg(Integer jg) {this.jg = jg;}
public String getXm() {return xm;}
public void setXm(String xm) {this.xm = xm;}
public String getSfz() {return sfz;}
public void setSfz(String sfz) {this.sfz = sfz;}
public String getTicketNum() {return ticketNum;}
public void setTicketNum(String ticketNum) {this.ticketNum = ticketNum;}
public Date getInseretDate() {return inseretDate;}
public void setInseretDate(Date inseretDate) {this.inseretDate = inseretDate;}
}

源代码下载点这里

评论