Introduction:

The development of computer network has promoted the progress of all sectors of society and brought about rapid economic growth. Computer management system can improve people’s work efficiency, has a profound impact on all aspects of people’s life. In particular, sales companies can carry out online sales through computer networks to get rid of the regional restrictions of physical stores and maximize their sales advantages. Through e-commerce websites, enterprises release products, display and promote, and communicate with customers in real time on the network to reach deals. Online sales bring convenience and save time for both buyers and sellers. At present, there are many sales systems on the network, providing a variety of commodity information, only need a network can buy the needed goods. E-commerce simplifies the traditional business and digitalizes the transaction process. With the help of third-party platforms for digital payment and logistics for distribution, consumers can receive their favorite goods without going out. The after-sale system of e-commerce system is also very intelligent, which can offer service, replace or return goods that are not satisfied or have problems. E-commerce model has changed our life and brought convenience and benefits. Online transaction saves flow chart link and realizes zero-link transaction from production to sales, so that consumers can buy high-quality goods. The toy website is mainly an online trading system used by enterprises such as toys, which can be combined with physical stores for multi-directional sales. This toy website mainly carries out toy sales activities. Therefore, when buying toys online, it is necessary to provide corresponding prescriptions to prevent the purchase of inappropriate toys. Toy website uses network technology and modern database theory to realize online browsing, online trading, backstage order processing and other functions of goods.

Functional design:

System background design:

Administrator login, toy classification design, toy management design, announcement management, order management design, user design.

Toy management includes toy classification and toy information management. The administrator classifies the toys first and sorts out all the classified information. With classified information, toys can be managed. A category corresponds to multiple toy information, the background shelves all toy information, the front desk display toys. The toy display of the front desk is divided into all toy display, toy classification query, and individual toy search query. When deleting a product category, you must delete the product under the category before deleting the category. After modifying a toy category name, the corresponding category name in the toy type will be corrected. Announcement management of toy website includes information information and announcement information management. The administrator makes a public announcement for management. After the background uploads all bulletin information, the foreground displays the bulletin. The bulletin display on the front desk is divided into all bulletin display, query under bulletin classification, and bulletin click ranking and other operations. The administrator manages the order, views the order information, and submits the order information to the background. The administrator collects the order information within a specified period of time. User management is the management of administrators and registered users. Administrators generally set up a user, according to the needs can also be added, and registered users only need to audit.

System foreground design:

The front desk of toy website includes home page, toy classification, all toys, website announcement, my shopping cart, my order, registration and login, personal center. The home page shows the system menu page, user registration login module, the home page is the key page of the system design, need to do beautiful, pleasing to the eye, so as to let more people stay to continue to use the site. Toy classification is to view the toy information under the corresponding category. All toys are through the query statement to query all toys in the system. Website announcement query administrator input all announcement information, click the title to view the specific announcement content. Users of toy websites need to log in before they can make a purchase. Users check the toy information by querying conditions, click add to shopping cart, confirm the toy information, submit it to the cashier, pay the order, and then complete the shopping process. For unwanted orders, cancel the operation. The user needs to register before logging in. After registering, the user saves the information to the database and then logs in. Before login, verify the required information first, and then query the user name and password entered in the member database table, and then return the user information. After logging in, users can view my historical orders and update their personal information.

Function screenshots:

System Reception desk:

System home page: users can enter the toy store website to view the website information, including the website home page, toy information, website announcements, etc

Business Information:

 

Toy goods:

Users can view furniture details in the details interface and click the purchase button to purchase

You can view product details and comment

Toy information: the administrator releases some toy information and users can view it

Click here for more information

Personal Center:

Order information: View order information in various states

Address management: Purchase is mandatory to fill in address information here for management

Shopping cart information: View and operate shopping cart toy product information

Background administrator:

User management:

Toy commodity information Management:

Modification of commodity Details

Toy commodity type management:

User order management:

Toy Information Management:

Caroute chart management:

Partial source code:


/** * order * back-end interface *@author 
 * @email 
 * @dateThe 2022-03-07 17:11:41 * /
@RestController
@RequestMapping("/orders")
public class OrdersController {
    @Autowired
    private OrdersService ordersService;
    


    /** * Back-end list */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,OrdersEntity orders,
		HttpServletRequest request){
    	if(! request.getSession().getAttribute("role").toString().equals("Administrator")) {
    		orders.setUserid((Long)request.getSession().getAttribute("userId"));
    	}
        EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
		PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,OrdersEntity orders, HttpServletRequest request){
        EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
		PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));
        return R.ok().put("data", page);
    }

	/** * list */
    @RequestMapping("/lists")
    public R list( OrdersEntity orders){
       	EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
      	ew.allEq(MPUtil.allEQMapPre( orders, "orders")); 
        return R.ok().put("data", ordersService.selectListView(ew));
    }

	 /** * query */
    @RequestMapping("/query")
    public R query(OrdersEntity orders){
        EntityWrapper< OrdersEntity> ew = new EntityWrapper< OrdersEntity>();
 		ew.allEq(MPUtil.allEQMapPre( orders, "orders")); 
		OrdersView ordersView =  ordersService.selectView(ew);
		return R.ok("Order query succeeded").put("data", ordersView);
    }
	
    /** ** */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        OrdersEntity orders = ordersService.selectById(id);
        return R.ok().put("data", orders);
    }

    /** * Front-end details */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        OrdersEntity orders = ordersService.selectById(id);
        return R.ok().put("data", orders);
    }
    



    /** * The backend saves */
    @RequestMapping("/save")
    public R save(@RequestBody OrdersEntity orders, HttpServletRequest request){
    	orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(orders);
    	orders.setUserid((Long)request.getSession().getAttribute("userId"));
        ordersService.insert(orders);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody OrdersEntity orders, HttpServletRequest request){
    	orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(orders);
        ordersService.insert(orders);
        return R.ok();
    }

    /** * modify */
    @RequestMapping("/update")
    public R update(@RequestBody OrdersEntity orders, HttpServletRequest request){
        //ValidatorUtils.validateEntity(orders);
        ordersService.updateById(orders);// All updates
        return R.ok();
    }
    

    /** * delete */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        ordersService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /** * remind interface */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")! =null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")! =null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<OrdersEntity> wrapper = new EntityWrapper<OrdersEntity>();
		if(map.get("remindstart")! =null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")! =null) {
			wrapper.le(columnName, map.get("remindend"));
		}
		if(! request.getSession().getAttribute("role").toString().equals("Administrator")) {
    		wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
    	}


		int count = ordersService.selectCount(wrapper);
		return R.ok().put("count", count); }}Copy the code

Database design:

This system uses MYSQL database as data storage, the following describes the detailed information of each table in the database. The administrator table is a user information table that stores online toy sales. The structure of the table is shown as follows.

The column name explain type The size of the A primary key empty
Idyaopin A primary key int 4 Is a primary key Can’t be empty
Usernameyaopin The user name varchar 50 not Can be null
Passwordyaopin password varchar 50 not Can be null
typeyaopin type varchar 30 not Can be null

The order table is the order information table for online furniture sales, in which ID is the primary key, and the table structure is shown as follows.

The column name explain type The size of the A primary key empty
idyaopin A primary key int 11 Is a primary key Can’t be empty
onumberyaopin The order number varchar 50 not Can be null
Spcyaopin furniture varchar 50 not Can be null
Slcyaopin The number of varchar 50 not Can be null
addressyaopin address varchar 50 not Can be null
teyaopin The phone varchar 13 not Can be null
emailyaopin User mailbox varchar 20 not Can be null
shffyaopin The goods varchar 60 not Can be null
zfffyaopin Users pay varchar 10 not Can be null
leavewordyaopin The user a message varchar 2000 not Can be null
addtimeyaopin The date of time not Can be null
xnameyaopin Under the single varchar 10 not Can be null
ztyaopin Status of order varchar 2 not Can be null
totalyaopin The total price varchar 10 not Can be null
kuaidiyaopin Courier name varchar 20 not Can be null
knumberyaopin Order no. int 20 not Can be null
Receiveryaopin Name of consignee varchar 10 not Can be null

Category table is the category information table for online toy sales, in which ID is the primary key. The table structure is shown in 4.3.

The column name explain type The size of the A primary key empty
idyaopin A primary key int 4 Is a primary key Can’t be empty
pidyaopin Classification type int 6 not Can be null
titleyaopin Category name varchar 60 not Can be null

The commodity list is the commodity information table for online toy sales, in which ID is the primary key. The table structure is shown in 4.4.

The column name explain type The size of the A primary key empty
idyaopin A primary key int 4 Is a primary key Can’t be empty
pidyaopin Type number, int 4 not Can be null
categoryidyaopin Classification number int 4 not Can be null
pnumberyaopin Product Number varchar 10 not Can be null
titleyaopin Name of commodity varchar 10 not Can be null
amountyaopin Inventory quantity int 10 not Can be null
cishuyaopin sales int 10 not Can be null
mpriceyaopin Market price decimal 10 not Can be null
spriceyaopin Membership price decimal 10 not Can be null
contentyaopin Detailed introduction text not Can be null
apvyaopin Click on the int 4 not Can be null
imgyaopin The picture varchar 50 not Can be null
statusyaopin state int 2 not Can be null
addtimeyaopin Add the time timestamp not Can be null

Make a friend:

Like, like, follow, comment, check out 👇🏻👇🏻👇🏻 for 👇🏻👇🏻👇🏻