Jsp+Ssm+Mysql实现的校园二手市场

一、 项目概述

今天给大家演示的是一款由jsp+ssm(spring+springMVC+mybaits)+mysql实现的校园二手市场交易平台,前台主要实现的功能有:按分类显示商品列表、搜索商品、登录注册、关注商品、评论商品、购买商品、用户登录后购买商品、发布商品、查看订单、查看关注的商品、修改个人信息等。后台主要功能有:用户管理、商品管理、订单管理、用户余额管理、管理员密码修改等。
需要的可以修改成其他的系统,图书馆里系统,校园超市,花店都可以。
有问题可以一起学习,可以加本人qq,2439644676

二、项目演示

在线演示地址:http://www.educy.top:8080/squirrel
后台登陆:17743250873 123456
廉价服务器,大侠手下留情

三、运行效果

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

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

四、代码展示

在这里插入图片描述

package com.ldu.pojo;
/**
 * 订单
 * @author lyq
 *
 */
public class Orders {
	private Integer id;

	private Integer userId;
    
	private Goods goods;
	
	private Integer goodsId;

    private Long orderNum;
    
    private Float orderPrice;

    private Integer orderState;
    
    private String orderInformation;

    private String orderDate;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	

	public Integer getUserId() {
		return userId;
	}

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

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	
	public Integer getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}

	public Long getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Long orderNum) {
		this.orderNum = orderNum;
	}

	public Float getOrderPrice() {
		return orderPrice;
	}

	public void setOrderPrice(Float orderPrice) {
		this.orderPrice = orderPrice;
	}

	public Integer getOrderState() {
		return orderState;
	}

	public void setOrderState(Integer orderState) {
		this.orderState = orderState;
	}

	public String getOrderInformation() {
		return orderInformation;
	}

	public void setOrderInformation(String orderInformation) {
		this.orderInformation = orderInformation;
	}

	public String getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	@Override
	public String toString() {
		return "Orders [id=" + id + ", userId=" + userId + ", goods=" + goods + ", orderNum=" + orderNum
				+ ", orderPrice=" + orderPrice + ", orderState=" + orderState + ", orderInformation=" + orderInformation
				+ ", orderDate=" + orderDate + "]";
	}

	

	

}

在这里插入图片描述

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">

<generatorConfiguration>
    <!--数据库驱动jar -->
    <classPathEntry location="E:/JAR/mysql-connector-java-5.1.7-bin.jar" />

    <context id="DB2Tables" targetRuntime="MyBatis3">
        <!--去除注释  -->
        <commentGenerator>
            <property name="suppressAllComments" value="true" />
        </commentGenerator>

        <!--数据库连接 -->
        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                        connectionURL="jdbc:mysql://localhost:3306/squirrel"
                        userId="squirrel"
                        password="lduyfla">
        </jdbcConnection>
        <javaTypeResolver >
            <property name="forceBigDecimals" value="false" />
        </javaTypeResolver>

        <!--生成实体类) -->
        <javaModelGenerator targetPackage="com.ldu.pojo" targetProject="E:/IntelliJ_Project/squirrel/src/main/java">
            <property name="enableSubPackages" value="false" />
            <property name="trimStrings" value="true" />
        </javaModelGenerator>
        <!--生成SQLMAP文件 -->
        <sqlMapGenerator targetPackage="mapper"  targetProject="E:/IntelliJ_Project/squirrel/src/main/resources">
            <property name="enableSubPackages" value="false" />
        </sqlMapGenerator>
        <!--生成xml映射文件-->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.ldu.dao"  targetProject="E:/IntelliJ_Project/squirrel/src/main/java">
            <property name="enableSubPackages" value="false" />
        </javaClientGenerator>
        <!--对应数据库表 mysql可以加入主键自增 字段命名 忽略某字段等-->
        <table tableName="user" domainObjectName="User" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
        <table tableName="catelog" domainObjectName="Catelog" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
        <table tableName="goods" domainObjectName="Goods" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
        <table tableName="image" domainObjectName="Image" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
        <table tableName="comments" domainObjectName="Comments" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
        <table tableName="notice" domainObjectName="Notice" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
        <table tableName="reply" domainObjectName="Reply" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>

    </context>
</generatorConfiguration>


发布了92 篇原创文章 · 获赞 94 · 访问量 131万+

猜你喜欢

转载自blog.csdn.net/qq_40985788/article/details/104868725