web film management system

Today we will analyze a web-based cinema management system, this system has a safety database backup program, easy to use, imitation WIN-DOWS operating mode, allows you to quickly get started.
A web-based project management system for the movie using the framework MYECLIPSE as SSM (MYECLIPSE), the choice of development tools. Web-based management system to a movie project background.
In order to complete the web-based cinema management system, we first need to analyze the needs of the system. A web of film-based management system should include the user role administrator. In order to allow the user a smooth landing system to complete the related operations, landing roles you need to set up an account and password for each field.

We summarize the results of the film web based project management system for all data: administrator (admin), user (yonghu), movies (dianying)

Table web-based administrator movie management systems

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | administrator the above mentioned id 
username |  VARCHAR ( 255 ) |  | account 
password |  VARCHAR ( 255 ) |  | password

 

Table web-based user management systems movies

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | user the above mentioned id 
nicheng |  VARCHAR ( 255 ) |  | nickname 
username |  VARCHAR ( 255 ) |  | account 
password |  VARCHAR ( 255 ) |  | password 
yue |  VARCHAR ( 255 ) |  | balance

 

Web-based management system of movie film list

Field Name | Type | property | describe 
the above mentioned id |  INT ( 11 ) |  PRIMARY  KEY  | movies the above mentioned id 
biaoti |  VARCHAR ( 255 ) |  | title 
Jieshao |  VARCHAR ( 255 ) |  | Introduction 
qingxidu |  VARCHAR ( 255 ) |  | definition 
zhuangtai |  VARCHAR ( 255 ) |  |State 
zujin |  VARCHAR ( 255 ) |  | rent

 

 

SET FOREIGN_KEY_CHECKS=0;

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

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

-- Table structure for ggyindieguanli

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

DROP TABLE IF EXISTS `t_admin`;

CREATE TABLE `t_admin` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '管理员id',`username` VARCHAR(255) DEFAULT NULL COMMENT '账号', `password` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' password ' , a PRIMARY  KEY (` id`) 

) ENGINE = MyISAM the DEFAULT the CHARSET = UTF8 the COMMENT = ' Administrators ' ; 

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

the DROP  TABLE  the IF  EXISTS `t_yonghu`; 

the CREATE  TABLE ` t_yonghu` ( `id` the INT ( . 11 ) the NOT  NULL the AUTO_INCREMENT the COMMENT ' user id' , `Nicheng` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' nickname ' ,` username` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' account number ' , `password` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' password ' ,` yue` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' balance ' , a PRIMARY  KEY ( `id`)

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

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

DROP TABLE IF EXISTS `t_dianying`;

CREATE TABLE `t_dianying` (`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '电影id',`biaoti` VARCHAR(255) DEFAULT NULL COMMENT '标题',`jieshao` VARCHAR(5000 ) the DEFAULT  NULL the COMMENT ' introduction ' , `qingxidu` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' sharpness ' ,` zhuangtai` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' state ' , `zujin` VARCHAR ( 255 ) the DEFAULT  NULL the COMMENT ' rent ' , a PRIMARY  KEY ( `id`) 

) ENGINE = MyISAM the DEFAULTThe CHARSET = UTF8 the COMMENT = ' movie ' ;

 

 

Add movies modules:

By adding film modules can be added to complete the operation of the film. Jump all the information on the page to add movies page, enter a movie, click the Add operation, the movie data submitted to the dianyingController in to post. Field information contained in the film, including the title, description, definition, state rent. In dianyingController accept all the movie parameters defined dianying. Using the insert method dianyingdao dianying entities into the database. The process of adding data corresponding to the matching dianyingxml complete the insertion operation is performed in the sql statement in dianyingMapper. The part of the core code is as follows:

The page transmitted through the film insert method dianyingdao added to the database dianyingdao.insert (dianying);

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

Back to Movie Management Interface

return "forward:/tianjiadianying.action";

Query film modules:

In the browser when entering the movie query page, then the browser address bar is dianyingguanli.action, the address will respond dianyingController class dianyingguanli, in the process, get all the movie information selectByexample method, and the information save the request, make cycle through the pages. The part of the core code is as follows:

Film samples generated class definition of query by example DianyingExample example = new DianyingExample ();

Check out all the movie information List dianyingall = dianyingdao.selectByExample (example) by selectByExample method of dianyingdao;

The movie information, saved to the request, make the show request.setAttribute ( "dianyingall", dianyingall) page by foreach method;

Back to Movie Management Interface

return "forward:/dianyingguanli.action";

Editing movies modules:

Click the Edit button, you can jump to the movie page modify. In the film modification page, the movie will initialize all of the information, and information correspond to the corresponding edit field is filled. After editing the movie information page by encapsulating the data post method is a solid film, passed into the dianyingController. In xiugaidianying the reception, after reception is completed, the call updateByPrimaryKeySelective method dianyingMapper modified. The part of the code as follows:

Corresponding modified film dianyingdao.updateByPrimaryKeySelective (dianying) by modifying the method according to the id of dianyingdao;

The success of the film to modify information stored in the message request, give the user prompt request.setAttribute in the page ( "message", "modify the movie information successfully");

Back to Movie Management Interface

return "forward:/dianyingguanli.action";

Delete movies modules:

By a label, shanchudianying the page? Id = id will be passed to the background, the film is received by id shanchudianying. Use of deleteByid

Delete the movie, complete the deletion. Delete the definition of a successful message, delete the success of the film, and saved to the request, the part of the code is as follows:

Delete by deleting the corresponding method according dianyingdao id film dianyingdao.deleteByPrimaryKey (id);

The success of the movie will be deleted information, saved to the message request, the user is given prompt request.setAttribute in the page ( "message", "Delete movie success");

Back to Movie Management Interface

return "forward:/dianyingguanli.action";

 

Source download

Guess you like

Origin www.cnblogs.com/zxkxbz/p/11672300.html