ssm JavaEE-based computer sales management system design and implementation graduation project - with source code 021143

Summary

With the rapid development of information today, the network has become an important information exchange platform for people. Stores have a large amount of computer information that needs to be released through the Internet every day. For this reason, I have developed a computer sales management system based on the B/S (browser/server) model.

The system uses SSM technology, Java programming language, MySQL, etc. as development technologies to realize adding, modifying, viewing, and deleting system data. This system splits the system in a componentized way, and analyzes and designs the addition, deletion, query and modification of each table in the database, and the constraint relationship between tables, and finally realizes a commercial-level application that meets the user's needs.

The system interface is simple and elegant, the layout is reasonable, and it is easy to operate and learn. Corresponding to every step of the user's operation, the system can give feedback with high responsiveness. The system specifically includes functions such as user management, forum list, forum classification list, computer information, computer information classification, computer mall, classification list, order list, computer recommendation, etc. It provides a management platform for computer sales to achieve efficient and efficient data management. Manage safely.

Keywords: computer sales management system; MySQL


Abstract

Today, with the rapid development of information, the network has become an important information exchange platform for people. A large amount of computer information needs to be released through the network every day. Therefore, I developed a computer sales management system based on B / S (Browser / server) mode.

The system takes SSM technology, Java programming language and MySQL as development technology to add, modify, view and delete system data. The system adopts the component-based way to split the system, and analyzes and designs the addition, deletion, query and modification of each table in the database, and the constraint relationship between tables, so as to finally realize the commercial application that meets the needs of users.

The system interface is simple and generous, the layout is reasonable, easy to operate and easy to use. The system can respond to each step of the user's operation with high response. The system specifically includes the functions of user management, forum list, forum classification list, computer information, computer information classification, computer mall, classification list, order list, computer recommendation and so on. It provides a management platform for computer sales and realizes the efficient and safe management of data.

Keywords:Computer sales management system; MySQL
Table of contents

1 Introduction

1.1 Subject research background

1.2 Significance of the subject research

1.3 Features of system development technology

2 Analysis of Computer Sales Management System

2.1 Feasibility analysis

2.1.1 Technical Feasibility Analysis

2.1.2 Economic Feasibility Analysis

2.1.3 Operation Feasibility Analysis

2.2 Demand Analysis

2.3 Use case analysis

3 Overall Design of Computer Sales Management System

3.1 System function module design

3.3 Database design

3.3.1 Database ER model

3.3.2 Database table design

4 Realization of computerized sales management system

4.1 Client

4.1.1 User registration interface

4.1.2 User login interface

4.1.3 Search property interface

4.1.4 Forum interface

4.1.5 Product Details Interface

4.1.6 My shopping cart interface

4.1.7 Computer recommendation room interface

4.2 Backend

4.2.1 Administrator login interface

4.2.2 User Management Interface

4.2.3 Site management interface

4.2.4 Content Management Management Interface

4.2.5 Mall management interface

4.2.6 More management interfaces

5 Computer sales management system test

5.1 System Test

5.2 Test results

Summary and Outlook

references

thank you

1 Introduction

1.1 Research background and significance

In recent years, with the rapid development of the mobile Internet, in addition to traditional basic applications such as web browsing, data search, and email sending, most Internet users in China have gradually become accustomed to receiving traditional functions such as shopping, communication, travel, and entertainment through the Internet. In addition to new service models, online shopping has increasingly become an important form of shopping in people's lives. The rapid development of the Internet has provided a strong guarantee and support for the development of mobile phone sales websites. In addition, the external environment for online shopping has gradually improved. Mobile Internet terminals (mobile phones, tablets) have made the structure of netizens more and more popular. Online payment The means of settlement are becoming more and more convenient, the express logistics is becoming more and more smooth, and the corresponding regulations and policies are becoming more and more perfect. Nowadays, online shopping is becoming more and more attractive to people, and people's views on online shopping have also changed from ignorance at the beginning, from suspicion to gradual trust, from rejection to acceptance and habit. The concept of online shopping has become more and more popular, and the main factors that prompt people to shop online are:

(1) Convenient and fast. Online shopping can be open 24 hours a day, people don't need to go to the store to shop, and the purchased goods can be delivered directly to their homes. In this way, consumers can buy favorite products from all over the world without leaving home.

(2) Large amount of information. Compared with the traditional way of shopping, e-commerce can accommodate a very large amount of information, including both real products and virtual products. In addition, some special products can also be provided, which can not only protect the personal privacy of consumers, but also meet the different psychological needs of consumers.

(3) Strong privacy. Sometimes when consumers buy some products that they don't want to let others know, they use online shopping, sellers and express logistics can protect the privacy of users, so as to avoid unnecessary troubles.

1.2 Development Status

Due to the rise of the online sales industry in recent years, some related information has also been learned. In China, the previous sales were only traditional sales, and online sales seemed to meet the market demand. So far, there are some household names such as Taobao and Tmall. However, this kind of online sales also has some disadvantages: users cannot pick up the goods immediately after placing an order and paying, and they should also consider whether the goods are damaged. The system was developed based on sales on the mobile phone network.

After several years of development, many online shopping malls recognized by consumers have appeared at home and abroad. The contents of these online shopping malls are diverse, and they include relatively complete functions, including registered users, user management, commodity inventory, commodity delivery, and commodity storage. Nowadays, the widespread use of the Internet has led to the development of online shopping centers at home and abroad to a certain extent. As long as enterprises type online through this platform, they can manage the content of the system at any time. Encourage consumers to purchase and conduct online transactions by displaying computer sales management system content and issuing announcements.

1.3 Features of system development technology

(1) The backend of the web background management in the computer sales management system no longer uses the ancient jsp+javabean+servlet[5] technology, but uses the current mainstream SSM[6] framework, which reduces java configuration codes and simplifies Programming code, the current SSM framework is also one of the frameworks chosen by many companies.

(2) The front end of the web background management in the computer sales management system uses the bootstrap[7] framework, which can beautify the page design with ajax[8] and jquery[9].

(3) The mysql5.7[10] used for the database in the computer sales management system has high execution efficiency.


2 Analysis of Computer Sales Management System

System analysis is a prerequisite for developing a project. Through system analysis, the basic needs of the main users of the system can be well understood, and this is also the reason for the development of the project. Further, feasibility analysis is carried out on system development, usually including technical feasibility, economic feasibility, etc. Feasibility analysis is also an analysis from the overall perspective of the project. Then it is to analyze the specific needs of the project, and the means of analysis are generally realized through the user's use case diagram. The following is a detailed introduction.

SSM framework

SSM is SpringMVVM+Spring+MySQL. These three frameworks have their own unique advantages, so combining them together can create a strong spark. The designer can create a web application program without consuming a lot of effort, and this program also has the characteristics of clear hierarchy, upgrade and update operations will not affect normal use, and allows multiple uses. This composite framework forms a system with a complete structure, powerful functions and a good structure: SpringMVVM separates each plate, Spring makes development more flexible and convenient, allows developers to directly manipulate objects, and divides labor details at each level, and realizes each level. Decoupling makes the code more flexible and streamlined. This framework enables programmers to avoid individual mistakes during the development period that lead to the destruction of the whole, and also to respond to new requirements from customers for the product in the later stage.

The relationship between the layers of the ssm framework:

Both the DAO layer and the Service layer can be developed independently, and the mutual coupling is very low, so they can be carried out independently. Such a model is especially advantageous in the process of developing large projects.

The Controller and View layers are developed together because of their high coupling, but they can also be developed independently of the first two layers as a whole. In this way, you only need to know the definition of the interface before the layer and the layer, and call the interface to complete the required logic unit application. Everything is very clear and simple.

2.1 Feasibility analysis

2.1.1 Technical Feasibility Analysis

The mysql database used for storage in the computer sales management system and the use of development tools such as IDEA and Tomcat used in development can bring a lot of convenience to our writing work. The system uses the SSM framework for development, which makes the system more scalable and maintainable, reduces java configuration code, and simplifies programming code. Currently, the SSM framework is also one of the frameworks chosen by many enterprises.

2.1.2 Economic Feasibility Analysis

The development software used in the development of the computer sales management system, such as IDEA development tools, Tomcat8.0 server, MySQL5.7 database, Photoshop image processing software, etc., are all open source and free, and the computer sales management system is designed and coded by ourselves Realized, the database uses the popular mysql for data storage, and the use of open source mysql and other technologies reduces system development costs.

2.1.3 Operation Feasibility Analysis

The design of this project refers to several development cases of websites under this mode, analyzes their operation interface, combines many cases together, and highlights the people-oriented and simplified operation, so people with basic computer knowledge can operate this project.

2.2 Demand Analysis

The web background management terminal of the computer sales management system adopts the IntelliJ IDEA 2019.3.4 development tool, cooperates with the SSM development framework in the java development language and the tomcat8.0 server[14], jdk1.8, and the WeChat terminal adopts the WeChat developer tool Stable version 1.05.2111300, the page uses wxss and wxml for layout [15], and the WeChat terminal and the web background management terminal use the json interface to communicate.

User management module:

(1) User registration and login: the user registers as a member and logs into the computer sales management system; the user adds, deletes, modifies and checks personal information, such as personal information and password modification.

(2) Users view products: Users browse product information, and after finding products they like, they can purchase + comment + bookmark.

(3) Computer information: Users browse information and view computer information released by managers.

(4) Forum: Users can view, publish and comment on the submissions submitted by users under the forum menu.

(5) Commodity purchase: The user can purchase additional commodities that he likes. In the shopping cart, when the user confirms that the submission is completed, it will be submitted to the backend system of the server and an order will be generated.

(6) My order: After the user submits the order, he can manage the submitted order.

Administrator management module:

(1) User management: The administrator can control the user information registered on the front desk, and can also control the administrator information.

(2) Computer information management: the administrator can add, delete, modify and check the computer information displayed in the computer sales management system in the background.

(3) Forum list management: administrators can add, delete, modify and check the messages submitted by users in the computer sales management system and the classification of messages.

(4) Classification management: The administrator controls the classification of commodities in the computer sales management system.

(5) Mall management: The administrator controls the commodity orders submitted by the seller.

(6) System management: The administrator can publish the carousel picture displayed on the homepage of the computer sales management system and some announcements in the system to the system, so that users can view the system information in a timely manner and make reasonable arrangements.

2.3 Use case analysis

The complete UML use case diagrams of the computer sales management system are Figure 2-1, Figure 2-2 and Figure 2-3. Include users, publishers, and administrators on participants.

Use cases of user roles include login registration, home page, forum, announcement message, computer information, shopping cart, computer recommendation, and mine.

 

                                                           Figure 2-1 User role use case diagram of computer sales management system

The use cases of the administrator role include carousel map, bulletin board, user management, forum list, forum category list, computer information, computer information category, computer mall, category list, order list, and computer recommendation.

       

                                                      Figure 2-3 Computer sales management system administrator role use case diagram

3 Overall Design of Computer Sales Management System

In the previous chapter, the functional requirements of the computer sales management system were analyzed, and the use cases in the computer sales management system were analyzed according to the requirements. Then the next step is to start designing the computer sales management system architecture, main functions and database.

3.1 System function module design

Through the functional requirements analysis and use case analysis of the computer sales management system, the functional module diagram of the computer sales management system is obtained, as shown in Figure 3-1.

 

Figure 3-1 Functional block diagram                                                of computer sales management system

3.3 Database design

3.3.1 Database ER model

The following is the ER entity relationship diagram of the database tables of the entire computer sales management system, as shown in Figure 3-2:

 

Figure 3-2 ER entity relationship diagram                                               of computer sales management system

3.3.2 Database table design

A total of many data tables need to be created through the previous ER relationship diagram. The relational models of these 7 main database tables are listed here as follows:

user_registration table:

name

type

length

not null

primary key

note

user_registration_id

int

11

yes

yes

user registration ID

gender

varchar

64

no

no

gender

examine_state

varchar

16

yes

no

Approval Status

recommend

int

11

yes

no

Intelligent Recommendation

user_id

int

11

yes

no

User ID

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

computer_recommendations table

name

type

length

not null

primary key

note

computer_recommendation_id

int

11

yes

yes

Computer recommendation ID

recommendation_number

varchar

64

no

no

Recommendation number

computer_type

varchar

64

no

no

computer type

computer_brand

varchar

64

no

no

computer brand

computer_model

varchar

64

no

no

Computer Model

computer_pictures

varchar

255

no

no

computer picture

recommendation_index

varchar

64

no

no

Recommended

introduction_to_computer

text

0

no

no

computer introduction

hits

int

11

yes

no

hits

praise_len

int

11

yes

no

Likes

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

computer_mall table:

name

type

length

not null

primary key

note

computer_mall_id

int

11

yes

yes

Computer Mall ID

remarks

text

0

no

no

Remark

recommend

int

11

yes

no

Intelligent Recommendation

cart_title

varchar

125

no

no

title tag

cart_img

text

0

no

no

cover picture

cart_description

varchar

255

no

no

describe

cart_price_ago

double

8

yes

no

original price

cart_price

double

8

yes

no

selling price

cart_inventory

int

11

yes

no

Commodity stocks

cart_type

varchar

64

yes

no

Categories

cart_content

longtext

0

no

no

text

cart_img_1

text

0

no

no

main image 1

cart_img_2

text

0

no

no

main image 2

cart_img_3

text

0

no

no

main image 3

cart_img_4

text

0

no

no

main image 4

cart_img_5

text

0

no

no

main image 5

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

type table;

name

type

length

not null

primary key

note

type_id

smallint

5

yes

yes

Category ID

name

varchar

16

yes

no

Category Name

description

varchar

255

no

no

describe

url

varchar

255

no

no

External link address

father_id

smallint

5

yes

no

parent category ID

icon

varchar

255

no

no

Category icons

create_time

timestamp

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

Order table:

name

type

length

not null

primary key

note

order_id

int

11

yes

yes

order ID

order_number

varchar

64

no

no

order number

goods_id

mediumint

8

yes

no

commodity id

title

varchar

32

no

no

Item title:

img

varchar

255

no

no

product picture

price

double

10

yes

no

price

price_ago

double

10

yes

no

original price

num

int

8

yes

no

quantity

price_count

double

8

yes

no

total price

norms

varchar

255

no

no

Specification

type

varchar

64

商品分类

contact_name

varchar

32

联系人姓名

contact_email

varchar

125

联系人邮箱

contact_phone

varchar

11

联系人手机

contact_address

varchar

255

收件地址

postal_code

varchar

9

邮政编码

user_id

int

10

买家ID

merchant_id

mediumint

8

商家ID

create_time

timestamp

0

创建时间

update_time

timestamp

0

更新时间

description

varchar

255

描述

state

varchar

16

订单状态

Forum表:

名称

类型

长度

不是null

主键

注释

forum_id

mediumint

8

论坛id

display

smallint

5

排序

user_id

mediumint

8

用户ID

nickname

varchar

16

昵称

praise_len

int

10

点赞数

hits

int

10

访问数

title

varchar

125

标题

keywords

varchar

125

关键词

description

varchar

255

描述

url

varchar

255

来源地址

tag

varchar

255

标签

img

text

0

封面图

content

longtext

0

正文

create_time

timestamp

0

创建时间

update_time

timestamp

0

更新时间

avatar

varchar

255

发帖人头像

type

varchar

64

论坛分类

4 电脑销售管理系统实现

电脑销售管理系统的详细设计与实现主要是根据前面的电脑销售管理系统的需求分析和电脑销售管理系统的总体设计来设计页面并实现业务逻辑。主要从电脑销售管理系统界面实现、业务逻辑实现这两部分进行介绍。

4.1 用户端

4.1.1 用户注册界面

不是电脑销售管理系统的会员可以通过用户进行注册,填写上自己的账号、密码、重复密码、昵称、邮箱登信息后点击“提交”按钮后将会验证是否有非空数据,再验证密码和重复密码是否一样,最后验证是否账号重复,都验证没问题后即可注册成功。注册实现了用户注册和发布者注册两部分,其用户注册界面展示如下图4-1所示。

 

图4-1用户注册界面图

用户注册关键代码如下所示。

/**

     * 注册

     * @param user

     * @return

     */

    @PostMapping("register")

    public Map<String, Object> signUp(@RequestBody User user) {

        // 查询用户

        Map<String, String> query = new HashMap<>();

        query.put("username",user.getUsername());

        List list = service.select(query, new HashMap<>()).getResultList();

        if (list.size()>0){

            return error(30000, "用户已存在");

        }

        user.setUserId(null);

        user.setPassword(service.encryption(user.getPassword()));

        service.save(user);

        return success(1);

}

/**

     * 用户ID:[0,8388607]用户获取其他与用户相关的数据

     */

    @Id

    @GeneratedValue(strategy = GenerationType.IDENTITY)

    @Column(name = "user_id")

    private Integer userId;

    /**

     * 账户状态:[0,10](1可用|2异常|3已冻结|4已注销)

     */

    @Basic

    @Column(name = "state")

    private Integer state;

    /**

     * 所在用户组:[0,32767]决定用户身份和权限

     */

    @Basic

    @Column(name = "user_group")

    private String userGroup;

    /**

     * 上次登录时间:

     */

    @Basic

    @Column(name = "login_time")

    private Timestamp loginTime;

    /**

     * 手机号码:[0,11]用户的手机号码,用于找回密码时或登录时

     */

    @Basic

    @Column(name = "phone")

    private String phone;

    /**

     * 手机认证:[0,1](0未认证|1审核中|2已认证)

     */

    @Basic

    @Column(name = "phone_state")

    private Integer phoneState;

    /**

     * 用户名:[0,16]用户登录时所用的账户名称

     */

    @Basic

    @Column(name = "username")

    private String username;

    /**

     * 昵称:[0,16]

     */

    @Basic

    @Column(name = "nickname")

    private String nickname;

    /**

     * 密码:[0,32]用户登录所需的密码,由6-16位数字或英文组成

     */

    @Basic

    @Column(name = "password")

    private String password;

    /**

     * 邮箱:[0,64]用户的邮箱,用于找回密码时或登录时

     */

    @Basic

    @Column(name = "email")

    private String email;

    /**

     * 邮箱认证:[0,1](0未认证|1审核中|2已认证)

     */

    @Basic

    @Column(name = "email_state")

    private Integer emailState;

    /**

     * 头像地址:[0,255]

     */

    @Basic

    @Column(name = "avatar")

    private String avatar;

    /**

     * 创建时间:

     */

    @Basic

    @Column(name = "create_time")

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

    private Timestamp createTime;

    @Basic

    @Transient

    private String code;

}

4.1.2 用户登录界面

用户注册后的会员可以通过自己的用户名和密码进行登录,在用户填写好自己的用户名和密码信息并点击“登录”按钮后,将会先验证是否有非空数据,再验证填写的用户信息和数据库中保存的是否一致,一致后将会登录成功,登录成功后将会在左上角上显示用户信息;否则将会提示相应错误信息,用户登录界面如下图4-2所示。

 

图4-2用户登录界面图

登录代码如下:

    /**

     * 登录

     * @param data

     * @param httpServletRequest

     * @return

     */

    @PostMapping("login")

    public Map<String, Object> login(@RequestBody Map<String, String> data, HttpServletRequest httpServletRequest) {

        log.info("[执行登录接口]");

        String username = data.get("username");

        String email = data.get("email");

        String phone = data.get("phone");

        String password = data.get("password");

        List resultList = null;

        QueryWrapper wrapper = new QueryWrapper<User>();

        Map<String, String> map = new HashMap<>();

        if(username != null && "".equals(username) == false){

            map.put("username", username);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(email != null && "".equals(email) == false){

            map.put("email", email);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(phone != null && "".equals(phone) == false){

            map.put("phone", phone);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }else{

            return error(30000, "账号或密码不能为空");

        }

        if (resultList == null || password == null) {

            return error(30000, "账号或密码不能为空");

        }

        //判断是否有这个用户

        if (resultList.size()<=0){

            return error(30000,"用户不存在");

        }

        User byUsername = (User) resultList.get(0);

        Map<String, String> groupMap = new HashMap<>();

        groupMap.put("name",byUsername.getUserGroup());

        List groupList = userGroupService.selectBaseList(userGroupService.select(groupMap, new HashMap<>()));

        if (groupList.size()<1){

            return error(30000,"用户组不存在");

        }

        UserGroup userGroup = (UserGroup) groupList.get(0);

        //查询用户审核状态

        if (!StringUtils.isEmpty(userGroup.getSourceTable())){

            String res = service.selectExamineState(userGroup.getSourceTable(),byUsername.getUserId());

            if (res==null){

                return error(30000,"用户不存在");

            }

            if (!res.equals("已通过")){

                return error(30000,"该用户审核未通过");

            }

        }

        //查询用户状态

        if (byUsername.getState()!=1){

            return error(30000,"用户非可用状态,不能登录");

        }

        String md5password = service.encryption(password);

        if (byUsername.getPassword().equals(md5password)) {

            // 存储Token到数据库

            AccessToken accessToken = new AccessToken();

            accessToken.setToken(UUID.randomUUID().toString().replaceAll("-", ""));

            accessToken.setUser_id(byUsername.getUserId());

            tokenService.save(accessToken);

            // 返回用户信息

            JSONObject user = JSONObject.parseObject(JSONObject.toJSONString(byUsername));

            user.put("token", accessToken.getToken());

            JSONObject ret = new JSONObject();

            ret.put("obj",user);

            return success(ret);

        } else {

            return error(30000, "账号或密码不正确");

        }

}

    public String select(Map<String,String> query,Map<String,String> config){

        StringBuffer sql = new StringBuffer("select ");

        sql.append(config.get(FindConfig.FIELD) == null || "".equals(config.get(FindConfig.FIELD)) ? "*" : config.get(FindConfig.FIELD)).append(" ");

        sql.append("from ").append("`").append(table).append("`").append(toWhereSql(query, "0".equals(config.get(FindConfig.LIKE))));

        if (config.get(FindConfig.GROUP_BY) != null && !"".equals(config.get(FindConfig.GROUP_BY))){

            sql.append("group by ").append(config.get(FindConfig.GROUP_BY)).append(" ");

        }

        if (config.get(FindConfig.ORDER_BY) != null && !"".equals(config.get(FindConfig.ORDER_BY))){

            sql.append("order by ").append(config.get(FindConfig.ORDER_BY)).append(" ");

        }

        if (config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE))){

            int page = config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE)) ? Integer.parseInt(config.get(FindConfig.PAGE)) : 1;

            int limit = config.get(FindConfig.SIZE) != null && !"".equals(config.get(FindConfig.SIZE)) ? Integer.parseInt(config.get(FindConfig.SIZE)) : 10;

            sql.append(" limit ").append( (page-1)*limit ).append(" , ").append(limit);

        }

        log.info("[{}] - 查询操作,sql: {}",table,sql);

        return sql.toString();

}

    public List selectBaseList(String select) {

        List<Map<String,Object>> mapList = baseMapper.selectBaseList(select);

        List<E> list = new ArrayList<>();

        for (Map<String,Object> map:mapList) {

            list.add(JSON.parseObject(JSON.toJSONString(map),eClass));

        }

        return list;

}

输入有效的用户名和密码信息,点击“登录”按钮,自动跳转到“首页”页面,首页界面如下图4-3所示。

 

图4-3首页界面图

首页逻辑代码如下所示。

package com.project.demo.constant;

/**

 */

public class FindConfig {

    public static String PAGE = "page";

    public static String SIZE = "size";

    public static String LIKE = "like";

    public static String ORDER_BY = "orderby";

    public static String FIELD = "field";

    public static String GROUP_BY = "groupby";

    public static String MIN_ = "_min";

    public static String MAX_ = "_max";

}

4.1.3论坛界面

用户在点击导航栏上面的论坛后,就可以搜索查看留言信息,用户根据自己的喜好可以进行交流,论坛界面如下图4-4所示。

 

图4-4论坛界面图

4.1.4收货地址界面

当用户点击“收货地址”右后,就回去显示出目前现有的地址,也可以添加新的地址,界面如下图4-5所示。

 

图4-5收货地址界面图

4.1.5商品详情界面

当访客点击了任意商品后将会进入该款商品的详情界面,可以了解到该商品的图片信息、商品信息、价钱信息等,同时可以对该商品进行加购+立即购买+收藏+点赞+评论,商品详情展示页面如图4-6所示。

 

图4-6商品详情界面图

4.1.6我的购物车界面

当用户点击“我的购物车”链接后就进入自己购买的收入购物车的界面展示,界面如下图4-7所示。

 

图4-7购物车界面图

4.1.7电脑推荐房界面

用户在“电脑”界面选择自己提交的电脑信息,可以点击“电脑消息”,然后输入电脑信息进行提交后,在电脑界面就可以查看到自己提交的电脑信息了,可以进行支付操作,界面如下图4-8所示。

 

图4-8电脑推荐界面图

电脑推荐关键代码如下所示。

@PostMapping("/add")

    @Transactional

    public Map<String, Object> add(HttpServletRequest request) throws IOException {

        service.insert(service.readBody(request.getReader()));

        return success(1);

    }

    @Transactional

    public Map<String, Object> addMap(Map<String,Object> map){

        service.insert(map);

        return success(1);

}

4.2 后台端

4.2.1 管理员登录界面

管理员可以从浏览器上输入后台登录的网址后输入自己的用户名,密码图片验证后点击“登录”按钮后将会验证是否有非空数据,其次再验证是否和数据库中保存的一致,都验证成功后将登录成功,管理员登录界面如下图4-9所示。

 

图4-9管理员登录界面图

4.2.2用户管理界面

电脑销售管理系统中的管理人员是可以对前台注册的用户进行管理的,也可以对管理员进行管控。界面如下图4-10所示。

 

图4-10用户管理界面图

用户管理关键代码如下所示。

@RequestMapping("/get_list")

    public Map<String, Object> getList(HttpServletRequest request) {

        Map<String, Object> map = service.selectToPage(service.readQuery(request), service.readConfig(request));

        return success(map);

}

4.2.3站点管理界面

电脑销售管理系统中的管理人员在“站点管理”这一菜单中是可以对前台显示的轮播图以及公告栏进行管控。界面如下图4-11所示。

 

图4-11站点管理界面图

站点管理关键代码如下所示。

@RequestMapping(value = "/del")

    @Transactional

    public Map<String, Object> del(HttpServletRequest request) {

        service.delete(service.readQuery(request), service.readConfig(request));

        return success(1);

}

4.2.4内容管理管理界面

电脑销售管理系统中的管理人员在“内容管理”这一菜单中是可以对电脑销售管理系统内的论坛列表、论坛分类列表、电脑资讯、电脑资讯分类进行维护和管理的,界面如下图4-12所示。

 

图4-12内容管理界面图

内容管理关键代码如下:

    @RequestMapping(value = "/del")

    @Transactional

    public Map<String, Object> del(HttpServletRequest request) {

        service.delete(service.readQuery(request), service.readConfig(request));

        return success(1);

}

    

       

}

4.2.5商城管理界面

电脑销售管理系统管理系统中的管理人员在“商城管理”这一菜单下是可以对电脑销售管理系统管理系统内的电脑商城、分类列表、订单列表进行管控的,其管理界面如下图4-13所示。

 

图4-13商城管理界面图

商城管理关键代码如下所示。

public List selectBaseList(String select) {

        List<Map<String,Object>> mapList = baseMapper.selectBaseList(select);

        List<E> list = new ArrayList<>();

        for (Map<String,Object> map:mapList) {

            list.add(JSON.parseObject(JSON.toJSONString(map),eClass));

        }

        return list;

}

4.2.6更多管理界面

电脑销售管理系统中的管理人员在“更多管理”这一菜单下是可以对电脑销售管理系统内的电脑推荐进行管控的,其管理界面如下图4-14所示。

 

图4-14更多管理界面图

更多管理关键代码如下所示。

  public Map<String, Object> success(Object o) {

        Map<String, Object> map = new HashMap<>();

        if (o == null) {

            map.put("result", null);

            return map;

        }

        if (o instanceof List) {

            if (((List) o).size() == 1) {

               o =  ((List) o).get(0);

                map.put("result", o);

            }else {

                String jsonString = JSONObject.toJSONString(o);

                JSONArray objects = service.covertArray(JSONObject.parseArray(jsonString));

                map.put("result", objects);

            }

        } else if (o instanceof Integer || o instanceof String) {

            map.put("result", o);

        } else {

            String jsonString = JSONObject.toJSONString(o);

            JSONObject jsonObject = JSONObject.parseObject(jsonString);

            JSONObject j = service.covertObject(jsonObject);

            map.put("result", j);

        }

        return map;

}

 

5 电脑销售管理系统测试

系统测试的目的

系统开发到了最后一个阶段那就是系统测试,系统测试对软件的开发其实是非常有必要的。因为没什么系统一经开发出来就可能会尽善尽美,再厉害的系统开发工程师也会在系统开发的时候出现纰漏,系统测试能够较好的改正一些bug,为后期系统的维护性提供很好的支持。通过系统测试,开发人员也可以建立自己对系统的信心,为后期的系统版本的跟新提供支持。

5.2 系统测试用例

系统测试包括:用户登录功能测试、商品展示功能测试、商品添加、商品搜索、密码修改功能测试,如表5-1、5-2、5-3、5-4、5-5所示:

用户登录功能测试:

表5-1 用户登录功能测试表

用例名称

用户登录系统

目的

测试用户通过正确的用户名和密码可否登录功能

前提

未登录的情况下

测试流程

1) 进入登录页面

2) 输入正确的用户名和密码

预期结果

用户名和密码正确的时候,跳转到登录成功界面,反之则显示错误信息,提示重新输入

实际结果

实际结果与预期结果一致

商品查看功能测试:

表5-2 商品查看功能测试表

用例名称

商品查看

目的

测试商品查看功能

前提

用户登录

测试流程

点击商品列表

预期结果

可以查看到所有商品信息

实际结果

实际结果与预期结果一致

管理员添加商品界面测试:

表5-3 管理员添加商品界面测试表

用例名称

商品发布测试用例

目的

测试商品发布功能

前提

卖家用户正常登录情况下

测试流程

1)卖家点击商品信息管理就,然后点击添加后并填写信息。

2)点击进行提交。

预期结果

提交以后,页面首页会显示新的商品信息 

实际结果

实际结果与预期结果一致

商品搜索功能测试:

表5-4商品搜索功能测试表

用例名称

商品搜索测试

目的

测试商品搜索功能

前提

测试流程

1)在搜索框填入搜索关键字。

2)点击搜索按钮。

预期结果

页面显示包含有搜索关键字的商品

实际结果

实际结果与预期结果一致

密码修改功能测试:

表5-5 密码修改功能测试表

用例名称

密码修改测试用例

目的

测试管理员密码修改功能

前提

管理员用户正常登录情况下

测试流程

1)管理员密码修改并完成填写。

2)点击进行提交。

预期结果

使用新的密码可以登录

实际结果

实际结果与预期结果一致

5.3 系统测试结果

通过编写电脑销售管理系统的测试用例,已经检测完毕用户登录模块、商品查看模块、商品添加模块、商品搜索模块、密码修改功能测试,通过这5大模块为电脑销售管理系统的后期推广运营提供了强力的技术支撑。

总结与展望

至此,电脑销售管理系统已经结束,在开发前做了许多的准备,在本系统的设计和开发过程中阅览和学习了许多文献资料,从中我也收获了很多宝贵的方法和设计思路,对系统的开发也起到了很重要的作用,系统的开发技术选用的都是自己比较熟悉的,比如Web、SSM技术、MYSQL,这些技术都是在以前的学习中学到了,其中许多的设计思路和方法都是在以前不断地学习中摸索出来的经验,其实对于我们来说工作量还是比较大的,但是正是由于之前的积累与准备,才能顺利的完成这个项目,由此看来,积累经验跟做好准备是十分重要的事情。

当然在该系统的设计与实现的过程中也离不开老师以及同学们的帮助,正是因为他们的指导与帮助,我才能够成功的在预期内完成了这个系统。同时在这个过程当中我也收获了很多东西,此系统也有需要改进的地方,但是由于专业知识的浅薄,并不能做到十分完美,希望以后有机会可以让其真正的投入到使用之中。

参考文献

[1]王常珏,段尧清,朱泽.基于SSM的政府数据治理联盟链框架构建[J/OL].情报科学:1-18[2022-03-21].http://kns.cnki.net/kcms/detail/22.1264.g2.20220309.1213.002.html

[2]王月红,蒋冀萍.基于Java的煤矿风险预警与防控系统设计[J].煤炭技术,2022,41(03):173-175.

[3]黄子扬,祝奕炜,沈信宇,慕京生,焦俊.基于SSM的水质在线监测与数据分析[J].现代农业科技,2022(05):129-135.

[4]朱珍珠,段华斌,邓永清,杜丹蕾.基于Java的增值平台的设计与实现[J].办公自动化,2022,27(05):55-58.

[5]魏瑾.Java多线程技术在网络通信系统中的应用[J].山西电子技术,2022(01):66-68.

[6]李双,郭晨晨,李佳虎,张慧娥.基于SSM框架的智能驾校系统的设计与开发[J].电脑知识与技术,2022,18(03):62-63+65.

[7]郭静.基于SSM框架的高校新生预报到系统的设计与实现[J].电子技术与软件工程,2022(02):232-235.

[8]张烈超,胡迎九.典型Java Web开发框架模型的研究[J].武汉交通职业学院学报,2021,23(04):122-127.

[9]徐旭,李明明,夏辉,陈曦,王天宇,肖硕,雍旭.基于SSM框架的互联网+多元监管下构建医疗设备质量控制管理服务平台研究[J].中国医学装备,2021,18(12):106-110.

[10]He Xinbin,Bai Yongbin,Yue Lisen,Wang Haixiao,Liu Yi. Design and Implementation of Information System Based on Java Technology Platform[J]. Journal of Physics: Conference Series,2021,2033(1).

[11]王晨. 基于JAVA的教室查询系统研究[C]//.第三十五届中国(天津)2021’IT、网络、信息技术、电子、仪器仪表创新学术会议论文集.,2021:16-19.

[12]田青海. 面向Java应用的性能监控系统的设计与实现[D].浙江大学,2021.

[13]丁明月. 基于SSM的化工技术电子商务平台的研究与实现[D].淮阴工学院,2021.

[14]王冯涛. 基于SSM的地铁站智慧管理系统的设计与实现[D].北京交通大学,2021.

[15]Qu Xiaona. Application of Java Technology in Dynamic Web Database Technology[J]. Journal of Physics: Conference Series,2021,1744(4).

[16]Lei Yu,Cheng Li,Lei Wei,Hu WenYa. Marine biological monitoring and managing system based on Java technology[J]. MIPPR 2019: REMOTE SENSING IMAGE PROCESSING, GEOGRAPHIC INFORMATION SYSTEMS, AND OTHER APPLICATIONS,2020,11432.

[17]陈志忠. 带图形网页界面的电脑显示屏交互界面(销售管理)[P]. 广东省:CN305356398S,2019-09-20.

[18]王栋,方翔,吴鹰,俞向平,李东森,祁霖,李斌. 用于电脑的销售管理可视化系统界面[P]. 北京市:CN305216794S,2019-06-14.

[19]陈烁,张来卿,庞严冬. 带有药店管理系统用户界面的电脑(销售报表)[P]. 广东省:CN305130018S,2019-04-26.

[20]张锋. 带图形用户界面的电脑(商品销售管理系统)[P]. 广东省:CN305098344S,2019-04-05.

[21]孔丽.电脑销售与汽车销售的成本控制管理[J].中外企业家,2014(35):72.

[22]张彦青.基于VB技术的电脑销售管理系统设计与开发[J].电脑知识与技术,2008(03):472-474+477.

[23]张波. 亚思晟科技向贫困生免费提供JAVA培训[N]. 大众科技报,2007-06-05(A07).DOI:10.28215/n.cnki.ndzkj.2007.001547.

[24]Qi liang SUN. Design and Implementation of Personnel Management Information System Based on SSM[P]. Qi liang SUN,2021.

致谢

至此论文结束,感谢您的阅读。首先,我要感谢我的父母对我的支持与理解,在两年的本科学习生活中,倾其所能的爱护我,使我能够心无旁骛,全心全意的投入到学习中;不断鼓励我,让我能够拥有不断前进的动力。其次还要感谢我的导师,感谢在这段时间给予我有效的建议,以至于我的毕设有了整体的设计思路,尽管我在实习期间很忙,论文撰写总是停停改改,但是导师依然十分负责,时不时的询问我的任务进展情况,跟进我的论文进度。在老师的帮助下,我逐步完成了自己的论文和程序,从导师身上也学习到很多知识,和经验,这些知识和经验令我受益匪浅。

此外,还要感谢我的同学,热心的解答了我在程序上遇到的问题,是他们在我编写程序过程中给了我很多的启发和感想,也帮助了我对于程序的调试和检测,让我受益良多。在这两年的时间里,我学会了许多专业的知识,还有老师们的谆谆教诲和同学们的帮助使我不断进步,能够做得更好;我也会不断给自己充电,不断突破,成为更好的自己。

最后向所有关心我、帮助我的老师及同学们表示衷心的感谢!

点赞+收藏+关注 → 私信领取本源代码、数据库

Guess you like

Origin blog.csdn.net/weixin_61498557/article/details/131359774