基于javaweb+springboot的化妆品商城系统(java+Springboot+ssm+mysql+jsp+maven)
一、项目简述
本系统主要实现的功能有: 网上商城系统,前台+后台管理,用户注册,登录,上架展示,分组展示,搜索,收货地址管理,购物车管理,添加,购买,个人信息修改。订单查询等等,后台商品管理,分类管理,库存管理,订单管理,评论管理,用户管理,信息修改等等。
二、项目运行
环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: Springboot+ SpringMVC + MyBatis + Jsp + Html+ JavaScript + JQuery + Ajax + maven等等。
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
if (yn) {
object.put("success", true);
} else {
object.put("success", false);
}
return object.toJSONString();
}
}
logger.info("封装订单项对象");
productOrderItem.setProductOrderItem_product(product);
productOrderItem.setProductOrderItem_number(product_number);
productOrderItem.setProductOrderItem_price(product.getProduct_sale_price() * product_number);
productOrderItem.setProductOrderItem_user(new User().setUser_id(Integer.valueOf(userId.toString())));
boolean yn = productOrderItemService.add(productOrderItem);
if (yn) {
object.put("success", true);
} else {
object.put("success", false);
return jsonObject.toJSONString();
}
//更新产品类型信息-ajax
@ResponseBody
@RequestMapping(value = "admin/category/{category_id}", method = RequestMethod.PUT, produces = "application/json;charset=utf-8")
public String updateCategory(@RequestParam String category_name/* 分类名称 */,
@RequestParam String category_image_src/* 分类图片路径 */,
@PathVariable("category_id") Integer category_id/* 分类ID */) {
JSONObject jsonObject = new JSONObject();
logger.info("整合分类信息");
Category category = new Category()
.setCategory_id(category_id)
.setCategory_name(category_name)
.setCategory_image_src(category_image_src.substring(category_image_src.lastIndexOf("/") + 1));
logger.info("更新分类信息,分类ID值为:{}", category_id);
boolean yn = categoryService.update(category);
if (yn) {
logger.info("更新成功!");
jsonObject.put("success", true);
jsonObject.put("category_id", category_id);
} else {
jsonObject.put("success", false);
logger.info("更新失败!事务回滚");
return jsonObject.toJSONString();
}
//更新产品类型信息-ajax
@ResponseBody
@RequestMapping(value = "admin/category/{category_id}", method = RequestMethod.PUT, produces = "application/json;charset=utf-8")
public String updateCategory(@RequestParam String category_name/* 分类名称 */,
@RequestParam String category_image_src/* 分类图片路径 */,
@PathVariable("category_id") Integer category_id/* 分类ID */) {
JSONObject jsonObject = new JSONObject();
logger.info("整合分类信息");
Category category = new Category()
.setCategory_id(category_id)
.setCategory_name(category_name)
object.put("success", false);
object.put("url", "/login");
return object.toJSONString();
}
logger.info("------验证订单信息------");
logger.info("查询订单是否存在");
ProductOrder order = productOrderService.getByCode(order_code);
if (order == null) {
logger.warn("订单不存在,返回订单列表页");
object.put("success", false);
object.put("url", "/order/0/10");
return object.toJSONString();
}
logger.info("验证订单状态");
if (order.getProductOrder_status() != 2) {
logger.warn("订单状态不正确,返回订单列表页");
object.put("success", false);
object.put("url", "/order/0/10");
return object.toJSONString();
}
logger.info("验证订单状态");
if (order.getProductOrder_status() != 0) {
logger.warn("订单状态不正确,返回订单列表页");
object.put("success", false);
object.put("url", "/order/0/10");
return object.toJSONString();
}
logger.info("验证用户与订单是否一致");
if (order.getProductOrder_user().getUser_id() != Integer.parseInt(userId.toString())) {
logger.warn("用户与订单信息不一致,返回订单列表页");
object.