Introduction:

With the rapid development of society, the influence of computer is comprehensive and deep. With the continuous improvement of people’s living standards, users’ requirements for online cake mall in daily life are also constantly improving. Online cake mall is favored by the majority of users, making the development of online cake mall a necessary and urgent thing. Online cake mall is mainly with the help of computers, through the online cake mall required information management, increase the choice of users, but also convenient for the majority of users’ information timely query, modify and timely understanding of user information. Online cake mall has brought more convenience to users, the system through the database management system software collaboration to meet the needs of users. The application of computer technology in modern management makes computer become an important tool for people to apply modern technology. It can effectively solve the problem of convenient and comprehensive access to information and improve efficiency.

Process analysis:

System development process

Online cake mall system development, the first needs analysis, and then the overall design planning of the system, the design of system function modules, database selection, the system development process is shown in the figure

Figure system development flow chart

 User Login Process

In order to ensure the security of the system, to use this system to manage the system information, you must first log in the system. As shown in the figure.

Figure Login flowchart

System Operation Process

After a user logs in to the system, the login page is displayed. If the user enters the correct user name and password, the system automatically checks the information. If the information is correct, the user enters the system page and performs operations.

Figure system operation flow chart

Function screenshots:

User front desk display:

System Home page:

User login and registration: users must log in to the system if they want to purchase cakes. The user login interface is shown in the figure below. On the page for adding user information, enter the user information and submit the data to the database after passing the client authentication. Background to save the user information, save the data, you can view the data just entered in the database. User registration is a data insertion operation. Before a user is registered, verify whether the user has a database. If the user has a database, the user cannot be registered

Store information:

Store Details:

Display of cake products: Users can view furniture details in the cake details interface and click the purchase button to purchase. The display of cake details interface is as shown in the figure

Product Details:

Add to shopping cart: The user can check the shopping cart cake information on the shopping cart interface, as shown in the figure. Click the cashier button to enter the address filling interface.

Purchase and order management: After the user clicks add to the shopping cart and passes the client verification, the data is submitted to the database. Background to save user information, save data, you can view the data just inserted in the database.

Users can view the order information in my order interface, and confirm receipt of the delivered order. My order interface display is as shown in the figure below.

Cake information:

Personal Center Management:

Background management for common users:

Administrator background management:

The administrator must log in if he/she wants to enter the system background to manage the system. The administrator login interface is shown in the figure

User management: The administrator can view all member information, modify member information and delete operations. The member management interface is shown in the figure

Cake merchant Management:

Cake type management: Administrators can add, edit and delete cake classification information. The interface display of cake classification management is as shown in the figure below. Click the cake classification management link to input cake classification information. On the page for adding cake classification information, fill in the information and submit the data to the database after passing the verification on the client. Background cake classification information to save the operation, save the data, you can view the data just entered in the database. After entering the cake classification information, in the cake classification list, all the cake classification information is read into the collection object through the background query method, and the collection object is displayed on the interface through HTML. There are two types of query, one is to query all the cake classification set, but also through the condition query cake classification, SQL statement is different, the final implementation of the same process. In the list, you can delete the cake classification information. Before deleting the cake, you need to prompt whether to delete the cake. The prompt of this step belongs to the control of the client. When the deletion is confirmed, the deletion method on the server is called to delete database data and refresh the cake classification list.

Cake commodity details: The administrator can manage the cake, add, delete and edit the cake information. The display of the cake management interface is shown in the figure

Order information management: The administrator can perform order management operations, view all order information, and deliver and delete orders. The order management interface is shown in the figure.

Maintenance and management of cake information and system rotation chart:

Data 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 the user information table that saves online cake sales, and the table structure is shown in 4.1.

Table 4-1 Lists the admin administrators

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 saving online cake sales, in which ID is the primary key. The table structure is shown in 4.2.

Table 4-2 Orders Table

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 goods 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 saving cake sales, in which ID is the primary key. The table structure is shown in 4.3.

Table 4-3 Category category table

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 table is the commodity information table for cake sales, in which ID is the primary key. The table structure is shown in 4.4.

Table 4-4 Goods list

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

Part code:


/** * order * back-end interface *@author 
 * @email 
 * @dateThe 2022-03-27 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

Get the source code:

People like, like, follow, comment, check out the homepage for contact

Clocked articles updated 246/365 days