MVC项目之订单管理

本文档详细介绍了使用MVC框架进行订单管理的实现过程,包括商家功能(查看订单、发货、订单项查看)和买家功能(查看订单、撤单、签收)。同时,针对在开发中遇到的`java.sql.SQLSyntaxErrorException`,分析了错误原因并提供了解决方案——检查SQL语句中的空格位置。
摘要由CSDN通过智能技术生成

一.本期内容:


1、商家:

                     1、查看订单(未发货、已发货、已签收、订单项)

                     2、发货功能(状态:1:未发货、2:已发货、3:已签收、4:已撤单)

                     3、订单项目查看

 实现思路:

        订单表的查询

        将订单表的订单状态由1改成2

        通过订单的id到订单项表查询出对应的订单项

  2.买家:

                     1、查看订单(未发货、已发货、已签收)

                     2、撤单

                     3、签收

实现思路:

        订单表的查询

        将订单表的订单状态由1改成4

        将订单表的订单状态由2改成3

二.商家功能

第一步:商家订单界面

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商家订单页面</title>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/js/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/js/easyui/themes/icon.css">
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/js/easyui/jquery.easyui.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/main.js"></script>
</head>
<body>
<table id="dg" style="style=" width:400px;height:200px;
"></table>

<script>
    $(function () {
        $('#dg').datagrid({
            url: '${pageContext.request.contextPath}/order.action?methodName=list&&orderState=1',
            fit: true,
            fitColumns: true,
            pagination: true,
            singleSelect: true,
            columns: [[
                // {field:'id',title:'id',width:100},
                {field: 'id', title: '书籍名称', hidden: true},
                {field: 'postalcode', title: '收货人邮编', hidden: true},
                {field: 'uid', title: '用户', width: 50},
                {field: 'consignee', title: '收货人', width: 50},
                {field: 'phone', title: '手机号', width: 50},
                {field: 'address', title: '收获人地址', width: 50},
                {field: 'orderPrice', title: '价格', width: 50},
                {field: 'sendTime', title: '发货时间', width: 50},
                {field: 'orderTime', title: '订单时间', width: 50},
                {
                    field: 'sendType', title: '发送方式', width: 50, formatter: function (value, row, index) {
                        if (row.sendType == 1) {
       
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值