Main features and functions:

Fully responsive layout (supports all mainstream devices such as computers, tablets and mobile phones) Powerful one-click generation function (including controllers, models, views, menus, etc.) supports multiple data sources and can be switched with simple configuration. Supports buttons and data permissions to customize department data permissions. The secondary encapsulation of commonly used JS plug-ins makes JS code concise, more easy to maintain perfect XSS defense and script filtering, completely eliminate XSS attacks Maven multi-project dependency, module and plug-in sub-project, as far as possible loose coupling, convenient module upgrade, add or subtract modules. Internationalization support, server and client support perfect logging system simple annotations can be achieved to support service monitoring, data monitoring, cache monitoring functions.

Main technologies: Java, Springboot, SpringMVC, Redis, Shiro, Vue, Element, Echarts, mysql, etc

Video effect demonstrationDesign and implementation of epidemic prevention management system based on Springboot+Vue. Mp4

Screenshots of main functions:

The user logs in, enters the account password for authentication and determines the user role, and has different menu permissions for different roles

System Home page:

Simulation of epidemic data distribution map:

User management:

Character control:

Menu Permissions:

Daily health Clocking:

 

Historical travel data:

Out filing application:

Leave audit:

 

Epidemic Notification announcement:

Epidemic data management:

 

Logout Change password:

Main code implementation:

Menu list processing and display:

@Service("sysMenuService")
public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao.SysMenuEntity> implements SysMenuService {
	@Autowired
	private SysUserService sysUserService;
	@Autowired
	private SysRoleMenuService sysRoleMenuService;
	
	@Override
	public List<SysMenuEntity> queryListParentId(Long parentId, List<Long> menuIdList) {
		List<SysMenuEntity> menuList = queryListParentId(parentId);
		if(menuIdList == null) {return menuList;
		}
		
		List<SysMenuEntity> userMenuList = new ArrayList<>();
		for(SysMenuEntity menu : menuList){
			if(menuIdList.contains(menu.getMenuId())){ userMenuList.add(menu); }}return userMenuList;
	}

	@Override
	public List<SysMenuEntity> queryListParentId(Long parentId) {
		return baseMapper.queryListParentId(parentId);
	}

	@Override
	public List<SysMenuEntity> queryNotButtonList(a) {
		return baseMapper.queryNotButtonList();
	}

	@Override
	public List<SysMenuEntity> getUserMenuList(Long userId) {
		// System administrator, with the highest rights
		if(userId == Constant.SUPER_ADMIN){
			return getAllMenuList(null);
		}
		
		// User menu list
		List<Long> menuIdList = sysUserService.queryAllMenuId(userId);
		return getAllMenuList(menuIdList);
	}

	@Override
	public void delete(Long menuId){
		// Delete the menu
		this.removeById(menuId);
		// Delete menu association with role
		sysRoleMenuService.removeByMap(new MapUtils().put("menu_id", menuId));
	}

	/** * get all menu list */
	private List<SysMenuEntity> getAllMenuList(List<Long> menuIdList){
		// Query the root menu list
		List<SysMenuEntity> menuList = queryListParentId(0L, menuIdList);
		// Get submenus recursively
		getMenuTreeList(menuList, menuIdList);
		
		return menuList;
	}

	/** * recursive */
	private List<SysMenuEntity> getMenuTreeList(List<SysMenuEntity> menuList, List<Long> menuIdList){
		List<SysMenuEntity> subMenuList = new ArrayList<SysMenuEntity>();
		
		for(SysMenuEntity entity : menuList){
			/ / directory
			if(entity.getType() == Constant.MenuType.CATALOG.getValue()){
				entity.setList(getMenuTreeList(queryListParentId(entity.getMenuId(), menuIdList), menuIdList));
			}
			subMenuList.add(entity);
		}
		
		return subMenuList;
	}
Copy the code

Shiro permissions are flexibly controlled to directory, menu, button level, and permission blocking.

 @Bean("shiroFilter")
    public ShiroFilterFactoryBean shiroFilter(SecurityManager securityManager) {
        ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean();
        shiroFilter.setSecurityManager(securityManager);

        / / request filtering
        Map<String, Filter> filters = new HashMap<>();
        filters.put("oauth2".new OAuth2Filter());
        shiroFilter.setFilters(filters);

        Map<String, String> filterMap = new LinkedHashMap<>();
        filterMap.put("/webjars/**"."anon");
        filterMap.put("/druid/**"."anon");
        filterMap.put("/app/**"."anon");
        filterMap.put("/sys/login"."anon");
        filterMap.put("/swagger/**"."anon");
        filterMap.put("/v2/api-docs"."anon");
        filterMap.put("/swagger-ui.html"."anon");
        filterMap.put("/swagger-resources/**"."anon");
        filterMap.put("/captcha.jpg"."anon");
        filterMap.put("/aaa.txt"."anon");
        filterMap.put("/virtuel/**"."anon");

        filterMap.put("/ * *"."oauth2");
        shiroFilter.setFilterChainDefinitionMap(filterMap);

        return shiroFilter;
    }
Copy the code

Login module authentication and saving tokens to the front end

/** * login */
	@PostMapping("/sys/login")
	public Map<String, Object> login(@RequestBody SysLoginForm form)throws IOException {
		boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
//		if(!captcha){
// return r.ror (" Verification code is not correct ");
/ /}

		// User information
		SysUserEntity user = sysUserService.queryByUserName(form.getUsername());

		// The account does not exist or the password is incorrect
		if(user == null| |! user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
			return R.error("Incorrect account number or password");
		}

		// The account is locked
		if(user.getStatus() == 0) {return R.error("Account has been locked. Please contact your administrator.");
		}

		// Generate tokens and save them to the database
		R r = sysUserTokenService.createToken(user.getUserId());
		return r;
	}

Copy the code

Main data table design:

** Database name: ** Renren-Epidemic

** Issue: **V1.0.0

** Database table design description

Table clock

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id int 10 0 N Y
2 name varchar 255 0 Y N The name
3 phone varchar 255 0 Y N Mobile phone no.
4 szd varchar 255 0 Y N home
5 stzk varchar 255 0 Y N Physical condition
6 grjc varchar 255 0 Y N Have you been in contact with an infected person
7 bz varchar 255 0 Y N
8 create_time datetime 19 0 Y N The date of
9 tw varchar 255 0 Y N

Watch the file

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id int 10 0 N Y
2 path varchar 255 0 Y N
3 file_name varchar 255 0 Y N
4 file_type varchar 255 0 Y N
5 classify varchar 255 0 Y N
6 create_time datetime 19 0 Y N
7 create_by varchar 255 0 Y N

Table go_out

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id int 10 0 N Y
2 wc_time datetime 19 0 Y N Out of time
3 wc_yy varchar 255 0 Y N Go out the reason
4 wc_dd varchar 255 0 Y N The destination
5 username varchar 255 0 Y N The user name
6 phone varchar 255 0 Y N Contact Phone Number
7 bz varchar 255 0 Y N descr
8 stu varchar 255 0 Y N

Table info

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id int 10 0 N Y
2 title varchar 255 0 Y N
3 content longtext 2147483647 0 Y N
4 create_time datetime 19 0 Y N
5 create_by varchar 255 0 Y N
6 bz varchar 255 0 Y N

Table SYS_CAPTCHA (System verification code)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 uuid char 36 0 N Y uuid
2 code varchar 6 0 N N Verification code
3 expire_time datetime 19 0 Y N Expiration time

Table SYS_config (System configuration information table)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id bigint 20 0 N Y
2 param_key varchar 50 0 Y N key
3 param_value varchar 2000 0 Y N value
4 status tinyint 4 0 Y N 1 Status 0: Hidden 1: displayed
5 remark varchar 500 0 Y N note

Table SYS_log

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id bigint 20 0 N Y
2 username varchar 50 0 Y N The user name
3 operation varchar 50 0 Y N The user action
4 method varchar 200 0 Y N Request method
5 params varchar 5000 0 Y N Request parameters
6 time bigint 20 0 N N Execution time (ms)
7 ip varchar 64 0 Y N The IP address
8 create_date datetime 19 0 Y N Creation time

Table SYS_menu (Menu Management)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 menu_id bigint 20 0 N Y
2 parent_id bigint 20 0 Y N ID of the parent menu. The first-level menu is 0
3 name varchar 50 0 Y N The name of the menu
4 url varchar 200 0 Y N Menu URL
5 perms varchar 500 0 Y N Authorization (multiple users are separated by commas, for example,user: list,user:create)
6 type int 10 0 Y N Type 0: directory 1: menu 2: button
7 icon varchar 50 0 Y N The menu icon
8 order_num int 10 0 Y N The sorting

Table SYS_OSS (file upload)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id bigint 20 0 N Y
2 url varchar 200 0 Y N The URL address
3 create_date datetime 19 0 Y N Creation time

Table SYS_role

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 role_id bigint 20 0 N Y
2 role_name varchar 100 0 Y N Character name
3 remark varchar 100 0 Y N note
4 create_user_id bigint 20 0 Y N Creator ID
5 create_time datetime 19 0 Y N Creation time

Table SYS_ROLE_MENU (Role and menu mapping)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id bigint 20 0 N Y
2 role_id bigint 20 0 Y N Character ID
3 menu_id bigint 20 0 Y N Menu ids

Table SYS_user (system user)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 user_id bigint 20 0 N Y
2 username varchar 50 0 N N The user name
3 password varchar 100 0 Y N password
4 salt varchar 20 0 Y N salt
5 email varchar 100 0 Y N email
6 mobile varchar 100 0 Y N Mobile phone no.
7 status tinyint 4 0 Y N Status 0: Disabled 1: Normal
8 create_user_id bigint 20 0 Y N Creator ID
9 create_time datetime 19 0 Y N Creation time

Table SYS_user_role (User and role mapping)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id bigint 20 0 N Y
2 user_id bigint 20 0 Y N The user ID
3 role_id bigint 20 0 Y N Character ID

Table SYS_user_token (System user Token)

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 user_id bigint 20 0 N Y
2 token varchar 100 0 N N token
3 expire_time datetime 19 0 Y N Expiration time
4 update_time datetime 19 0 Y N Update time

Table THM

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id int 10 0 N Y
2 username varchar 255 0 Y N
3 cx_time datetime 19 0 Y N
4 place varchar 255 0 Y N
5 bz varchar 255 0 Y N
6 mobile varchar 255 0 Y N

Table towork_apply

Serial number The name of the The data type The length of the Decimal places Allows null values A primary key The default value instructions
1 id int 10 0 N Y
2 title varchar 255 0 Y N
3 content varchar 255 0 Y N
4 apply_user varchar 255 0 Y N
5 apply_time datetime 19 0 Y N
6 bz varchar 255 0 Y N
7 stu varchar 255 0 Y N

Everyone likes, likes, likes, comments, clocked the article updated 112/365 days