基于ssm vue个性化商铺系统和论文PPT APP商城

基于ssm vue个性化商铺系统和论文PPTssm706   用户端是APP+ 后台管理系统

开发工具:idea 数据库mysql5.7+

数据库链接工具:navcat,小海豚等

环境: jdk8 tomcat8.5

开发技术 ssm  vue  vue.js

演示视频:

基于ssm vue个性化商铺系统和论文PPT 商城APP

摘 要

随着信息化时代的到来,管理系统都趋向于智能化、系统化,个性化商铺系统也不例外,但目前国内的市场仍都使用人工管理,市场规模越来越大,同时信息量也越来越庞大,人工管理显然已无法应对时代的变化,而个性化商铺系统能很好地解决这一问题,轻松应对个性化商铺系统平时的工作,既能提高人力物力财力,又能加快工作的效率,取代人工管理是必然趋势。

本个性化商铺系统以ssm作为框架,b/s模式以及MySql作为后台运行的数据库,同时使用Tomcat用为系统的服务器。本系统主要包括首页、个人中心、用户管理、商家管理、店铺类别管理、商品类别管理、店铺信息管理、商品信息管理、系统管理、订单管理等功能,通过这些功能的实现能够基本满足日常个性化商铺管理的操作。

本文着重阐述了个性化商铺系统的分析、设计与实现,首先介绍开发系统和环境配置、数据库的设计,接着说明功能模块的详细实现,最后进行了总结。

关键词:个性化商铺; ssm;MySql数据库;Tomcat;


Abstract

With the advent of the era of information technology, management systems tend to be intelligent, systematic, personalized stores system is no exception, but the current domestic market still use manual management, the size of the market is more and more big, at the same time, the amount of information is becoming more and more big, artificial management has clearly unable to cope with the changes of The Times, and personalized shop system can well solve the problem, It can not only improve human, material and financial resources, but also speed up the efficiency of work. It is an inevitable trend to replace manual management.

This personalized shop system uses SSM as the framework, B/S mode and MySql as the background database, and Tomcat as the server of the system. This system mainly includes home page, personal center, user management, business management, shop category management, commodity category management, shop information management, commodity information management, system management, order management and other functions, through the realization of these functions can basically meet the daily personalized shop management operation.

This paper focuses on the analysis, design and implementation of personalized shop system, first introduces the development system and environment configuration, database design, then explains the detailed implementation of functional modules, and finally summarizes.

Key words: personalized shop; ssm; MySql database; Tomcat;

基于ssm vue个性化商铺系统和论文PPT APP商城_第1张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第2张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第3张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第4张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第5张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第6张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第7张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第8张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第9张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第10张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第11张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第12张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第13张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第14张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第15张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第16张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第17张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第18张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第19张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第20张图片基于ssm vue个性化商铺系统和论文PPT APP商城_第21张图片

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 java.io.IOException;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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.OrdersEntity;
import com.entity.view.OrdersView;

import com.service.OrdersService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;

/**
 * 订单
 * 后端接口
 * @author 
 * @email 
 * @date 2022-04-10 13:32:24
 */
@RestController
@RequestMapping("/orders")
public class OrdersController {
    @Autowired
    private OrdersService ordersService;



    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map params,OrdersEntity orders, 
		HttpServletRequest request){
    	if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
    		orders.setUserid((Long)request.getSession().getAttribute("userId"));
    	}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("shangjia")) {
			orders.setShangjiazhanghao((String)request.getSession().getAttribute("username"));
			if(orders.getUserid()!=null) {
                                orders.setUserid(null);
                        }
		}
        EntityWrapper ew = new EntityWrapper();
		PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map params,OrdersEntity orders, 
		HttpServletRequest request){
        EntityWrapper ew = new EntityWrapper();
		PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));
        return R.ok().put("data", page);
    }

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

	 /**
     * 查询
     */
    @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("查询订单成功").put("data", ordersView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        OrdersEntity orders = ordersService.selectById(id);
        return R.ok().put("data", orders);
    }

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



    /**
     * 后端保存
     */
    @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();
    }

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        ordersService.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 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 wrapper = new EntityWrapper();
		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"));
    	}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("shangjia")) {
			wrapper.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));
		}

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







    /**
     * (按值统计)
     */
    @RequestMapping("/value/{xColumnName}/{yColumnName}")
    public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
        Map params = new HashMap();
        params.put("xColumn", xColumnName);
        params.put("yColumn", yColumnName);
        EntityWrapper ew = new EntityWrapper();
        String tableName = request.getSession().getAttribute("tableName").toString();
        if(tableName.equals("shangjia")) {
            ew.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));
        }
            ew.in("status", new String[]{"已支付","已发货","已完成"});
        List> result = ordersService.selectValue(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }

    /**
     * (按值统计)时间统计类型
     */
    @RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
    public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
        Map params = new HashMap();
        params.put("xColumn", xColumnName);
        params.put("yColumn", yColumnName);
        params.put("timeStatType", timeStatType);
        EntityWrapper ew = new EntityWrapper();
        String tableName = request.getSession().getAttribute("tableName").toString();
        if(tableName.equals("shangjia")) {
            ew.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));
        }
            ew.in("status", new String[]{"已支付","已发货","已完成"});
        List> result = ordersService.selectTimeStatValue(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }

    /**
     * 分组统计
     */
    @RequestMapping("/group/{columnName}")
    public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
        Map params = new HashMap();
        params.put("column", columnName);
        EntityWrapper ew = new EntityWrapper();
        String tableName = request.getSession().getAttribute("tableName").toString();
        if(tableName.equals("shangjia")) {
            ew.eq("shangjiazhanghao", (String)request.getSession().getAttribute("username"));
        }
            ew.in("status", new String[]{"已支付","已发货","已完成"});
        List> result = ordersService.selectGroup(params, ew);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        for(Map m : result) {
            for(String k : m.keySet()) {
                if(m.get(k) instanceof Date) {
                    m.put(k, sdf.format((Date)m.get(k)));
                }
            }
        }
        return R.ok().put("data", result);
    }
}

你可能感兴趣的:(vue.js,前端,javascript)