Java_Springboot_Online Fruit and Vegetable Mall System

Resource download: https://download.csdn.net/download/wouderw/87744493

1. Project introduction

(1) Project description: This is a fruit and vegetable mall system project developed based on the SpringBoot framework. The project is divided into front-end and back-end. The front-end is for ordinary users to log in, and the background is for administrators to log in. First of all, the entire project page is concise and refreshing, with rich functions, and has all the basic functions that an online shopping mall system should have. Secondly, the project uses redis cache, JWT and other technologies to optimize the performance of the project. The code is concise and standardized, and each step has detailed code comments, which is easy to understand. Whether it is a final assignment or a graduation project, it is a perfect choice, and it is an absolute weapon to get high scores! !
(2) Project functions: The project is divided into two roles: user and administrator. The functions of user roles: login (JWT token verification), registration (email notification, verification code verification), browsing products, modifying personal information (uploading Picture), change password, comment on product, add product to shopping cart (Redis cache), submit order (email notification), view order, collect product and so on. The functions of the administrator role: manage user information, manage user comment information, manage product information, manage order information, etc.
(3) Application technology: SpringBoot + MyBatis + FreeMarker + JWT + Redis + snowflake algorithm and other technologies.
(4) Operating environment: eclipse/IDEA + MySQL5.7 + Maven3.6.3 + JDK1.8 (other versions are also possible in theory) + Redis5.0.5 (redis5.0.5 installation package comes with project resources)

(5) Hardware environment: more than 1G memory

Two, data content

The materials include project source code, database files (sql files, which can be imported into the MySQL database through tools such as NaviCat), project picture materials, and operation guidance documents (details on how to run the project through IDEA)

Three, part of the code

(1) Role related


	/**
	 * 角色权限表单处理
	 * @param ids
	 * @param roleId
	 * @return
	 */
	@RequestMapping(value="/save_authority",method=RequestMethod.POST)
	@ResponseBody
	public ResponseVo<Boolean> saveAuthority(String ids, Integer roleId){
		return roleService.saveAuthority(ids, roleId);
	}
	
	
	/**
	 * 角色添加表单处理
	 * @param role
	 * @return
	 */
	@RequestMapping(value="/add",method=RequestMethod.POST)
	@ResponseBody
	public ResponseVo<Boolean> add(Role role){
		return roleService.add(role);
	}
	

 (2) Commodity related


    /**
     * 编辑商品操作处理
     * @param product
     * @return
     */
    @RequestMapping(value="/edit",method=RequestMethod.POST)
    @ResponseBody
    public ResponseVo<Boolean> edit(Product product){
        return productService.edit(product);
    }

    /**
     * 删除商品操作处理
     * @param id
     * @return
     */
    @RequestMapping(value="/delete",method=RequestMethod.POST)
    @ResponseBody
    public ResponseVo<Boolean> delete(Long id){
        return productService.delete(id);
    }
}

 (3) Database SQL

DROP TABLE IF EXISTS `bms_admin`;
CREATE TABLE `bms_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管理员ID',
  `role_id` int(11) NOT NULL DEFAULT '0' COMMENT '管理员对应角色ID;默认0:无',
  `head_pic` varchar(256) DEFAULT 'common/default_img.jpg' COMMENT '管理员头像',
  `password` varchar(16) NOT NULL DEFAULT '123456' COMMENT '管理员密码',
  `name` varchar(16) NOT NULL COMMENT '管理员姓名',
  `sex` int(11) DEFAULT '3' COMMENT '管理员性别:1:男;2:女;3:未知',
  `address` varchar(128) DEFAULT NULL COMMENT '管理员地址',
  `mobile` bigint(20) NOT NULL COMMENT '管理员电话',
  `state` int(11) NOT NULL DEFAULT '1' COMMENT '管理员状态:1:启用;2:冻结',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '管理员创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '管理员更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

Fourth, run the screenshot

(1) IDEA running

 (2) Ordinary user login

(3) Browse products and add to shopping cart

 (4) Background management

Background management includes: menu management, administrator management, role management, email management, announcement management, product management, user management, and order management.

Resource download: https://download.csdn.net/download/wouderw/87744493

Guess you like

Origin blog.csdn.net/wouderw/article/details/130451779