基于java+ssm+vue的宠物店商城微信小程序

🙊作者简介:多年编程开发经验,专注java技术领域和毕业设计项目实战,系统定制、远程部署调试、代码讲解、代码修改
🍅擅长语言:springboot、ssm、vue、html、jsp、php、python、爬虫、小程序、安卓app
⬇️源码获取:文末可以获取源码+数据库+文档

⚡感兴趣的可以先收藏+关注,后续会更新更多项目资料,所有项目均配有开发文档和安装配置教程

系统介绍

本宠物店商城小程序采用java语言进行开发,数据库采用mysql。框架采用ssm。本系统实现的是和宠物相关的信息管理和发布,加入了商品销售的功能。操作角色为管理员和用户、商家,管理员的功能为用户管理、商家管理、宠物分类管理、宠物信息管理、商品分类管理、宠物用品管理、项目类型管理、服务项目管理、宠物日志管理、订单管理等;用户的功能为购买宠物、商品、预约服务发表日志管理订单等。商家功能为提供宠物、宠物用品、宠物服务,管理订单和服务预约等。本系统的功能涵盖到宠物相关的方方面面,使养宠物的用户可以有专业的平台进行信息浏览,同时可以为商家提供新的销售渠道。

系统主要技术

开发语言:Java

使用框架:SSM

系统架构:B/S

前端技术:Vue、JavaScript

数据库 :Mysql 5.7/8.0

编译工具:idea或者eclipse,jdk1.8,maven

系统功能结构设计

本系统的结构包括管理员和用户、商家,根据系统功能分析中的功能进行系统功能结构图的设计。在微信端中主要为用户操作的功能,在后台中包括管理员、和商家两种身份的操作功能。管理员的功能为管理微信端信息和用户的操作信息。本系统中管理员的功能结构图如下图3.1所示:

                        图3.1系统管理员的功能结构图

本系统用户的功能结构图如下图3.2所示:

图3.2系统用户的功能结构图

商家功能的功能结构图如下图3.3所示:

图3.3商家功能的功能结构图

系统功能实现

4.1 管理员权限的功能模块实

4.1.1系统登录功能模块的界面实现

  当系统调试运行好后,可以先使用系统登录功能,本功能相当于系统的屏障。在本界面里可以看到系统的标题和用户名、密码的文本框。在登录界面里还加入了登录按钮。系统登录界面的实现界面如下图4.1所示:

图4.1管理员登录功能的运行实现效果

管理员登录时会进行输入信息的验证,验证的流程如下图4.2所示:

图4.2管理员登录流程图

4.1.2个人中心管理功能的实现界面

图4.3个人中心管理功能的运行效果界面

4.1.3宠物信息管理功能的实现界面

  系统微信端里有很多的宠物资息,管理员可以在后台进行添加。在添加宠物信息时,可以输入不同的标题。宠物添加成功后可以删除。管理员查询宠物信息的实现界面如下图4.4所示:

图4.4管理员添加宠物信息的实现界面

4.1.4宠物用品管理功能的实现界面

宠物用品为本系统的基本信息,管理员可以根据情况添加和删除、修改宠物用品信息,在添加宠物用品信息时需要填写详情。如果宠物用品信息不再使用时可以删除宠物用品。管理员添加宠物用品信息的实现界面如下图4.5所示:

图4.5管理员添加宠物用品信息的运行效果界面

4.1.5订单管理功能的实现界面

管理员可以对用户的订单进行审核和管理,可以看到下单时间和用户的联系信息,管理员订单管理功能的实现界面如下图4.6所示: 

图4.6管理员管理订单信息的实现界面

4.1.6用户信息管理功能的实现界面

  管理员可以对注册用户的信息进行审核,也可以删除不需要的用户信息。在用户信息管理功能里可以看到用户的联系信息。管理员浏览用户信息的实现界面如下图4.7所示:

图4.7管理员浏览用户信息的实现效果界面

4.1.7项目预约管理功能的实现界面

管理员可以查询预约和管理预约。管理员查询项目预约信息的实现界面如下图4.8所示:

图4.8管理员查询项目预约信息的功能实现效果界面

4.2用户权限的功能界面实现

4.2.1首页功能的实现界面

在首页里可以看到所有的功能和信息,包括宠物信息、宠物用品信息、服务项目信息、宠物日志等。系统首页的界面实现效果如下图4.9所示:

图4.9系统首页的功能界面实现效果

4.2.2宠物信息展示界面的实现

用户登录后,可以在宠物信息展示功能里查看宠物信息。用户可以购买宠物。宠物信息的功能界面实现效果如下图4.10所示:

图4.10宠物信息界面的运行效果界面

4.2.3宠物用品功能界面实现

用户可以在浏览宠物的用品信息。宠物用品功能的实现界面如下图4.11所示:

图4.11宠物用品功能的实现界面

4.2.4在线预约功能的界面实现

用户在服务项目详情里可以预约服务,实现界面如下图4.12所示:

图4.12在线预约功能界面实现

4.2.5宠物日志功能的界面实现

  用户可以发布宠物日志和评论其它用户的宠物日志。宠物日志功能的实现界面如下图4.13所示:

图4.13宠物日志功能的实现界面

4.2.6我的功能的实现界面

在我的界面里用户可以管理预约信息、订单信息、收藏信息、购物车信息等。我的功能的实现界面如下图4.14所示:

图4.14我的功能界面

论文参考

核心代码

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.ChongwuxinxiEntity;
import com.entity.view.ChongwuxinxiView;

import com.service.ChongwuxinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import com.service.StoreupService;
import com.entity.StoreupEntity;

/**
 * 宠物信息
 * 后端接口
 * @author 
 * @email 
 * @date 
 */
@RestController
@RequestMapping("/chongwuxinxi")
public class ChongwuxinxiController {
    @Autowired
    private ChongwuxinxiService chongwuxinxiService;


    @Autowired
    private StoreupService storeupService;

    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ChongwuxinxiEntity chongwuxinxi, 
		HttpServletRequest request){

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("shangjia")) {
			chongwuxinxi.setShangjiazhanghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<ChongwuxinxiEntity> ew = new EntityWrapper<ChongwuxinxiEntity>();
		PageUtils page = chongwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwuxinxi), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ChongwuxinxiEntity chongwuxinxi, 
		HttpServletRequest request){
        EntityWrapper<ChongwuxinxiEntity> ew = new EntityWrapper<ChongwuxinxiEntity>();
		PageUtils page = chongwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwuxinxi), params), params));
        return R.ok().put("data", page);
    }

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ChongwuxinxiEntity chongwuxinxi){
        EntityWrapper< ChongwuxinxiEntity> ew = new EntityWrapper< ChongwuxinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( chongwuxinxi, "chongwuxinxi")); 
		ChongwuxinxiView chongwuxinxiView =  chongwuxinxiService.selectView(ew);
		return R.ok("查询宠物信息成功").put("data", chongwuxinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ChongwuxinxiEntity chongwuxinxi = chongwuxinxiService.selectById(id);
		chongwuxinxi.setClicknum(chongwuxinxi.getClicknum()+1);
		chongwuxinxi.setClicktime(new Date());
		chongwuxinxiService.updateById(chongwuxinxi);
        return R.ok().put("data", chongwuxinxi);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        ChongwuxinxiEntity chongwuxinxi = chongwuxinxiService.selectById(id);
		chongwuxinxi.setClicknum(chongwuxinxi.getClicknum()+1);
		chongwuxinxi.setClicktime(new Date());
		chongwuxinxiService.updateById(chongwuxinxi);
        return R.ok().put("data", chongwuxinxi);
    }
    


    /**
     * 赞或踩
     */
    @RequestMapping("/thumbsup/{id}")
    public R thumbsup(@PathVariable("id") String id,String type){
        ChongwuxinxiEntity chongwuxinxi = chongwuxinxiService.selectById(id);
        if(type.equals("1")) {
        	chongwuxinxi.setThumbsupnum(chongwuxinxi.getThumbsupnum()+1);
        } else {
        	chongwuxinxi.setCrazilynum(chongwuxinxi.getCrazilynum()+1);
        }
        chongwuxinxiService.updateById(chongwuxinxi);
        return R.ok();
    }

    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ChongwuxinxiEntity chongwuxinxi, HttpServletRequest request){
    	chongwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(chongwuxinxi);

        chongwuxinxiService.insert(chongwuxinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
	@IgnoreAuth
    @RequestMapping("/add")
    public R add(@RequestBody ChongwuxinxiEntity chongwuxinxi, HttpServletRequest request){
    	chongwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(chongwuxinxi);

        chongwuxinxiService.insert(chongwuxinxi);
        return R.ok();
    }

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        chongwuxinxiService.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<ChongwuxinxiEntity> wrapper = new EntityWrapper<ChongwuxinxiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}

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

		int count = chongwuxinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,ChongwuxinxiEntity chongwuxinxi, HttpServletRequest request,String pre){
        EntityWrapper<ChongwuxinxiEntity> ew = new EntityWrapper<ChongwuxinxiEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicknum");
        
        params.put("order", "desc");
		PageUtils page = chongwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwuxinxi), params), params));
        return R.ok().put("data", page);
    }







}

  • 15
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值