校园二手交易小程序

本文介绍了如何利用Java技术和数据库构建一款校园二手交易小程序,涵盖了从需求分析到前后端开发,再到Android和Web App适配的全过程,旨在提供一种便捷的校内商品交换平台。
摘要由CSDN通过智能技术生成

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

#############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_address(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	phone varchar(100) comment '电话',
	addressVal text comment '地址',
	addressName varchar(100) comment '姓名',
	ismoren varchar(100) comment '是否默认',
	province varchar(100) comment '',
	city varchar(100) comment '',
	area varchar(100) comment ''
) comment '地址';

create table t_contact(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	phone varchar(100) comment '联系方式',
	content text comment '内容',
	insertDate datetime comment '日期'
) comment '建议';

create table t_customer(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	customerName varchar(100) comment '姓名',
	sex varchar(100) comment '性别',
	address varchar(100) comment '地址',
	phone varchar(100) comment '手机',
	account int(11) comment '账户',
	jf int(11) comment '积分',
	sfz varchar(50) comment '',
	xh varchar(50) comment ''
) comment '客户';

create table t_lbt(
	id int primary key auto_increment comment '主键',
	pic varchar(100) comment '图片'
) comment '轮播图';

create table t_liaotian(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	toId int(11) comment '用户',
	content text comment '内容',
	insertDate datetime comment '日期',
	batchNum varchar(100) comment '批次'
) comment '聊天';

create table t_liuyan(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	content text comment '内容',
	insertDate datetime comment '日期',
	back text comment '回复',
	status varchar(100) comment '状态',
	v1 varchar(100) comment '',
	v2 varchar(100) comment '',
	v3 varchar(100) comment '',
	v4 datetime comment ''
) comment '留言';

create table t_order(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	productDetail text comment '订单详细',
	allPrice varchar(100) comment '订单总价格',
	status varchar(100) comment '状态',
	orderNum varchar(100) comment '订单编号',
	pl text comment '物流信息',
	insertDate datetime comment '日期',
	userId int(11) comment '',
	orderDate varchar(50) comment '',
	address varchar(1000) comment '',
	xj varchar(1000) comment '',
	pic varchar(1000) comment '',
	content varchar(1000) comment '',
	plDate datetime comment '',
	plr varchar(50) comment ''
) comment '订单';

create table t_orderlist(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	orderId int(11) comment '订单',
	productId int(11) comment '菜品',
	sl int(11) comment '',
	productName varchar(200) comment '',
	price int(11) comment '',
	productPic1 varchar(200) comment '',
	xj varchar(200) comment '',
	content text comment '',
	plDate datetime comment '',
	pic varchar(200) comment '',
	customerName varchar(200) comment ''
) comment '订单详情';

create table t_pinglun(
	id int primary key auto_increment comment '主键',
	wdxxId int(11) comment '评论信息',
	customerId int(11) comment '评论人',
	content text comment '评论内容',
	insertDate datetime comment '评论日期'
) comment '评论';

create table t_pinglun_product(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '评论信息',
	customerId int(11) comment '评论人',
	content text comment '评论内容',
	insertDate datetime comment '评论日期',
	xj varchar(50) comment '星级',
	pic varchar(200) comment ''
) comment '';

create table t_product(
	id int primary key auto_increment comment '主键',
	productName varchar(100) comment '产品名称',
	productPic1 varchar(100) comment '图片1',
	productPic2 varchar(100) comment '图片2',
	productPic3 varchar(100) comment '图片3',
	productPic4 varchar(100) comment '图片4',
	price int(11) comment '价格',
	oldPrice int(11) comment '原价',
	content text comment '内容',
	nums int(11) comment '数量',
	tjxj varchar(50) comment '推荐星级',
	status varchar(50) comment '状态',
	typesId int(11) comment '分类',
	jf int(11) comment '积分',
	customerId int(11) comment '商家',
	bqId int(11) comment '标签',
	v1 varchar(100) comment '书名',
	v2 varchar(100) comment '作者',
	v3 varchar(100) comment '出售数量'
) comment '产品';

create table t_productview(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	customerId int(11) comment '用户',
	insertDate datetime comment '日期'
) comment '浏览记录';

create table t_shopcar(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	num int(11) comment '数量',
	customerId int(11) comment ''
) comment '购物车';

create table t_shoucang(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	customerId int(11) comment '用户',
	insertDate datetime comment '日期'
) comment '收藏';

create table t_tl(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	customerId int(11) comment '用户',
	content text comment '内容',
	insertDate datetime comment '日期'
) comment '讨论';

create table t_types(
	id int primary key auto_increment comment '主键',
	typesName varchar(1000) comment '分类'
) comment '分类';

create table t_user(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	name varchar(100) comment '姓名',
	gh varchar(100) comment '工号',
	mobile varchar(100) comment '手机'
) comment '普通员工';

create table t_wdxx(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '我',
	title varchar(100) comment '标题',
	pic varchar(100) comment '图片',
	content text comment '内容',
	zan int(11) comment '赞',
	insertDate datetime comment '发布日期',
	nologin varchar(50) comment '',
	bkId int(11) comment '',
	lx varchar(50) comment '类型'
) comment '我的消息';

create table t_zuoye(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	content text comment '说明',
	fileUrl varchar(100) comment '附件',
	insertDate datetime comment '日期',
	back text comment '回复',
	pf int(11) comment '评分',
	status varchar(100) comment '状态',
	v1 varchar(100) comment '',
	v2 varchar(100) comment '',
	v3 varchar(100) comment '',
	v4 datetime comment ''
) comment '作业';

create table t_zx(
	id int primary key auto_increment comment '主键',
	title varchar(100) comment '标题',
	content longtext comment '内容',
	pic varchar(100) comment '图片',
	showDate varchar(50) comment ''
) comment '资讯';




#############oracle数据库创建语句###################
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_address(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	phone varchar(100) comment '电话',
	addressVal text comment '地址',
	addressName varchar(100) comment '姓名',
	ismoren varchar(100) comment '是否默认',
	province varchar(100) comment '',
	city varchar(100) comment '',
	area varchar(100) comment ''
) comment '地址';

create table t_contact(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	phone varchar(100) comment '联系方式',
	content text comment '内容',
	insertDate datetime comment '日期'
) comment '建议';

create table t_customer(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	customerName varchar(100) comment '姓名',
	sex varchar(100) comment '性别',
	address varchar(100) comment '地址',
	phone varchar(100) comment '手机',
	account int(11) comment '账户',
	jf int(11) comment '积分',
	sfz varchar(50) comment '',
	xh varchar(50) comment ''
) comment '客户';

create table t_lbt(
	id int primary key auto_increment comment '主键',
	pic varchar(100) comment '图片'
) comment '轮播图';

create table t_liaotian(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	toId int(11) comment '用户',
	content text comment '内容',
	insertDate datetime comment '日期',
	batchNum varchar(100) comment '批次'
) comment '聊天';

create table t_liuyan(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	content text comment '内容',
	insertDate datetime comment '日期',
	back text comment '回复',
	status varchar(100) comment '状态',
	v1 varchar(100) comment '',
	v2 varchar(100) comment '',
	v3 varchar(100) comment '',
	v4 datetime comment ''
) comment '留言';

create table t_order(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	productDetail text comment '订单详细',
	allPrice varchar(100) comment '订单总价格',
	status varchar(100) comment '状态',
	orderNum varchar(100) comment '订单编号',
	pl text comment '物流信息',
	insertDate datetime comment '日期',
	userId int(11) comment '',
	orderDate varchar(50) comment '',
	address varchar(1000) comment '',
	xj varchar(1000) comment '',
	pic varchar(1000) comment '',
	content varchar(1000) comment '',
	plDate datetime comment '',
	plr varchar(50) comment ''
) comment '订单';

create table t_orderlist(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	orderId int(11) comment '订单',
	productId int(11) comment '菜品',
	sl int(11) comment '',
	productName varchar(200) comment '',
	price int(11) comment '',
	productPic1 varchar(200) comment '',
	xj varchar(200) comment '',
	content text comment '',
	plDate datetime comment '',
	pic varchar(200) comment '',
	customerName varchar(200) comment ''
) comment '订单详情';

create table t_pinglun(
	id int primary key auto_increment comment '主键',
	wdxxId int(11) comment '评论信息',
	customerId int(11) comment '评论人',
	content text comment '评论内容',
	insertDate datetime comment '评论日期'
) comment '评论';

create table t_pinglun_product(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '评论信息',
	customerId int(11) comment '评论人',
	content text comment '评论内容',
	insertDate datetime comment '评论日期',
	xj varchar(50) comment '星级',
	pic varchar(200) comment ''
) comment '';

create table t_product(
	id int primary key auto_increment comment '主键',
	productName varchar(100) comment '产品名称',
	productPic1 varchar(100) comment '图片1',
	productPic2 varchar(100) comment '图片2',
	productPic3 varchar(100) comment '图片3',
	productPic4 varchar(100) comment '图片4',
	price int(11) comment '价格',
	oldPrice int(11) comment '原价',
	content text comment '内容',
	nums int(11) comment '数量',
	tjxj varchar(50) comment '推荐星级',
	status varchar(50) comment '状态',
	typesId int(11) comment '分类',
	jf int(11) comment '积分',
	customerId int(11) comment '商家',
	bqId int(11) comment '标签',
	v1 varchar(100) comment '书名',
	v2 varchar(100) comment '作者',
	v3 varchar(100) comment '出售数量'
) comment '产品';

create table t_productview(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	customerId int(11) comment '用户',
	insertDate datetime comment '日期'
) comment '浏览记录';

create table t_shopcar(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	num int(11) comment '数量',
	customerId int(11) comment ''
) comment '购物车';

create table t_shoucang(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	customerId int(11) comment '用户',
	insertDate datetime comment '日期'
) comment '收藏';

create table t_tl(
	id int primary key auto_increment comment '主键',
	productId int(11) comment '产品',
	customerId int(11) comment '用户',
	content text comment '内容',
	insertDate datetime comment '日期'
) comment '讨论';

create table t_types(
	id int primary key auto_increment comment '主键',
	typesName varchar(1000) comment '分类'
) comment '分类';

create table t_user(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	name varchar(100) comment '姓名',
	gh varchar(100) comment '工号',
	mobile varchar(100) comment '手机'
) comment '普通员工';

create table t_wdxx(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '我',
	title varchar(100) comment '标题',
	pic varchar(100) comment '图片',
	content text comment '内容',
	zan int(11) comment '赞',
	insertDate datetime comment '发布日期',
	nologin varchar(50) comment '',
	bkId int(11) comment '',
	lx varchar(50) comment '类型'
) comment '我的消息';

create table t_zuoye(
	id int primary key auto_increment comment '主键',
	customerId int(11) comment '用户',
	content text comment '说明',
	fileUrl varchar(100) comment '附件',
	insertDate datetime comment '日期',
	back text comment '回复',
	pf int(11) comment '评分',
	status varchar(100) comment '状态',
	v1 varchar(100) comment '',
	v2 varchar(100) comment '',
	v3 varchar(100) comment '',
	v4 datetime comment ''
) comment '作业';

create table t_zx(
	id int primary key auto_increment comment '主键',
	title varchar(100) comment '标题',
	content longtext comment '内容',
	pic varchar(100) comment '图片',
	showDate varchar(50) comment ''
) comment '资讯';

create table t_address(
	id integer,
	customerId int(11),
	phone varchar(100),
	addressVal text,
	addressName varchar(100),
	ismoren varchar(100),
	province varchar(100),
	city varchar(100),
	area varchar(100)
);
--地址字段加注释
comment on column t_address.id is '主键';
comment on column t_address.id is '主键唯一ID';
comment on column t_address.customerId is '用户';
comment on column t_address.phone is '电话';
comment on column t_address.addressVal is '地址';
comment on column t_address.addressName is '姓名';
comment on column t_address.ismoren is '是否默认';
comment on column t_address.province is '';
comment on column t_address.city is '';
comment on column t_address.area is '';
--地址表加注释
comment on table t_address is '地址';

create table t_contact(
	id integer,
	customerId int(11),
	phone varchar(100),
	content text,
	insertDate datetime
);
--建议字段加注释
comment on column t_contact.id is '主键';
comment on column t_contact.id is '主键唯一ID';
comment on column t_contact.customerId is '用户';
comment on column t_contact.phone is '联系方式';
comment on column t_contact.content is '内容';
comment on column t_contact.insertDate is '日期';
--建议表加注释
comment on table t_contact is '建议';

create table t_customer(
	id integer,
	username varchar(100),
	password varchar(100),
	customerName varchar(100),
	sex varchar(100),
	address varchar(100),
	phone varchar(100),
	account int(11),
	jf int(11),
	sfz varchar(50),
	xh varchar(50)
);
--客户字段加注释
comment on column t_customer.id is '主键';
comment on column t_customer.id is '主键唯一ID';
comment on column t_customer.username is '账号';
comment on column t_customer.password is '密码';
comment on column t_customer.customerName is '姓名';
comment on column t_customer.sex is '性别';
comment on column t_customer.address is '地址';
comment on column t_customer.phone is '手机';
comment on column t_customer.account is '账户';
comment on column t_customer.jf is '积分';
comment on column t_customer.sfz is '';
comment on column t_customer.xh is '';
--客户表加注释
comment on table t_customer is '客户';

create table t_lbt(
	id integer,
	pic varchar(100)
);
--轮播图字段加注释
comment on column t_lbt.id is '主键';
comment on column t_lbt.id is '主键唯一ID';
comment on column t_lbt.pic is '图片';
--轮播图表加注释
comment on 
  • 1
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值