SpringMVC: video explaining programming problems

Video explanation

BiliBili link

SpringMVC programming questions

Programming questions

Z company customer relationship management system: In order to better discover the value of old customers and develop more new customers, Z company decided to implement a customer relationship management system. Hope to complete the full sharing and standardized management of customer service information through this system.

Some functions of the system and the results of preliminary demand analysis

(1) Company Z has sales department, marketing department and other departments. Department information includes department number, department name, supervisor, contact number, and mailbox number; each department has only one supervisor, who is only responsible for managing the work of the department, and the supervisor refers to the employee number of the employee relationship; there are multiple employees in a department, each Employees belong to one and only one department.

(2) Employee information includes employee number, name, position, and contact information. Positions include product manager, sales manager, account manager, etc. Each account manager is responsible for maintaining the client information for which he is responsible. One account manager can maintain multiple customers, but one customer can only be maintained by one account manager.

(3) Customer information includes customer number, customer name, bank account number, telephone number, and contact address.

(4) The account manager can add a customer interaction record that needs to record the date, location, summary and detailed information of the event, and can also fill in a remark information

Relational model design
  • Department (department number, department name, department head, contact number, email)
  • Employee (employee number, name, department number, position, entry time, contact information)
  • Customer (customer number, customer name, bank account number, phone number, contact address)
Question 1

The construction of the table using the SQL statement to achieve the department table tb_deptand an employee table tb_employeewas created.

Claim:

  1. Directly use SQL table creation syntax to complete table creation
  2. To design a reasonable primary key
  3. The field data type and length should be designed reasonably
Question 2

Add data to the database table.

Claim:

  1. Use SQL insert statement to complete the addition of data

  2. Insert data can’t be garbled

Question 3

Use MyBatis framework of interface agent, to achieve the department table tb_deptquery data.

Claim:

  1. Set up MyBatis development environment in IDEA tool, write correct SQL query statement

  2. Write test classes DeptTestto achieve compliance with the requirements of the department data query, direct output to the console

Question 4

The comprehensive test integrated with the SSM framework enables employees to query and add operations.

Claim:

1. Create a Maven project

2. Set up the MyBatis environment. The configuration content of the main configuration file can be an independent configuration file, or it can be configured into a Spring configuration
file.

3. To build a Spring environment, naming conventions are required, configuration annotations and XML are both acceptable

4. Setting up the SpringMVC environment requires scanning and loading separately from the Bean objects in the Spring IOC container.

5. Write the configuration file in web.xml and require the servlet to be created as the application loads to solve the garbled code of the post request.

6. When writing code for the presentation layer, business layer and persistence layer, subcontracting is required and the naming convention is required.

7. When implementing new operations of employees, AJAX queries department information.

8. When realizing employee's query and new operation, it is required to solve the date format conversion.

9. No matter the code or configuration, comments are required.

Want to know more, welcome to follow my WeChat public account: Renda_Zhang

Guess you like

Origin blog.csdn.net/qq_40286307/article/details/108608891