【一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义】
**开源地址:https://docs.qq.com/doc/DSmxTbFJ1cmN1R2dB **
id=“loginName”
placeholder=“请输入你的手机号”/>
id=“password”
type=“password”
name=“password”
placeholder=“请输入你的密码”/>
验证码:
<input class=“login-info-input verify-code” type=“text” name=“verifyCode”
placeholder=“请输入验证码” id=“verifyCode”/>
<img alt=“单击图片刷新!” style=“top: 14px;position: relative;” th:src=“@{/common/mall/kaptcha}”
οnclick=“this.src=‘/common/mall/kaptcha?d=’+new Date()*1”>
一些热门和推荐的二手商品信息、可以再后台进行配置这些
用户登录模块和注册:
通过手机号和密码以及验证码进行登录注册操作
我的购物车:
我的订单流程以及收获地址信息等
个人信息查看和修改
后台管理:
后台管理员主要对前端客户端一些用户的管理、商品的管理、轮播图管理、商品分类管理以及订单信息和订单流程管理
轮播图配置
商品分类以及排序等操作
商品管理和上下架等具体操作
package ltd.newbee.mall.controller.admin;
import ltd.newbee.mall.common.ServiceResultEnum;
import ltd.newbee.mall.controller.vo.NewBeeMallOrderItemVO;
import ltd.newbee.mall.entity.NewBeeMallOrder;
import ltd.newbee.mall.service.NewBeeMallOrderService;
import ltd.newbee.mall.util.PageQueryUtil;
import ltd.newbee.mall.util.Result;
import ltd.newbee.mall.util.ResultGenerator;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
- @author 13
*/
@Controller
@RequestMapping(“/admin”)
public class NewBeeMallOrderController {
@Resource
private NewBeeMallOrderService newBeeMallOrderService;
@GetMapping(“/orders”)
public String ordersPage(HttpServletRequest request) {
request.setAttribute(“path”, “orders”);
return “admin/newbee_mall_order”;
}
/**
- 列表
*/
@RequestMapping(value = “/orders/list”, method = RequestMethod.GET)
@ResponseBody
public Result list(@RequestParam Map<String, Object> params) {
if (StringUtils.isEmpty(params.get(“page”)) || StringUtils.isEmpty(params.get(“limit”))) {
return ResultGenerator.genFailResult(“参数异常!”);
}
PageQueryUtil pageUtil = new PageQueryUtil(params);
return ResultGenerator.genSuccessResult(newBeeMallOrderService.getNewBeeMallOrdersPage(pageUtil));
}
/**
- 修改
*/
@RequestMapping(value = “/orders/update”, method = RequestMethod.POST)
@ResponseBody
public Result update(@RequestBody NewBeeMallOrder newBeeMallOrder) {
if (Objects.isNull(newBeeMallOrder.getTotalPrice())
|| Objects.isNull(newBeeMallOrder.getOrderId())
|| newBeeMallOrder.getOrderId() < 1
|| newBeeMallOrder.getTotalPrice() < 1
|| StringUtils.isEmpty(newBeeMallOrder.getUserAddress())) {
return ResultGenerator.genFailResult(“参数异常!”);
}
String result = newBeeMallOrderService.updateOrderInfo(newBeeMallOrder);
if (ServiceResultEnum.SUCCESS.getResult().equals(result)) {
return ResultGenerator.genSuccessResult();
} else {
return ResultGenerator.genFailResult(result);
}
}
/**
- 详情
*/
@GetMapping(“/order-items/{id}”)
@ResponseBody
public Result info(@PathVariable(“id”) Long id) {
List orderItems = newBeeMallOrderService.getOrderItems(id);
if (!CollectionUtils.isEmpty(orderItems)) {
return ResultGenerator.genSuccessResult(orderItems);
}
return ResultGenerator.genFailResult(ServiceResultEnum.DATA_NOT_EXIST.getResult());
}
/**
- 配货
*/
@RequestMapping(value = “/orders/checkDone”, method = RequestMethod.POST)
@ResponseBody
public Result checkDone(@RequestBody Long[] ids) {
if (ids.length < 1) {
return ResultGenerator.genFailResult(“参数异常!”);
}
String result = newBeeMallOrderService.checkDone(ids);
if (ServiceResultEnum.SUCCESS.getResult().equals(result)) {
return ResultGenerator.genSuccessResult();
} else {
return ResultGenerator.genFailResult(result);
}
}
/**
- 出库
*/
@RequestMapping(value = “/orders/checkOut”, method = RequestMethod.POST)
@ResponseBody
public Result checkOut(@RequestBody Long[] ids) {