This is a big assignment for a course (Internet Database) that I completed independently in my junior year. The website adopts independent design and development from the underlying database, back-end framework, and front-end pages, with basic functions such as demand release, shopping cart, and order processing. It innovatively embeds Intel RealSense gesture recognition technology for login verification. It writes a crawler program to obtain nearly 40,000 handicraft products on Taobao. The database information is huge, and search, classification processing and other work are done.
Installation and deployment
The front-end status of the library is as follows:
+----------------+
+--->crafts require <-----------------------------+
| +----------------+ |
| |
| +----------------+ |
+--->crafts overview | +---------------+ |
| +----------------+ +---->publish needs +--(json)
+-------+ | | +---------------+
| | | |
| index | | +---------------+ | +---------------+
| +--(login/regist)-+--->user management+---+----> profile |
+-------+ | +---------------+ | +---------------+
| |
| | +--------------+
| +----> my orders |
| +---------------+ +--------------+
+--->product detail |
+---------------+
Developed using php, providing MVC framework
ER picture 
SQL:
-- MySQL Script generated by MySQL Workbench
-- 12/01/15 16:12:22
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS, UNIQUE_CHECKS = 0 ;
SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS = 0 ;
SET @OLD_SQL_MODE = @@SQL_MODE, SQL_MODE = ' TRADITIONAL,ALLOW_INVALID_DATES ' ;
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema handicrafts
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema handicrafts
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS ` handicrafts ` DEFAULT CHARACTER SET latin1 ;
USE ` handicrafts ` ;
-- -----------------------------------------------------
-- Table `handicrafts`.`admin`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` admin ` (
` id ` INT ( 11 ) NOT NULL AUTO_INCREMENT,
` user ` VARCHAR ( 32 ) NULL DEFAULT NULL ,
` password ` VARCHAR ( 32 ) NULL DEFAULT NULL ,
PRIMARY KEY ( ` id ` ))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`city`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` city ` (
` id ` INT ( 11 ) NOT NULL AUTO_INCREMENT,
` city ` VARCHAR ( 30 ) NOT NULL ,
` parentid ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` layer ` TINYINT ( 4 ) NOT NULL DEFAULT ' 1 ' ,
` sort ` TINYINT ( 4 ) NOT NULL DEFAULT ' 1 ' ,
PRIMARY KEY ( ` id ` ))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`communicate`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` communicate ` (
` id ` INT ( 11 ) NOT NULL AUTO_INCREMENT,
` userid ` INT ( 11 ) NOT NULL ,
` time ` VARCHAR ( 20 ) NOT NULL DEFAULT ' 0 ' ,
` content ` TEXT NULL DEFAULT NULL ,
PRIMARY KEY ( ` id ` ))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`sort`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` sort ` (
` id ` INT ( 11 ) NOT NULL AUTO_INCREMENT,
` name ` VARCHAR ( 20 ) NOT NULL DEFAULT ' 0 ' ,
PRIMARY KEY ( ` id ` ))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`crafts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` crafts ` (
` id ` INT ( 11 ) NOT NULL ,
` name ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` type ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` price ` INT ( 11 ) NULL DEFAULT NULL ,
` color ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` seller ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` selleradd ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` phone ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` title ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` store ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` description ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
` img ` VARCHAR ( 45 ) NULL DEFAULT NULL ,
PRIMARY KEY ( ` id ` ),
CONSTRAINT ` fk_crafts_sort1 `
FOREIGN KEY ( ` id ` )
REFERENCES ` handicrafts ` . ` sort ` ( ` id ` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`order`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` order ` (
` id ` INT ( 11 ) NOT NULL AUTO_INCREMENT,
` productName ` VARCHAR ( 20 ) NOT NULL ,
` price ` INT ( 11 ) NOT NULL ,
` number ` INT ( 11 ) NOT NULL ,
` state ` TINYINT ( 4 ) NOT NULL DEFAULT ' 0 ' ,
` buyername ` VARCHAR ( 20 ) NULL DEFAULT NULL ,
` buyerphone ` VARCHAR ( 20 ) NULL DEFAULT NULL ,
` buyeraddress ` VARCHAR ( 30 ) NULL DEFAULT NULL ,
` sellername ` VARCHAR ( 20 ) NULL DEFAULT NULL ,
` sellerphone ` VARCHAR ( 20 ) NULL DEFAULT NULL ,
` selleraddress ` VARCHAR ( 30 ) NULL DEFAULT NULL ,
` comments ` TEXT NULL DEFAULT NULL ,
` time1 ` VARCHAR ( 20 ) NOT NULL DEFAULT ' 0 ' ,
` time2 ` VARCHAR ( 20 ) NOT NULL DEFAULT ' 0 ' ,
` time3 ` VARCHAR ( 20 ) NOT NULL DEFAULT ' 0 ' ,
` time4 ` VARCHAR ( 20 ) NOT NULL DEFAULT ' 0 ' ,
` bcomment ` TEXT NULL DEFAULT NULL ,
` somment ` TEXT NULL DEFAULT NULL ,
PRIMARY KEY ( ` id ` ))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`member`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` member ` (
` id ` INT ( 11 ) NOT NULL AUTO_INCREMENT,
` username ` VARCHAR ( 100 ) NOT NULL ,
` password ` VARCHAR ( 100 ) NOT NULL ,
` Email ` VARCHAR ( 50 ) NOT NULL DEFAULT ' 0 ' ,
` type ` TINYINT ( 4 ) NOT NULL DEFAULT ' 0 ' ,
` money ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` bgood ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` baverage ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` bbad ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` sgood ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` saverage ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` sbad ` INT ( 11 ) NOT NULL DEFAULT ' 0 ' ,
` name ` VARCHAR ( 20 ) NULL DEFAULT NULL ,
` phone ` VARCHAR ( 20 ) NULL DEFAULT NULL ,
` qq ` VARCHAR ( 15 ) NULL DEFAULT NULL ,
` order_id ` INT ( 11 ) NOT NULL ,
` communicate_id ` INT ( 11 ) NOT NULL ,
PRIMARY KEY ( ` id ` , ` communicate_id ` ),
UNIQUE INDEX ` username ` ( ` username ` ASC ),
INDEX ` fk_member_order_idx ` ( ` order_id ` ASC ),
INDEX ` fk_member_communicate1_idx ` ( ` communicate_id ` ASC ),
CONSTRAINT ` fk_member_communicate1 `
FOREIGN KEY ( ` communicate_id ` )
REFERENCES ` handicrafts ` . ` communicate ` ( ` id ` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT ` fk_member_order `
FOREIGN KEY ( ` order_id ` )
REFERENCES ` handicrafts ` . ` order ` ( ` id ` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`order_has_crafts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` order_has_crafts ` (
` order_id ` INT ( 11 ) NOT NULL ,
` crafts_id ` INT ( 11 ) NOT NULL ,
PRIMARY KEY ( ` order_id ` , ` crafts_id ` ),
INDEX ` fk_order_has_crafts_crafts1_idx ` ( ` crafts_id ` ASC ),
INDEX ` fk_order_has_crafts_order1_idx ` ( ` order_id ` ASC ),
CONSTRAINT ` fk_order_has_crafts_crafts1 `
FOREIGN KEY ( ` crafts_id ` )
REFERENCES ` handicrafts ` . ` crafts ` ( ` id ` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT ` fk_order_has_crafts_order1 `
FOREIGN KEY ( ` order_id ` )
REFERENCES ` handicrafts ` . ` order ` ( ` id ` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`store`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` store ` (
` id ` INT ( 11 ) NOT NULL AUTO_INCREMENT,
` itemid ` INT ( 11 ) NOT NULL ,
` userid ` INT ( 11 ) NOT NULL ,
` order_id ` INT ( 11 ) NOT NULL ,
PRIMARY KEY ( ` id ` ),
INDEX ` fk_store_order1_idx ` ( ` order_id ` ASC ),
CONSTRAINT ` fk_store_order1 `
FOREIGN KEY ( ` order_id ` )
REFERENCES ` handicrafts ` . ` order ` ( ` id ` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;
-- -----------------------------------------------------
-- Table `handicrafts`.`groupChou`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ` handicrafts ` . ` groupChou ` (
` id ` INT NOT NULL AUTO_INCREMENT,
` title ` VARCHAR ( 45 ) NULL ,
` num ` INT NULL ,
` subtitle ` VARCHAR ( 45 ) NULL ,
` description ` VARCHAR ( 45 ) NULL ,
` beginTime ` VARCHAR ( 45 ) NULL ,
` endTime ` VARCHAR ( 45 ) NULL ,
` img ` VARCHAR ( 45 ) NULL ,
PRIMARY KEY ( ` id ` ))
ENGINE = InnoDB;
SET SQL_MODE = @OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS = @OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS = @OLD_UNIQUE_CHECKS;
The reference instructions for third-party library are as follows:
| Quote content | Quote Source | effect |
|---|---|---|
| Bootstrap 3.0 | http://getbootstrap.com/ | UI framework and basic CSS components |
| Jquery1.9.2 | http://jquery.com | Used for front-end ajax, interactive effects, and function selectors |
| Intel RealSense SDK | https://software.intel.com/zh-cn/intel-realsense-sdk | For gesture verification |
| Jsoup | http://jsoup.org/ | Used to crawl data information |
| Gaode map API | http://ditu.amap.com/ | Used for location services |
| Discuz!X3.5 | http://www.discuz.net/ | Used forum services |
| baidu share | http://share.baidu.com/ | Provide product sharing functions for multiple social network interfaces such as WeChat |
The project code statistics are as follows:
| language | JavaScript | HTML/CSS | C++/Java | PHP |
|---|---|---|---|---|
| Original code lines (excluding comments) | 2488 | 1179 | 745 | 3872 |
| Third-party code library | 1033 | 700 | none | none |
(Jquery1.8.js is calculated by 1 line / Jquery-ui.js is calculated by 100 lines)