基于JavaWeb的网上宠物商城系统(Spring+SpringMVC+MyBatis框架)
目 录
目 录 2
1 系统简介 3
1.1 系统开发介绍 3
1.2 系统具体功能 3
2功能描述和模块设计 4
2.1 功能描述 4
2.1.1用户部分 4
2.1.2管理员部分 4
2.2 模块设计 4
3 主要代码清单 5
3.1主界面 5
3.2登录界面 6
3.3注册界面 7
3.4搜索界面 8
3.5宠物详情页 9
3.6宠物展示页 10
3.7购物车页 11
3.8订单页 12
3.9 404页 12
3.10管理员管理订单页 13
3.11管理员管理用户页 14
3.12管理员管理商品页 15
3.13 帮助界面 16
3.14修改个人信息界面 16
3.15用户确认订单页 17
4 系统运行与测试 18
4.1用户浏览购买商品流程 18
4.2管理员处理订单流程 19
4.3管理员管理用户流程 20
5 总结 21
2功能描述和模块设计
2.1 功能描述
2.1.1用户部分
用户可以注册一个账号,填写自己相关的信息,然后进入登录页面,进行登录,在主页可以浏览并选择自己喜欢的商品,也可以通过具体分区浏览宠物或宠物用品,还可以在导航栏搜索自己心仪的商品。在选择好自己想要的商品时,可以进入商品详情页浏览商品的具体情况,通过下方的加入购物车按钮加入购物车,在购物车勾选自己想要的宠物或商品后,可以购买,等商品收到之后可以点击确认收货按钮进行收货确认。
2.1.2管理员部分
管理员可以管理用户信息,修改或删除用户信息,维护商品或宠物信息,并进行订单的管理和发货的确认。http://www.biyezuopin.vip/onews.asp?id=16976
2.2 模块设计
图2-2 总体模块设计
package com.petstore.po;
import java.util.ArrayList;
import java.util.List;
public class ShoppingRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ShoppingRecordExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Integer value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Integer value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Integer value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Integer value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Integer> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Integer> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Integer value1, Integer value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andProductIdIsNull() {
addCriterion("product_id is null");
return (Criteria) this;
}
public Criteria andProductIdIsNotNull() {
addCriterion("product_id is not null");
return (Criteria) this;
}
public Criteria andProductIdEqualTo(Integer value) {
addCriterion("product_id =", value, "productId");
return (Criteria) this;
}
public Criteria andProductIdNotEqualTo(Integer value) {
addCriterion("product_id <>", value, "productId");
return (Criteria) this;
}
public Criteria andProductIdGreaterThan(Integer value) {
addCriterion("product_id >", value, "productId");
return (Criteria) this;
}
public Criteria andProductIdGreaterThanOrEqualTo(Integer value) {
addCriterion("product_id >=", value, "productId");
return (Criteria) this;
}
public Criteria andProductIdLessThan(Integer value) {
addCriterion("product_id <", value, "productId");
return (Criteria) this;
}
public Criteria andProductIdLessThanOrEqualTo(Integer value) {
addCriterion("product_id <=", value, "productId");
return (Criteria) this;
}
public Criteria andProductIdIn(List<Integer> values) {
addCriterion("product_id in", values, "productId");
return (Criteria) this;
}
public Criteria andProductIdNotIn(List<Integer> values) {
addCriterion("product_id not in", values, "productId");
return (Criteria) this;
}
public Criteria andProductIdBetween(Integer value1, Integer value2) {
addCriterion("product_id between", value1, value2, "productId");
return (Criteria) this;
}
public Criteria andProductIdNotBetween(Integer value1, Integer value2) {
addCriterion("product_id not between", value1, value2, "productId");
return (Criteria) this;
}
public Criteria andTimeIsNull() {
addCriterion("time is null");
return (Criteria) this;
}
public Criteria andTimeIsNotNull() {
addCriterion("time is not null");
return (Criteria) this;
}
public Criteria andTimeEqualTo(String value) {
addCriterion("time =", value, "time");
return (Criteria) this;
}
public Criteria andTimeNotEqualTo(String value) {
addCriterion("time <>", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThan(String value) {
addCriterion("time >", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThanOrEqualTo(String value) {
addCriterion("time >=", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThan(String value) {
addCriterion("time <", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThanOrEqualTo(String value) {
addCriterion("time <=", value, "time");
return (Criteria) this;
}
public Criteria andTimeLike(String value) {
addCriterion("time like", value, "time");
return (Criteria) this;
}
public Criteria andTimeNotLike(String value) {
addCriterion("time not like", value, "time");
return (Criteria) this;
}
public Criteria andTimeIn(List<String> values) {
addCriterion("time in", values, "time");
return (Criteria) this;
}
public Criteria andTimeNotIn(List<String> values) {
addCriterion("time not in", values, "time");
return (Criteria) this;
}
public Criteria andTimeBetween(String value1, String value2) {
addCriterion("time between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andTimeNotBetween(String value1, String value2) {
addCriterion("time not between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andOrderStatusIsNull() {
addCriterion("order_status is null");
return (Criteria) this;
}
public Criteria andOrderStatusIsNotNull() {
addCriterion("order_status is not null");
return (Criteria) this;
}
public Criteria andOrderStatusEqualTo(Integer value) {
addCriterion("order_status =", value, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusNotEqualTo(Integer value) {
addCriterion("order_status <>", value, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusGreaterThan(Integer value) {
addCriterion("order_status >", value, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("order_status >=", value, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusLessThan(Integer value) {
addCriterion("order_status <", value, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusLessThanOrEqualTo(Integer value) {
addCriterion("order_status <=", value, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusIn(List<Integer> values) {
addCriterion("order_status in", values, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusNotIn(List<Integer> values) {
addCriterion("order_status not in", values, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusBetween(Integer value1, Integer value2) {
addCriterion("order_status between", value1, value2, "orderStatus");
return (Criteria) this;
}
public Criteria andOrderStatusNotBetween(Integer value1, Integer value2) {
addCriterion("order_status not between", value1, value2, "orderStatus");
return (Criteria) this;
}
public Criteria andPriceIsNull() {
addCriterion("price is null");
return (Criteria) this;
}
public Criteria andPriceIsNotNull() {
addCriterion("price is not null");
return (Criteria) this;
}
public Criteria andPriceEqualTo(Double value) {
addCriterion("price =", value, "price");
return (Criteria) this;
}
public Criteria andPriceNotEqualTo(Double value) {
addCriterion("price <>", value, "price");
return (Criteria) this;
}
public Criteria andPriceGreaterThan(Double value) {
addCriterion("price >", value, "price");
return (Criteria) this;
}
public Criteria andPriceGreaterThanOrEqualTo(Double value) {
addCriterion("price >=", value, "price");
return (Criteria) this;
}
public Criteria andPriceLessThan(Double value) {
addCriterion("price <", value, "price");
return (Criteria) this;
}
public Criteria andPriceLessThanOrEqualTo(Double value) {
addCriterion("price <=", value, "price");
return (Criteria) this;
}
public Criteria andPriceIn(List<Double> values) {
addCriterion("price in", values, "price");
return (Criteria) this;
}
public Criteria andPriceNotIn(List<Double> values) {
addCriterion("price not in", values, "price");
return (Criteria) this;
}
public Criteria andPriceBetween(Double value1, Double value2) {
addCriterion("price between", value1, value2, "price");
return (Criteria) this;
}
public Criteria andPriceNotBetween(Double value1, Double value2) {
addCriterion("price not between", value1, value2, "price");
return (Criteria) this;
}
public Criteria andCountIsNull() {
addCriterion("count is null");
return (Criteria) this;
}
public Criteria andCountIsNotNull() {
addCriterion("count is not null");
return (Criteria) this;
}
public Criteria andCountEqualTo(Integer value) {
addCriterion("count =", value, "count");
return (Criteria) this;
}
public Criteria andCountNotEqualTo(Integer value) {
addCriterion("count <>", value, "count");
return (Criteria) this;
}
public Criteria andCountGreaterThan(Integer value) {
addCriterion("count >", value, "count");
return (Criteria) this;
}
public Criteria andCountGreaterThanOrEqualTo(Integer value) {
addCriterion("count >=", value, "count");
return (Criteria) this;
}
public Criteria andCountLessThan(Integer value) {
addCriterion("count <", value, "count");
return (Criteria) this;
}
public Criteria andCountLessThanOrEqualTo(Integer value) {
addCriterion("count <=", value, "count");
return (Criteria) this;
}
public Criteria andCountIn(List<Integer> values) {
addCriterion("count in", values, "count");
return (Criteria) this;
}
public Criteria andCountNotIn(List<Integer> values) {
addCriterion("count not in", values, "count");
return (Criteria) this;
}
public Criteria andCountBetween(Integer value1, Integer value2) {
addCriterion("count between", value1, value2, "count");
return (Criteria) this;
}
public Criteria andCountNotBetween(Integer value1, Integer value2) {
addCriterion("count not between", value1, value2, "count");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
还没有评论,来说两句吧...