Design and Implementation of Overseas Purchasing System Based on SSM

Summary

In recent years, my country's Internet has developed very rapidly. In just 20 years, the information age has already appeared in front of us. E-commerce is a major product that has emerged in the information age. The development of e-commerce has indeed facilitated our daily shopping behavior to a large extent. From the beginning of e-commerce in 1997 to today, the simple purchase of domestic online products has gradually been unable to meet the needs of online shoppers. The realization of overseas purchasing agents is a trend and will be more and more popular among domestic online consumers. favor.

According to the division of needs, the project constitutes the overseas purchasing system platform through the interaction between the background administrator and the front-end user. For the management side, the pre-system is based on the purpose of ensuring the authenticity of the products. The administrator not only needs to manage and maintain the posting community of the system, but also has the ability to add, delete, modify and check the products and orders just like the merchants. The functional operation of the class. As for the user side, in addition to the functional modules of the general shopping system, this system also adds a unique user post module, which allows users to share and communicate with each other like a circle of friends. At the same time build a user exchange community. Users can not only enjoy the joy of shopping but also feel the pleasure of socializing with others to share the purchased goods without leaving home. This article will elaborate on the development and design of this system platform.

Key words: overseas purchasing agent; online shopping platform; MySQL

1 Introduction

1.1 Research background and significance 

Since the reform and opening up in 1978, my country's economy has developed very rapidly in the past 40 years. At the same time, modern social conditions and technological levels have also made great leaps. The improvement of the quality of life and the increase of the income level make people's shopping vision more and more open. The shopping demand is not limited to the purchase of domestic products. Overseas products are rare and international. Features such as internationalization also attract domestic consumption. By. Consumers' demand and interest in purchasing foreign products is also increasing day by day. To develop a platform for overseas purchasing of goods, the overseas product issuer will connect with the system administrator, the official will check the product, check the product, and then sell it on the shelf. The purpose is to provide a relatively convenient, fast and safe for this part of the consumer group. The online shopping environment, rich, secure, and high-end online shopping channels enable consumers to purchase the overseas products they need online conveniently and safely, and provide consumers with technical support and safe channels for purchasing overseas products, allowing consumers to They can follow the trend of fashion development and add fresh blood from foreign commodities to the localized commodity market. Secondly, in the expected next development process of the overseas purchasing agency platform, it can even expand the sales channels for domestic suppliers. In the future, there will be opportunities to sell domestic products overseas in the same way as overseas purchasing agents.

For merchants, compared with offline sales, the operating costs of online sales, such as labor costs and time costs, are definitely lower, and the inventory pressure is also smaller than offline sales; moreover, today’s overseas commodity purchasing agents Relatively speaking, the market is not developing as fast as the domestic e-commerce market, and the competition is relatively moderate. This is undoubtedly an opportunity for further business development.

For consumers, the purchase of overseas products can be realized without going abroad, or even at home, by simply operating a computer, which is convenient and fast. The system platform also has its own working product review department to strictly control overseas products, unified purchase, and unified transportation, which further avoids personal problems such as but not limited to international financial settlements in the face of this huge international shopping market. , foreign exchange control, capital security and even minor language barriers, product quality problem handling and other aspects, make it easier for consumers to trade and circulate overseas products, and at the same time, it is safer and more reliable than private purchasing channels, reducing being cheated risk. Another major feature of the system is the user post module, which can make communication between users easier. The formation of this communication community will make the relatively boring links of choosing products and purchasing products on the Internet more vivid. Through Questions and answers and sharing of daily posts between users, users may seem to be scrolling through the circle of friends, which solves the trouble of choosing high-quality products.

1.2 Research Status

Internationally, since the 21st century, the development trend of world economic globalization has gradually improved. The income level of people in most regions has increased, and the number of disposable idle assets has increased, which makes people purchase some non-essential items. It has also become more and more widespread, and overseas products have entered people's field of vision. More and more overseas commodity purchasing channels and official system platforms are also rapidly emerging around the world. In foreign countries, some overseas Internet commodity purchasing platforms in developed countries with mature Internet development conditions already have a certain operating scale and goods delivery channels that can meet consumers' purchasing needs. For example: Online Shopping, the second largest online shopping retailer in the world today, is a South Korean online shopping platform. Its current commodity trading market size has equaled or even exceeded that of normal offline department stores. The scale of the market, it has provided many foreign consumers with convenient commodity purchase services. Compared with China, due to various factors, foreign multinational shopping platforms started their system platform development work earlier, and the corresponding development technology is relatively mature. These conditions can provide a lot for the development of our domestic overseas purchasing platform. Valuable reference.

In our country, most of the local shopping platforms are based on the B/S structure. The biggest feature of the B/S architecture that is different from others is that it can easily operate and use the system platform anytime and anywhere without reinstalling the unique operating environment and software app. The hardware facility used is just an ordinary computer that can be connected to the Internet. These environments can be used for the platform system. At the same time, for developers, the ease of system expansion can greatly facilitate the overseas purchasing system Platform development, maintenance and upgrades. And the client has zero maintenance and zero installation.

1.3  My main work

This paper mainly summarizes the development background, development environment, research direction and technical issues involved in the overseas purchasing agent platform. And the feasibility analysis and demand analysis report of the system are carried out according to the most commonly used analysis means. Emphatically expounds the entity class of the system, the database design, the realization of the function module and the logic function test before the system is finally put into use. Finally, summarize the development work of the system again, check for omissions and make up for vacancies.

1.4 Paper  organization and structure

The topic of this article is the design and implementation of an overseas purchasing agent platform based on SSM. The main organizational structure of the article is as follows:

The first part: Introduction: Describe the research background, significance and current situation of the system platform, and briefly introduce what the system is used for.

The second part: development environment and development technology: a brief introduction to the relevant environment and technology used in the development of the system platform.

The third part: system analysis: this part is mainly to conduct a series of feasibility analysis and demand analysis on the purchasing agent system, mainly to analyze whether the system can be truly implemented.

The fourth part: system design: draw the corresponding ER entity diagram and the database tables required for system development according to the requirements.

The fifth part: detailed design and implementation of the system: mainly divide the system platform into various function realization modules according to the corresponding functions required, and then carry out a detailed development introduction and operation result display of each function module.

Part VI: System testing: After the initial completion of the system, design an example, simulate the use scene after the system is delivered, and judge whether the system is actually required to complete the function.

Part VII: Conclusion: Summarize the difficulties and gains from this system platform design process.

2 Development environment and development technology

2.1 Introduction to MySQL

Structured query language SQL is a common relational database language. MySQL is one of the most popular relational database management systems today, and it has been around for a relatively long time. Its technology is mature and stable, and its performance is also very good . My SQL can manage databases through structured query language , operate and define data, and at the same time maintain data security and integrity. The database management system selected by this system is the MySQL database, which runs fast, is easy to operate and is free, reducing system costs .

2.2 B/S mode

Users only need to simply use any web browser on a computer to operate the BS functions. This project adopts the B/S structure. The biggest advantage of B/S is low development cost and good interaction effect. At the same time, because the platform of B/S architecture has good scalability, it can facilitate the improvement and upgrade of the system platform in the future.

2.3 Introduction to Java

Java , a programming language that is very popular nowadays, is also the core programming language used in the development of this system platform. It is a robust, simple, cross-platform object-oriented programming language with features such as safety, distribution, and multi-threading [2] .

2.4 Introduction to MyBatis

MyBatis supports common structured query language queries and advanced mapping. It is a semi-automatic persistence layer framework [4] .  The use of MyBatis can almost eliminate the JDBC code statements used by all systems and related manual setting parameters and retrieved result sets. It is easy to operate. Usually, the configuration file in XML format is used for system configuration and original mapping, and Java  interfaces and Java objects are stored as records in the database through mapping.

3 System Analysis

3.1 Demand  analysis

The Admin management system in the background and the Account client in the front are the main service objects of this overseas purchasing system platform. They have different permissions and different operation interfaces, and the required functions they realize are also different.

3.1.1  Main functions of the client

Registration: User account registration, enter the real name, password, mobile phone number, and verify the format of the received verification code to register successfully and officially become a user.

Login: After the user account registration is completed, enter the registered data and compare it with the data in the database to enter the home page of the platform.

Commodity search: Enter the query parameters in the corresponding input box, the system will perform a fuzzy query in the database through the input parameters, and display the products with the same keywords as the parameters.

Product list: The product list on the user page will display product parameters such as product name, price, etc. Users can click on the product link they are interested in to view the detailed parameters of the product, so that users can go deeper and comprehensively At the same time, in the product list, the system also provides users with the function of filtering and sorting products according to conditions such as sales status, price, and primary and secondary categories of products.

Posting: You can post recommendations for products you like, or make complaints about products you don't like.

Personal Center: Users can obtain detailed management of product orders, view personal favorites and shopping carts in the personal center, and can also modify their basic information and login password according to their needs.

Shopping cart management: It is possible to change the quantity of goods purchased and the delivery address, allowing users to successfully purchase, pay or cancel.

3.1.2 Main functions of background management system

Background login: The administrator role can add and modify products, send and receive goods, delete users, etc.

System settings: mainly including deleting, adding, and modifying administrator accounts.

Commodity management: mainly includes deleting, adding and modifying the price, category, inventory and other information of commodities.

Category management: set the category of the overall product and the internal secondary classification.

Order Management: Mainly manage the creation, payment, delivery, receipt, and closing of orders.

Post management: View the posts sent by customers in the system.

Statistical analysis: Statistics and display the sales of commodities in the form of pie charts and circular charts.

3.2 Feasibility  Analysis

The feasibility analysis of the system is generally mainly analyzed from the technical level, economic value and development difficulty of the system, so as to judge whether the economic benefits brought by the system after development are worth developing compared with the cost and whether the system is finally developed. Can it really land.

3.2.1 Technical Feasibility

The basic programming language used in this platform is Java. Since my sophomore year, I have participated in the Java full-stack development course of Softwin Technology, and I can carry out project development work relatively proficiently. In the development process of the system, Idea is used as the Java development compiler, which is most commonly used in training and is relatively easy to use. The front-end page mainly uses the jQuery and JSP related technologies that have been learned. The commonly used and easy-to-operate relational database MySQL is used as the data management system of this system. At the same time, it uses the Tomact  server that is easy to deploy and easy to operate. S framework implements system development. Every technology is within the scope of what has been learned. Therefore, the development of the overseas purchasing system platform is relatively feasible at the technical level.

3.2.2 Economic feasibility

本系统无论是开发、维护还是上线后的使用,其硬件设备常见,只需要一个普普通通的电脑或手机就能够让管理员对系统进行管理和使用户能够以更低的设备成本就能找到自己所心仪的海外产品,设备方面的投入几乎为零。其次,软件层面,本系统平台开发所需要的代码编译器、数据库管理系统和结构框架都是开源、便捷、免费的,在开发过程中同样无需额外的对软件方面的支出。综上所述,本系统平台在开发过程中所需的费用支出较为低廉且平台上线后的整体效益较高,所以,在经济层面是相对可行的。

3.2.3 操作可行性

本系统操作所使用的界面为大众Windows系列的操作系统界面,其优点主要就是大众化,大部分用户均使用的是该系统进行日常电脑的使用。因此,用户在操作系统过程中不需要再次安装特定的操作系统或软件app,低门槛,易操作的特性也可以使用户在对系统的使用过程相对友好些,无需学习系统操作说明。这种使用起来简单易操作的特点,满足了系统在操作层面上的可行性。

4 系统设计

4.1 功能模块设计

通过系统的业务逻辑基本上可以将系统分为后台管理员和前台用户两大角色的功能模块,每一个角色功能模块下面又可以按照详细设计划分出不同的系统操作功能模块的实现。

海外代购平台功能图如图4-1所示。

图4-1 海外代购平台功能图

后台管理员角色功能模块主要包括对商品、帖子、订单、用户的管理以及对商品销量的数据统计。前台用户角色功能模块则包括了用户的注册登录、查看商品列表详情、按类别、关键字筛选和搜索商品,查询购物车、用户交流中心等功能。通过相关功能的分析设计,判断出系统在功能实现后在一定程度上已经能够基本满足于海外商品的购买实现。

4.2 数据库设计

4.2.1 数据库需求分析

The requirements of a database are mainly reflected in the addition, deletion, modification and query of the database table. When designing data, you first need to collect the data, then analyze the data structure, and finally process the data. According to the requirements of this system, the following main database structures are designed:

(1) Commodity entity: primary key id, product name, price, number of favorites, number of purchases, introduction map, detailed introduction, discount, first category, second category, inventory quantity.

(2) Commodity category entity: primary key id, category name, parent pid

(3) User entity: mobile phone number, real name, gender, user name, password, address, email, primary key id.

(4) User post table: primary key id, user user_id, post subject, name of the person who saved the post, and creation time.

(5) Post evaluation table: primary key id, commenter user_id, post post_id, commenter name, comment content, creation time.

(6) Evaluation table entity: primary key id, user table user_id, product table item_id, evaluation content, evaluation time.

(7) Shopping cart entity: primary key id, user table user_id, product table item_id, purchase quantity, product unit price, total price.

(8) Order entity: product item_id, primary key id, user user_id, order number, added time, total amount, order status, reason for return, refund method, remarks.

(9) Order details table: order order_id, primary key id, commodity item_id, quantity, total price, order details status.

(10) Collection table: primary key id, commodity item_id, user user_id.

(11) Administrator entity: primary key id, user name, password, real name.

4.2.2 Conceptual structure design of database

According to the demand analysis of the system database, the parameter entity corresponding to the parameter is obtained, and then the corresponding ER diagram is made.
(1) The ER diagram of the commodity table entity is shown in Figure 4-2.

Figure 4-2 ER diagram of the commodity table entity

(2) The ER diagram of the commodity category table is shown in Figure 4-3.


Figure 4-3 ER Diagram of Commodity Category Table

(3) The user entity ER diagram is shown in Figure 4-4.

Figure 4-4 User entity ER diagram

(4) The user post entity ER diagram is shown in Figure 4-5.


Figure 4-5 User post entity ER diagram


(5) The entity ER diagram of the evaluation form is shown in Figure 4-6.

图4-6 评价表实体E-R图

(6) 购物车实体E-R图如图4-7所示。


图4-7 购物车实体E-R图

(7) 管理员实体E-R图如图4-8所示。


图4-8 管理员实体E-R图


(8) 帖子评价表E-R图如图4-9所示。

图4-9 帖子评价表E-R图

(9) 订单实体E-R图如图4-10所示。


图4-10 订单实体E-R图

(10) 收藏实体类E-R图如图4-11所示。

图4-11 收藏实体类E-R图

(11) 订单明细实体E-R图如图4-12所示。


图4-12 订单明细实体E-R图

4.2.3 数据库表设计

(1) 商品类目表,用于存储商品的类别、父级 id等信息。商品类目表(item_category)结构如表4-1 所示。

表4-1 商品类目表(item_category)

序号

字段名称

数据类型

数据说明

1

id

int(5)

主键

2

name

varchar(255)

类目名称

3

pid

int(5)

父级 id

4

isDelete

int(11)

是否删除

(2) 收藏表,主要存储用户的个人收藏信息。收藏表(sc)结构如表4-2 所示。

表4-2 收藏表(sc)

序号

字段名称

数据类型

数据说明

1

id

int(5)

主键

2

itemId

int(5)

商品 id

3

userId

int(5)

用户 id

(3) 购物车表,主要用于存储购物车的相关信息,如商品id、用户id,购买数量等。购物车表(car)结构如表4-3 所示。

表4-3 购物车表(car)

序号

字段名称

数据类型

数据说明

1

id

int(5)

主键

2

itemId

int(5)

商品 id

3

userId

int(5)

用户 id

4

num

int(11)

购买数量

5

price

decimal(10,2)

商品单价

6

total

varchar(255)

总价格

(4) 商品表,主要用于存储商品的基本信息,如商品名称、价格、收藏数、销量、商品类别及商品价格、商品详细信息等。商品表(item)结构如表4-4 所示。

表4-4 商品表(item)

序号

字段名称

数据类型

数据说明

1

id

int(5)

主键

2

name

varchar(255)

商品名称

3

price

varchar(255)

价格

4

scNum

int(11)

收藏数

5

gmNum

int(11)

购买数

6

url1…5

varchar(255)

图片

7

zk

int(10)

折扣

8

category_id_one

int(11)

一级类别

9

category_id_two

int(11)

二级类别

10

isDelete

int(2)

是否删除

11

stock

int(5)

库存数量

12

pam1…3

varchar(255)

参数

13

val1…3

varchar(255)

(5) Evaluation table, which stores basic information such as user id, product id, order id, and evaluation content. The structure of the comment table is shown in Table 4-5.

Table 4-5 Evaluation form (comment)

serial number

Field Name

type of data

the data shows

1

id

int(5)

primary key

2

userId

int(5)

user-id

3

itemId

int(5)

commodity id

4

orderId

int(5)

order id

5

content

varchar(255)

comment content

6

addTime

datetime

evaluation time

(6) Administrator table, which stores administrator user name, password, etc. The structure of the administrator table (manage) is shown in Table 4-6.

Table 4-6 Administrator table (manage)

serial number

Field Name

type of data

the data shows

1

id

int(5)

primary key

2

main_orderNo

varchar(255)

username

3

main_address

varchar(255)

password

4

main_fk

varchar(255)

real name

(7) The order details table, which mainly stores the information of the returned goods in the order. The structure of the order detail table (order_detail) is shown in Table 4-7.

Table 4-7 Order Details (order_detail)

serial number

Field Name

type of data

the data shows

1

id

int(5)

primary key

2

itemId

int(5)

commodity id

3

orderId

int(5)

order id

4

status

int(11)

Order Status

5

num

int(11)

quantity

6

total

varchar(255)

total price

(8) Commodity order table, which is mainly used to store detailed information of commodity orders, such as commodity id, order number, adding time, etc. The structure of item order (item_order) table is shown in Table 4-8.

Table 4-8 Product order (item_order)

serial number

Field Name

type of data

the data shows

1

id

int(5)

primary key

2

itemId

int(5)

commodity id

3

userId

int(5)

user-id

4

code

varchar(255)

order number

5

addTime

datetime

add time

6

total

varchar(255)

lump sum

7

isDelete

int(255)

delete or not

8

status

int(255)

Item status

9

content

varchar(6000)

Reason for return

10

refund_way

varchar(255)

refund method

11

remark

varchar(255)

Remark

(9) User table, which mainly stores personal information of users, such as mobile phone number, user name, password, real name, etc. The user table (user) structure is shown in Table 4-9.

Table 4-9 User table (user)

serial number

Field Name

type of data

the data shows

1

id

int(5)

primary key

2

user_name

varchar(24)

username

3

pwd

varchar(24)

user password

4

phone

varchar(255)

Phone number

5

realName

varchar(255)

real name

6

sex

varchar(255)

gender

7

address

varchar(255)

address

8

email

varchar(255)

Mail

(10) Post table, storing user posts. The post table (user_post) structure is shown in Table 4-10.

Table 4-10 Post table (user_post)

serial number

Field Name

type of data

the data shows

1

id

int(5)

primary key

2

userId

int(5)

user id

3

title

varchar(255)

post subject

4

field0…2

varchar(255)

Poster name

5

content

varchar(255)

content

6

c_t

datetime

creation time

7

u_t

datetime

update time

(11) 评价,存储用户对帖子的评价信息,例如评价人id、帖子id、内容等。评价表(user_post_comment)结构如表4-11 所示。

表4-11 评价表(user_post_comment)

序号

字段名称

数据类型

数据说明

1

id

int(5)

主键

2

userId

int(5)

评论人 id

3

postId

int(5)

帖子 id

4

content

varchar(255)

评论内容

5

field0..2

varchar(255)

帖子标题

6

c_t

datetime

创建时间

5 详细设计与实现

5.1 用户功能模块

5.1.1 登录

海外代购平台的登录模块,主题呈现的是一幅世界地图背景,给人一种国际联合的感觉。

输入已经注册过的账号、密码,点击“登录”按钮。输入的帐号、密码赋值给sql语句的查询条件在系统数据库中进行查询操作,反馈出结果。

登录界面如图 5-1 所示。


图5-1 登录界面

5.1.2 首页


用户通过登录操作后进入用户首页。在首页,用户可以通过不同功能模块的链接进行不同的功能操作。首页如图 5-2 所示。

图 5-2 首页

首页包含了商品列表,商品分类,商品搜索以及用户交流社区等功能模块。对于商品的展示,用户如果想要了解商品详情,可以通过点击首页上商品的图片,跳转到对应商品的商品详情页进行下一步操作。

5.1.3 收藏

在商品列表中,用户可以点击收藏按钮将自己所喜欢的商品收藏到收藏夹中,方便自己今后对该商品的再次查看和购买。

最近收藏,位于个人中心中,其中收纳的都是自己喜欢的商品,在未来下一步的开发过程中,系统将加入类似于邻近模型的算法,通过用户的收藏来分析并推送给用户可能喜欢的商品。收藏夹如图 5-3 所示。


图 5-3 收藏夹

5.1.4 商品搜索

用户可以在搜索框内输入自己的需求信息,系统所接收的参数将在数据库中进行对相关数据的模糊查询,并分页显示出来,以此来完成对商品的搜索功能实现。

商品搜索如图 5-4 所示。


图 5-4  商品搜索

5.1.5 购物车

用户在对商品进行加入购物车操作后,在购物车中将显示出加入购物车的商品的详细信息情况。同时,在购物车功能上保留了加减商品个数,删除商品的功能,使用户可以在购物车界面根据自己的需求来更改相关参数信息,每一条商品架构后都是一个可多选的信息框,用户可以自由的选择对某个或某些商品进行单独或批量的删除购物车中或支付。
购物车如图 5-5 所示。

图 5-5 购物车

5.1.6 商品详情

用户通过点击商品列表的链接,进入到对应商品的详情页面。商品详情页主要包括了商品数量选择、“收藏”和 “加入购物车”。商品详情如图 5-6 所示。


图 5-6  商品详情

5.1.7 支付

支付如图 5-7 所示。

  

图 5-7 支付

本系统使用的是支付宝的支付接口形式进行模拟支付,注册一个沙箱号,生成密钥,系统pom文件中添加支付宝所提供的支付相关接口,通过查询网络资料,创建好调用支付宝支付的方法。
模拟支付页面如图 5-8 所示。

图 5-8  模拟支付页面

5.1.8 用户交流帖子

本系统的一大特色,用户之间可以向发微博一样进行发帖,内容既可以是对商品的使用评价,又可以是对任何一个环节的吐糟,同样可以分享自己的相关日常,在购物平台之中搭建一个用户之间交流的社区环境。

帖子中心如图5-9 所示。

图 5-9  帖子中心


发帖如图5-10 所示。

图 5-10  发帖

查看发帖、评论如图5-11 所示。

图 5-11  查看发帖、评论

5.2 后台管理员管理模块

5.2.1 系统管理员登录

通过后台登录地址,输入管理员特有的账号和密码,登录管理员的操作界面,为了更好的分辨,管理员的操作界面和用户界面分离。管理员登录如图 5-12 所示。

图 5-12  管理员登录

5.2.2 类别管理

管理员在通过管理员特有的登录链接输入账号进行登录操作后,就可以进入到管理员的操作页面。商品的分类级别主要为一级二级两类,管理员可以对商品的类别进行选择和添加,对用户账户进行管理,以及对商品进行增删改查,查看用户订单并进行发货退货等响应。对用户的首页帖子和评论进行查看以及商品销售统计。

管理员后台首页如图5-13 所示。

图 5-13 管理员后台首页

类别管理页主要实现管理员对商品分类的管理,便于商品查询统计。类别管理如图 5-14所示。

图 5-14 类别管理

当点击“查看二级分类”按钮时,相对应的的数据将发送至后台,通过数据库表查询出父级id等于传过去的数据的id,显示出相应的二级类别。

当点击“修改”按钮时,弹出相对应的jsp,显示出已有的信息,同时可以修改并保存对应类别的信息。

当点击“删除”按钮时,相对应的的数据将发送至后台,通过传入的id实现删除功能。所有模块的增删改查技术原理基本相同。

5.2.3 用户管理

管理员可以对系统平台上所有注册过的用户账户进行例如删除类似的管理操作,用户管理页如图 5-15 所示。

图 5-15 用户管理页

5.2.4 订单管理
订单管理模块,主要包括了订单号,下单时间,总金额,下单人,订单状态等信息。订单管理页如图 5-16 所示。

图 5-16 订单管理页

5.2.5 帖子和评论管理
帖子和评论管理界面。主要都是包括了主题、发送人、内容等。管理员可以对每一条帖子进行查看和删除。帖子管理页如图 5-17 所示。

图 5-17 帖子管理页


评论管理如图 5-18 所示。

图 5-18 评论管理

5.2.6 商品销量统计
商品销量统计主要是通过图表形式对每一种一级类的商品销量进行统计展示。商品销量统计如图 5-19 所示。

图 5-19  商品销量统计

5.2.7 商品管理

商品管理中主要为商品添加,商品修改和商品下架三大功能,这三大功能已经基本满足了一般网上购物平台所需。商品管理首页如图 5-20 所示。

图 5-20  商品管理首页

新增或修改商品操作如图 5-21 所示。

图 5-21  新增或修改商品操作

6 系统测试

6.1 测试环境

一般来说,系统平台的测试所需的环境主要分为硬件环境和软件环境两类,硬件环境相对简单,有一台可以连接网络的普通的PC机就可以,在这里使用的是一台笔记本电脑;软件测试环境包括了软件运行的操作系统 windows,数据库管理系统 MySQL以及web应用服务器 tomcat等。

6.2 测试步骤

黑盒测试、白盒测试是常用系统平台测试的两种测试方法。本系统测试选用功能测试,即黑盒测试。

(1) 单元测试

首先按照系统所需要满足的具体功能模块进行划分,对每一个小的独立运行的功能模块进行单元测试,从而发现每一个功能模块的内部所可能存在的各种问题bug。想要系统整体实现就必须每一个单元都没任何问题,所以,测试的第一步就是需要从程序的功能模块内部着手,设计符合系统功能模块使用需求的测试用例。

(2) 集成测试

各功能模块测试好之后,再一次将所有小的功能模块按照系统交付运行所需要的流程就行组装,形成完整的系统后再次测试。确保数据不会再功能与功能的接口之间传输丢失,确保功能模块运行之间独立运行、互不影响输出结果,确保开发的功能模块符合系统所需。

(3) 系统测试

目的就在于判断系统所需要实现的功能模块是否都全部实现,系统的操作使用是否简单,兼容性与安全性怎么样等。

6.3 部分功能测试结果

登录测试如表6-1所示

表6-1 登录测试

模块

用例

结果预期

实际结果

登录

{“18435678074”,“123123”}

账号未注册

符合预期

{“18435678075”,“123122”}

密码错误

符合预期

{“18435678075”,“123123”}

登录成功

符合预期

注册测试如表6-2所示

表6-2 注册测试

模块

用例

结果预期

实际结果

注册

{“18435678075”,“123123”,

“140502********253X”,“shy”}

账号已存在

符合预期

{“18435671243”,“123123”,

“140502********2531”,“cjh”}

注册成功

符合预期

{“18435678075”,“123123”,

“”,“cjh”}

未填写必选项

符合预期

购物车测试如表6-3所示

表6-3 购物车测试

模块

用例

结果预期

实际结果

购物车

添加到购物车

添加成功

符合预期

从购物车中移除

移除成功

符合预期

清空购物车

购物车空空如也

符合预期

商品管理测试如表6-4所示

表6-4 商品管理测试

模块

用例

结果预期

实际结果

商品管理

添加商品(输入商品信息)

添加成功

符合预期

下架商品

下架成功

符合预期

商品详情

打开商品详细

符合预期

7 结束语

本系统是基于SSM的海外代购平台,采用的是 SSM 作为后端项目的框架。在本次系统的开发过程中,自己将自己所学到的理论知识充分的得到了真正意义上的实践。

本次系统的编写基本上满足了线上海外代购的需求,同时在平台上加入了社区交流功能,在用户日常分享的过程中同样享受到购物的便捷和快乐。

在系统的下一步计划中:一、系统将要对接阿里云服务,真正做到通过手机号登录验证进行系统的登录,提高系统安全性。二、在确保系统安全稳定后,接入国家的身份管理系统,对每个账号进行三要素实名认证,剔除影响市场环境的机刷账户,同时这样可以尽量的保证了用户帖子社区的和谐发展。三、接入支付宝沙盒,银联等多种支付渠道,便捷于用户的购买支付。

通过这次对海外代购系统的编写,我也很清楚的认识到了自己的问题还有很多。书本上得来知识终归只是理论知识,想要真正的搞清楚,会操作,还是需要不断的进行项目开发实践。而经过这次对海外代购平台的编写开发,自身得到了切实的实践,反应出来的问题才使我深切地理会到了这句话并不是一句空话。

同时在这次编写系统中我也明白了继续自主学习的重要性,软件平台开发的发展速度是很快的,只有不断的学习,不断的充电,不断的提高自已的能力,才能在这快节奏的行当里游刃有余。要始终明白“活到老、学到老”。在以后工作学习中,我应该更加充实、完善自我,不忘初心,全面发展,争取做一名今后对社会有所贡献的优秀的Java开发程序员。

想要完整版本的可以点赞私聊加关注私聊作者获取 

Guess you like

Origin blog.csdn.net/lf21qp/article/details/130649855