Springboot+vue project oral management platform

Get the source code at the end of the article

Development language: Java

Development tools: IDEA/Eclipse

Database: MYSQL5.7

Application service:Tomcat7/Tomcat8

Use framework: springboot+vue

JDK version: jdk1.8

System implementation administrator: home page, personal center, member management, case information management, dental care product management, review reminder management, appointment registration management, drug information management, message board management, system management, order management, member; home page, personal Center, case treatment information management, review reminder management, appointment registration management, my collection management, order management, front page home page; home page, dental care products, dental care tips, message feedback, personal center, background management, shopping cart function. So as to achieve efficient management of oral management platform information.  

Database Design Principles

Learning programming, we all know that database design is based on the system functions that need to be designed. We need to establish a database relational model to store data information, so that when we are in the program, there is no need to add data to the program page, thereby improving the system. s efficiency. The database stores a lot of information, which can be said to be the core and foundation of the information management system. The database also provides addition, deletion, modification and inspection, so that the system can quickly find the information it wants, rather than finding it in the program code. Each part of the information table in the database is precisely combined, arranged and combined into a data table according to a certain relationship.

The planning is divided into several entity information through the function of the oral management platform. The entity information will be explained by the ER diagram. The main entity diagram of this system is as follows:

The administrator information attribute diagram is shown in the figure 

Member management entity attribute diagram is shown in the figure 

The entity attribute diagram of case visit information management is shown in the figure

 

The attribute diagram of dental health product management entity is shown in the figure

 

 System detailed design

 Front page home function module

On the oral management platform, you can view the home page, dental care products, dental care tips, message feedback, personal center, background management, shopping cart and other content on the oral management platform, as shown in the figure

Login, member registration, obtain membership number, password, name, age, mobile phone, email and other information through member registration to register and log in, as shown in the figure 

 

For dental care products, you can fill in the product name, price, product number, product type, points, applicable groups, usage, precautions and other information on the dental care product page for immediate purchase, as shown in the figure 

 

Confirm the order, on the confirmation order page, you can fill in the selected delivery address, list list, etc. to pay as shown in the figure 

Add the delivery address. On the delivery address add page, you can fill in the contact information, mobile phone number, default address, selected address and other information to add as shown in the figure. 

Administrator function module

The administrator logs in by filling in the username, password, and role entered during registration, as shown in the figure 

The administrator can log in to the oral management platform to view the home page, personal center, member management, case information management, dental health product management, review reminder management, appointment registration management, drug information management,

Message board management, system management, order management and other information.

Personal center, in the personal center page, you can add and modify the original password, new password, confirm password and other information, as shown in Figure 1. You can also add, modify or delete personal information as needed, as shown in Figure 2

 

  

Member management, in the member management page, you can view the membership number, name, gender, mobile phone, age, gender, mobile phone, email, points and other information, and you can perform operations such as details, modification or deletion of member management as needed, as shown in the figure

Case visit information management, in the case visit information management page, you can view the membership number, name, gender, mobile phone, age, ID card, drug dosage, visit information, visit time and other information, and you can manage the case visit information as needed. , modify or delete and other detailed operations, as shown in the figure 

Dental care product management, you can view the product number, product name, product type, pictures, points, applicable groups, usage methods, precautions, etc. on the dental care product management page, and details and add dental care product management as needed , modify or delete and other detailed operations, as shown in the figure 

Carousel; this page is the management interface of carousel. Administrators can manage the homepage carousel on this page, add new pictures to the carousel by creating a new operation, modify the uploaded pictures, and delete pictures, as shown in the figure 

 

Appointment registration management, on the appointment registration management page, you can view the membership number, name, appointment time, remarks, review reply, review status, review, etc., and details, add, modify or delete the appointment registration management as needed. operation, as shown in the figure 

Drug information management, in the drug information management page, you can view the drug number, drug name, pictures, remarks, functions and indications, adverse reactions, contraindications, etc., and details, add, modify or delete drug information management as needed. operation, as shown in the figure 

Message board management, you can view the user name, message content, reply content and other content on the message board management page, and perform detailed operations such as adding, modifying or deleting message board management as needed, as shown in the figure 

Member function module

Members log in to the oral management platform to view the home page, personal center, case information management, review reminder management, appointment registration management, my collection management, order management and other content.

Personal information, in the personal information page, you can also modify the personal information as needed by filling in the membership number, name, gender, mobile phone, age, gender, mobile phone, email, points and other information, as shown in the figure 

My collection management, in the my collection management page, you can view the collection ID, table name, collection name, collection picture and other information content, and modify or delete other detailed operations on my collection management as needed, as shown in the figure 

Appointment registration management, in the appointment registration management page, by filling in the membership number, name, appointment time, remarks, audit reply, audit status, audit and other content for details and deletion, as shown in the figure 

Order management, in the order management page, by filling in the order number, product name, product image, purchase quantity, price/points, discounted price, total price/total points, total discounted price, payment type, status, address, etc. for details, delete, as shown in the figure 

Part of the code:  

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.CartEntity;
import com.entity.view.CartView;

import com.service.CartService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;


/**
 * 购物车表
 * 后端接口
 * @author 
 * @email 
 * @date 2021-01-13 16:52:48
 */
@RestController
@RequestMapping("/cart")
public class CartController {
    @Autowired
    private CartService cartService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,CartEntity cart, HttpServletRequest request){
    	if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
    		cart.setUserid((Long)request.getSession().getAttribute("userId"));
    	}
        EntityWrapper<CartEntity> ew = new EntityWrapper<CartEntity>();
		PageUtils page = cartService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, cart), params), params));

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

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( CartEntity cart){
       	EntityWrapper<CartEntity> ew = new EntityWrapper<CartEntity>();
      	ew.allEq(MPUtil.allEQMapPre( cart, "cart")); 
        return R.ok().put("data", cartService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(CartEntity cart){
        EntityWrapper< CartEntity> ew = new EntityWrapper< CartEntity>();
 		ew.allEq(MPUtil.allEQMapPre( cart, "cart")); 
		CartView cartView =  cartService.selectView(ew);
		return R.ok("查询购物车表成功").put("data", cartView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        CartEntity cart = cartService.selectById(id);
        return R.ok().put("data", cart);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        CartEntity cart = cartService.selectById(id);
        return R.ok().put("data", cart);
    }
    



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

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody CartEntity cart, HttpServletRequest request){
        //ValidatorUtils.validateEntity(cart);
        cartService.updateById(cart);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        cartService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@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<CartEntity> wrapper = new EntityWrapper<CartEntity>();
		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("管理员")) {
    		wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
    	}


		int count = cartService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

 

Guess you like

Origin blog.csdn.net/m0_49113107/article/details/123901278