充值java代码实现 java实现账户余额充值

求简单实现网上商城功能的java代码平时在线10k人大概是让你创建一个数据库连接池 , 大小设置10k 。
下面是一个图书商城的数据库表部分,供你参考
set utf8
DROP TABLE IF EXISTS d_product;
CREATE TABLE d_product (//用来存放总商品,入图书种类
id int(12) NOT NULL auto_increment,
product_name varchar(100) NOT NULL,
description varchar(100) default NULL,
add_time bigint(20) default NULL,
fixed_price double NOT NULL,
dang_price double NOT NULL,
keywords varchar(200) default NULL,
has_deleted int(1) NOT NULL default '0',
product_pic varchar(200) default NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO d_product VALUES (23,'上课睡觉的故事','上课睡觉的故事',1237873000234,200,180,'key',0,'15.jpg');
DROP TABLE IF EXISTS d_book;
CREATE TABLE d_book (//用来存放图书的具体内容
id int(12) NOT NULL,
author varchar(200) NOT NULL,
publishing varchar(200) NOT NULL,
publish_time bigint(20) NOT NULL,
word_number varchar(15) default NULL,
which_edtion varchar(15) default NULL,
total_page varchar(15) default NULL,
print_time int(20) default NULL,
print_number varchar(15) default NULL,
isbn varchar(25) default NULL,
author_summary text NOT NULL,
catalogue text NOT NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO d_book VALUES (24,'阿斗,'地球出版社',1237873000234,'1万','1','100',1,NULL,'12345678','无描述,'好书!');
DROP TABLE IF EXISTS d_category;
CREATE TABLE d_category (//商城图书目录
id int(12) NOT NULL auto_increment,
turn int(10) NOT NULL,
en_name varchar(200) NOT NULL,
name varchar(200) NOT NULL,
description varchar(200),
parent_id int(10),
PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO d_category VALUES (1,1,'Book','图书',NULL,0);
DROP TABLE IF EXISTS d_category_product;
CREATE TABLE d_category_product (//这个是连接目录和书籍具体信息的表
id int(12) NOT NULL auto_increment,
product_id int(10) NOT NULL,
cat_id int(10) NOT NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO d_category_product VALUES (72,24,1);
DROP TABLE IF EXISTS d_item;
CREATE TABLE d_item (//这个订单条目表
id int(12) NOT NULL auto_increment,
order_id int(10) NOT NULL,
product_id int(10) NOT NULL,
product_name varchar(100) NOT NULL,
dang_price double NOT NULL,
product_num int(10) NOT NULL,
amount double NOT NULL,
PRIMARY KEY(id)
)
DROP TABLE IF EXISTS d_order;
CREATE TABLE d_order (//订单表
id int(10) NOT NULL auto_increment,
user_id int(10) NOT NULL,
status int(10) NOT NULL,
order_time bigint(20) NOT NULL,
order_desc varchar(100) default NULL,
total_price double NOT NULL,
receive_name varchar(100) default NULL,
full_address varchar(200) default NULL,
postal_code varchar(8) default NULL,
mobile varchar(20) default NULL,
phone varchar(20) default NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB;
DROP TABLE IF EXISTS d_receive_address;
CREATE TABLE d_receive_address (//收件人信息表
id int(12) NOT NULL auto_increment,
user_id int(11) NOT NULL,
receive_name varchar(20) NOT NULL,
full_address varchar(200) NOT NULL,
postal_code varchar(8) NOT NULL,
mobile varchar(15) default NULL,
phone varchar(20) default NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB;
insert into d_receive_address values(1, 6,'Java','sun.cn','10000800','12345','67890');
insert into d_receive_address values(2, 6,'JavaJavaJava','ibm.cn','10000600','12345','67890');
DROP TABLE IF EXISTS d_user;

推荐阅读