基于微信小程序宠物交易商城系统(微信小程序毕业设计)

基于微信小程序宠物交易商城系统
宠物交易系统商城系统分为用户小程序端和管理员后台网页端,其中后端是采用java编程语言,mysql数据库,idea开发工具,ssm框架开发,本系统分为用户和管理员两个端,其中用户可以在小程序端进行注册登陆,查看宠物资讯,宠物商品,搜索商品,评价留言,在线购买,加入购物车,生成订单,联系客服等功能,管理员可以对用户信息,商品分类,商品详情,订单信息,宠物资讯信息等进行管理。本系统功能齐全,文档有论文和答辩ppt,适合作为微信小程序毕业设计和课程设计参考学习。

一.技术环境

jdk版本:1.8 及以上
ide工具:IDEA
数据库: mysql5.7 (必须5.7)
编程语言: Java
tomcat: 8.0 及以上
java框架:SSM
maven: 3.6.1
前端:layui
详细技术:HTML+CSS+JS+JSP+JAVA+SSM+MYSQL+JQUERY+MAVEN

二.系统功能

基于微信小程序宠物交易管理系统
系统分为用户和管理员两个角色
用户的主要功能有:
1.用户注册和登陆小程序
2.用户查看宠物资讯信息
3.用户查看宠物商品列表,在线搜索宠物商品信息
4.用户查者宠物商品详情,在线留育评价
5.用户把宠物商品加入到购物车,或者立即购买,选择地址下订单
6.用户个人中心修改个人资料,修改密码
7.用户个人中心在线充值
8.用户个人中心联系喜服,在线交流
9.用户查看订单信息,包括订单商品的状态
10.退出登陆
管理员的主要功能有 :

1.管理员输入账户登陆后台
2.个人中心:管理员修改密码和账户信息
3.用户管理:对注册的用户信息进行删除,查询,修改,划除
4.宠物资讯管理:管理员对宠物资讯信息进行删除,修改,查询,添加
5.商品分类管理:对宠物商品的分类信息进行添加,修改,查询,删除
6,商品信息管理:对宠物商品信息进行添加,删除,查询,修改
7.轮播图管理:对小程序的轮播图进行添加,修改,删除,查询
8.客服信息:管理员对用户发来的客服信息进行查看和回复
9.订单管理:管理员对用户的订单进行查询,修改,发货
10.退出系统

三.代码示例

package com.lmu.controller;
/**
 * 和登陆有关的都在这里
 */

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.UserUtils;

import org.apache.commons.collections.map.HashedMap;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

@Controller("loginController")
@Scope("prototype")
public class LoginController extends ActionSupport {
    @Autowired
    private UserService userService;
    @Autowired
    private RoleService roleService;
    private User user;
    private Map<String, Object> map = new HashMap();
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public UserService getUserService() {
        return userService;
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    /**
 * 用户登陆
 * @return
 */
	public void index() throws IOException {
       User user1 = userService.getUser(user);
        if (user1 != null){
            if (user1.getIsSh() == 1){
                if (user1.getRole().getEnName().equals("admin")){
                    ActionContext.getContext().getSession().put("user", user1);
                }
                if (user1.getRole().getEnName().equals("js")){
                    ActionContext.getContext().getSession().put("user1", user1);
                }
                if (user1.getRole().getEnName().equals("xs")){
                    ActionContext.getContext().getSession().put("user2", user1);
                }
                map.put("flag", 1);
                map.put("url", "login_indexs.do");
                map.put("id", user1.getId());
                JsonUtils.toJson(map);
            } else {
                map.put("flag", 2);
                JsonUtils.toJson(map);
            }
        } else {
            map.put("flag", 3);
            JsonUtils.toJson(map);
        }
    }

    public String indexs() throws IOException {
        User u = UserUtils.getUser();
        if (u != null){
            ActionContext.getContext().put("user", u);
            String ss = u.getRole().getEnName();
            ActionContext.getContext().put("role", u.getRole().getEnName());
        }
        return SUCCESS;
    }
	//登陆页面
	public String login() {

        return SUCCESS;
	}

   //退出
	public String tuichu() {
		ActionContext ac = ActionContext.getContext();
		Map session = ac.getSession();
		session.remove("userName");
		session.remove("userId");
		ServletActionContext.getRequest().getSession().invalidate();
		return "login";
	}

}



package com.lmu.controller;

/**
 * 用户新增
 */

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.Pager;
import com.lmu.utils.UserUtils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.awt.event.FocusEvent;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Controller("userController")
@Scope("prototype")
public class UserController extends ActionSupport implements ModelDriven<User> {
    @Autowired
    private UserService userService;
    @Autowired
    private RoleService roleService;
    private User user;
    private Integer userId;
    private Map<String, Object> map = new HashMap();


    /**
     * list
     *
     * @return
     */
    public String list() throws IOException {
        User user1 = UserUtils.getUser();
        if (user1 == null || user1.getId() == null){
            ActionContext.getContext().put("login", 1);
            return SUCCESS;
        }
        Pager<User> pagers = null;
        Role role = user1.getRole();
        if (role.getEnName().equals("admin")) {
            pagers = userService.getList(user);
            ActionContext.getContext().put("pagers", pagers);
            ActionContext.getContext().put("user", user1);
            ActionContext.getContext().put("role", role);
            ActionContext.getContext().put("bean", user);
            return SUCCESS;
        } else if (role.getEnName().equals("xs") || role.getEnName().equals("js")) {
            pagers = userService.getList(user1);
            ActionContext.getContext().put("pagers", pagers);
            ActionContext.getContext().put("bean", user);
            return SUCCESS;
        }
        return null;
    }



    /**
     * 跳转add
     *
     * @return
     */
    public String add() {
        Pager<Role> pagers = roleService.pagers();
        ActionContext.getContext().put("pagers", pagers);
        return SUCCESS;
    }

    /**
     * 查询修改
     *
     * @return
     */
    public String edit() {
        User bean = userService.findById(userId);
        Pager<Role> pagers = roleService.pagers();
        ActionContext.getContext().put("bean", bean);
        ActionContext.getContext().put("pagers", pagers);
        return SUCCESS;
    }


    /**
     * 审核
     *
     * @return
     */
    public void updateSh() throws IOException {
        user.setIsSh(1);
        userService.updates(user);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
    }

    /**
     * 更新
     *
     * @return
     */
    public String update() throws IOException {
        if (user.getPass().equals("")){
            user.setPass(null);
        }
        userService.updates(user);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
        return SUCCESS;
    }

    /**
     * 保存
     *
     * @return
     */
    public void save() throws IOException {
        if (userService.getUser(user) != null){
            map.put("flag", false);
            map.put("url", "login_login.do");
            JsonUtils.toJson(map);
        } else {
            user.setTime(new Date());
            userService.save(user);
            map.put("flag", true);
            map.put("url", "login_login.do");
            JsonUtils.toJson(map);
        }
    }

    public void delete() throws IOException {
        User user1 = userService.findById(userId);
        user1.setIsDelete(1);
        userService.update(user1);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
    }

    @Override
    public User getModel() {
        if (user == null) {
            user = new User();
        }
        return user;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}



四.功能截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

五.有意者请私谢谢

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于微信小程序的图书商城系统具有很好的发展前景。随着移动互联网的普及和人们消费观念的变化,越来越多的用户选择在移动设备上购物。微信小程序作为一种轻量级应用,可以在微信内部直接使用,不需要下载和安装,用户使用起来非常方便。 针对图书商城系统的发展前景,可以从以下几个方面来分析: 1. 市场需求:随着人们生活水平的提高,阅读已经成为一种重要的文化娱乐方式。与此同时,传统的图书销售模式已经不能满足人们的消费需求。基于微信小程序的图书商城系统能够提供更加便利的购书方式,满足用户的购书需求。 2. 技术支持:微信小程序作为一种新型的应用方式,其技术支持已经非常成熟。此外,微信小程序的开发成本较低,开发周期也比较短。因此,开发基于微信小程序的图书商城系统比较容易,开发成本也相对较低。 3. 用户体验:基于微信小程序的图书商城系统可以通过微信平台与用户进行交互,用户可以通过微信快速的进行购书、查询物流、评价等操作。此外,基于微信小程序的图书商城系统还可以通过智能推荐等方式提高用户体验。 总的来说,基于微信小程序的图书商城系统具有很好的发展前景,但需要注意的是,在竞争激烈的市场环境下,如何提高用户体验、优化服务等方面需要不断地进行优化。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值