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>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章