java shopping malls Information Management System

In the study of the mall-based javaweb information management system when the project for future timely access to records about this platform in the development process javaweb malls Information Management System Based on. In the study, when the selection of the SSM (MYECLIPSE), whether this framework is to learn or use are very convenient, simple and approachable.
Javaweb mall project information management system based on user roles have included administrators, businesses, each character contains its own user name and password.

Summary drawn javaweb mall management information system project based on all the data: the administrator (admin), merchant (shanghu), commodities (shangping)

Based administrator table javaweb mall management information systems

Field Name | Type | property | Description
id |  INT ( 11 ) |  PRIMARY  KEY  | administrator id
username |  VARCHAR ( 255 ) |  | account
password |  VARCHAR ( 255 ) |  | password

 

Table javaweb based business information management systems mall

Field Name | Type | property | Description
id |  INT ( 11 ) |  PRIMARY  KEY  | merchant id
puming |  VARCHAR ( 255 ) |  | shop name
username |  VARCHAR ( 255 ) |  | account
password |  VARCHAR ( 255 ) |  | password
Jieshao |  VARCHAR ( 255 ) |  | Introduction

 

Based on merchandise table javaweb mall information management systems

Field Name | Type | property | Description
id |  INT ( 11 ) |  PRIMARY  KEY  | Product id
biaoti |  VARCHAR ( 255 ) |  | Title
neirong |  VARCHAR ( 255 ) |  | Content
Jianshu |  VARCHAR ( 255 ) |  | number
jiage |  VARCHAR ( 255 ) |  | Price

 

 

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------

-- ----------------------------

-- Table structure for ggjyjavawebdscxxglxt

-- ----------------------------

DROP TABLE IF EXISTS `t_admin`;

The CREATE  TABLE `t_admin` (` id` the INT ( . 11 ) the NOT  NULL the AUTO_INCREMENT the COMMENT " administrator ID ' ,` username` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' account number ' , `password` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' password ' , PRIMARY  KEY ( `id`)

) ENGINE = MyISAM the DEFAULT the CHARSET = UTF8 the COMMENT = " Administrator " ;

-- ----------------------------

DROP TABLE IF EXISTS `t_shanghu`;

The CREATE  TABLE `t_shanghu` (` id` the INT ( . 11 ) the NOT  NULL the AUTO_INCREMENT the COMMENT " merchant ID ' ,` puming` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' shop name ' , `username` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' account number ' , `password` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' password ' ,` jieshao`VARCHAR ( 5000 ) the DEFAULT  NULL the COMMENT ' introduction ' , a PRIMARY  KEY ( `id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='商户';

-- ----------------------------

DROP TABLE IF EXISTS `t_shangping`;

The CREATE  TABLE `t_shangping` (` id` the INT ( . 11 ) the NOT  NULL the AUTO_INCREMENT the COMMENT ' commodity ID ' , `biaoti` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' title ' ,` neirong` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' content ' , jianshu` ` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' number of items ' ,` jiage` VARCHAR( 255 ) the DEFAULT  NULL the COMMENT ' price ' , a PRIMARY  KEY ( `id`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='商品';

 

 

 

Add product modules:

Product present in the system to add functionality, by clicking the Add item can jump to the functional module, the functional module, fill in the corresponding product information. Product information contains a title, content, number, price, after filling out all the information, the data submitted by the post method to tianjiashangping.action, the address server responds shangpingController tianjiashangpingact Method in class. Response result, for all the acquired product information, a package shangping class, using the insert method shangpingdao shangpingController defined in the class, the product data is inserted into shangping database table. And gives the user prompts, add items successfully, save the information to the message request, this information will be shown on the page. The part of the core code is as follows:

The page transmitted by the insert method shangpingdao product adding to the database shangpingdao.insert (shangping);

Add the successful product information, saved to the message request, the user is given prompt request.setAttribute in the page ( "message", "add product success");

Return Merchandise Management Interface

return "forward:/tianjiashangping.action";

Query Product Module:

When goods enter the query page in a browser, then the browser address bar is shangpingguanli.action, the address will respond shangpingController class shangpingguanli, in the process, get all the product information by selectByexample method, and the information save the request, make cycle through the pages. The part of the core code is as follows:

Generating sample commodity classes, ShangpingExample example = new ShangpingExample () define the query by example;

Query all merchandise information List shangpingall = shangpingdao.selectByExample (example) by the method shangpingdao of selectByExample;

The product information stored in the request, on display request.setAttribute ( "shangpingall", shangpingall) page by foreach method;

Return Merchandise Management Interface

return "forward:/shangpingguanli.action";

Edit store modules:

Click the Edit button, you can jump to modify the product page. In commodity modify the page, it will initialize all information and correspondence information of the merchandise to the corresponding edit field is filled. After editing product information page by encapsulating the data post method is a solid product, passed into the shangpingController. In xiugaishangping the reception, after reception is completed, the call updateByPrimaryKeySelective method shangpingMapper modified. The part of the code as follows:

The modified product corresponding shangpingdao.updateByPrimaryKeySelective id shangpingdao by modifying the method of (shangping);

The amendment is successful commodity information stored in the message request, give the user prompt request.setAttribute in the page ( "message", "modify product information successfully");

Return Merchandise Management Interface

return "forward:/shangpingguanli.action";

Delete item module:

By a label, shanchushangping the page? Id = id will be passed into the background, the merchandise is received by shanchushangping id. Use of deleteByid

Delete this product, complete the deletion. Delete the definition of a successful message, delete commodity successful, and saved to the request, the part of the code is as follows:

Delete by deleting the corresponding method according shangpingdao product id shangpingdao.deleteByPrimaryKey (id);

Successful product information will be deleted, save the message request, the user is given prompt request.setAttribute in the page ( "message", "delete item successfully");

Return Merchandise Management Interface

return "forward:/shangpingguanli.action";

 

Source download

Guess you like

Origin www.cnblogs.com/hxlk/p/11672164.html