Browse Source

二手拆分

Duan_xu 2 years ago
parent
commit
2986e051dd

+ 6 - 3
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -178,10 +178,13 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
             if (newOrder.getAffirmPaymentFlag() == null) {
                 newOrder.setAffirmPaymentFlag("0");
             }
-            // 有赠品不能线上支付
-            if (newOrder.getPresentCount() > 0 || newOrder.getPromotionalGiftsCount() > 0) {
-                onlinePay = false;
+            if(newOrder.getPromotionalGiftsCount() !=null ){
+                // 有赠品不能线上支付
+                if (newOrder.getPresentCount() > 0 || newOrder.getPromotionalGiftsCount() > 0) {
+                    onlinePay = false;
+                }
             }
+
             // 用余额不能线上支付
             if (newOrder.getBalancePayFee() != null && newOrder.getBalancePayFee() > 0) {
                 onlinePay = false;

+ 3 - 0
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -282,6 +282,9 @@
             <if test="productCategory == 2">
                 and p.productCategory=2
             </if>
+            <if test="productCategory == null || productCategory == 1">
+                and p.productCategory=1
+            </if>
             AND co.delFlag = 0
         </where>
         <choose>

+ 3 - 2
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -499,11 +499,12 @@
         #{productDetail},
         #{announType},
         #{newProductType},
-        #{showFlag},
+
         #{qualificationNo},
         #{productName},
         #{qualificationTime},
-        #{qualificationLink})
+        #{qualificationLink},
+        #{showFlag})
     </insert>
 
     <update id="update">

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp

@@ -52,15 +52,15 @@
     <shiro:hasPermission name="order:order:view">
         <li class="active"><a href="${ctx}/order/orderList">订单列表</a></li>
     </shiro:hasPermission>
-    <shiro:hasPermission name="order:order:secondhandOrder">
-        <li><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
-    </shiro:hasPermission>
     <shiro:hasPermission name="order:order:form">
         <li><a href="${ctx}/order/form">添加订单</a></li>
     </shiro:hasPermission>
     <shiro:hasPermission name="order:order:postageOrderForm">
         <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
     </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondhandOrder">
+        <li><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
+    </shiro:hasPermission>
     <shiro:hasPermission name="order:order:secondeProductOrderForm">
         <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
     </shiro:hasPermission>

+ 14 - 3
src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

@@ -382,12 +382,23 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/orderList">订单列表</a></li>
+
     <li class="active"><a href="${ctx}/order/detail?id=${order.orderID}">订单详情</a></li>
-    <shiro:hasPermission name="order:order:edit">
+    <shiro:hasPermission name="order:order:view">
+        <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:form">
+        <li><a href="${ctx}/order/form">添加订单</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:postageOrderForm">
         <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
     </shiro:hasPermission>
-    <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
+    <shiro:hasPermission name="order:order:secondhandOrder">
+        <li><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondeProductOrderForm">
+        <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
+    </shiro:hasPermission>
 </ul>
 <sys:message content="${message}"/>
 <table class="order-details-heading">

+ 15 - 4
src/main/webapp/WEB-INF/views/modules/order/orderForm.jsp

@@ -144,10 +144,21 @@
 <input type="hidden" id="promotionsIds" value="">
 <input type="hidden" id="orderStatus" value="${empty order.orderID?0:order.status}">
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/orderList">订单列表</a></li>
-    <li class="active"><a href="${ctx}/order/form?id=${order.orderID}">${empty order.orderID?'添加':'编辑'}订单</a></li>
-    <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
-    <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
+    <shiro:hasPermission name="order:order:view">
+        <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:form">
+        <li class="active"><a href="${ctx}/order/form">添加订单</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:postageOrderForm">
+        <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondhandOrder">
+        <li><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondeProductOrderForm">
+        <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
+    </shiro:hasPermission>
 </ul>
 <br/>
 <form:form id="inputForm" modelAttribute="newOrder"

+ 15 - 5
src/main/webapp/WEB-INF/views/modules/order/postageOrderForm.jsp

@@ -97,11 +97,21 @@
 <input type="hidden" id="product_index" value="${fn:length(order.orderProduct)}">
 <input type="hidden" id="ctx" value="${ctx}">
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/orderList">订单列表</a></li>
-    <li><a
-            href="${ctx}/order/form?id=${order.orderID}">${empty order.orderID?'添加':'编辑'}订单</a></li>
-    <li class="active"><a href="${ctx}/order/postageOrderForm">${empty order.orderID?'添加':'编辑'}运费订单</a></li>
-    <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
+    <shiro:hasPermission name="order:order:view">
+        <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:form">
+        <li><a href="${ctx}/order/form">添加订单</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:postageOrderForm">
+        <li class="active"><a href="${ctx}/order/postageOrderForm">${empty order.orderID?'添加':'编辑'}运费订单</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondhandOrder">
+        <li><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondeProductOrderForm">
+        <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
+    </shiro:hasPermission>
 </ul>
 <br/>
 <form:form id="inputForm" modelAttribute="newOrder" action="${ctx}/order/postageOrderSave" method="post"

+ 16 - 4
src/main/webapp/WEB-INF/views/modules/order/secondProductOrderForm.jsp

@@ -180,10 +180,22 @@
 <input type="hidden" id="ctx" value="${ctx}">
 <input type="hidden" id="orderStatus" value="${empty order.orderID?0:order.status}">
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/orderList">订单列表</a></li>
-    <li><a href="${ctx}/order/form?id=${order.orderID}">添加订单</a></li>
-    <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
-    <li class="active"><a href="${ctx}/order/secondeProductOrderForm?id=${order.orderID}">${empty order.orderID?'添加':'编辑'}二手订单</a></li>
+    <shiro:hasPermission name="order:order:view">
+        <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:form">
+        <li><a href="${ctx}/order/form">添加订单</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:postageOrderForm">
+        <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondhandOrder">
+        <li><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondeProductOrderForm">
+        <li class="active"><a href="${ctx}/order/secondeProductOrderForm?id=${order.orderID}">${empty order.orderID?'添加':'编辑'}二手订单</a></li>
+    </shiro:hasPermission>
+
 </ul>
 <br/>
 <form:form id="inputForm" modelAttribute="newOrder" action="${ctx}${order.status eq 0 || empty order.orderID ? '/order/save' :'/order/balanceDeduction'}" method="post"

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/order/secondhandOrderList.jsp

@@ -51,9 +51,6 @@
 <ul class="nav nav-tabs">
 <shiro:hasPermission name="order:order:view">
     <li><a href="${ctx}/order/orderList">订单列表</a></li>
-</shiro:hasPermission>
-<shiro:hasPermission name="order:order:secondhandOrder">
-    <li class="active"><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
 </shiro:hasPermission>
     <shiro:hasPermission name="order:order:form">
         <li><a href="${ctx}/order/form">添加订单</a></li>
@@ -61,6 +58,9 @@
 <shiro:hasPermission name="order:order:postageOrderForm">
         <li><a href="${ctx}/order/postageOrderForm">添加运费订单</a></li>
 </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondhandOrder">
+        <li class="active"><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
+    </shiro:hasPermission>
 <shiro:hasPermission name="order:order:secondeProductOrderForm">
         <li><a href="${ctx}/order/secondeProductOrderForm">添加二手订单</a></li>
 </shiro:hasPermission>