kaick 1 год назад
Родитель
Сommit
5a717ecc5d

+ 2 - 45
src/main/java/com/caimei/modules/bulkpurchase/web/CmRefundsProductController.java

@@ -224,27 +224,7 @@ public class CmRefundsProductController extends BaseController {
             if (cmDiscernReceipt != null && "1".equals(cmDiscernReceipt.getPayWay()) && "1".equals(status)) {
                 returnOnline = true;
             }
-            //联合丽格运费
-            String PostageInfo = null;
-            // 拼接运费信息--联合丽格
-            boolean isColdChina = newOrder.getNewShopOrders().stream().map(NewShopOrder::getIsColdChina).collect(Collectors.toList()).contains(1);
-            Double ColdChina = Double.valueOf(700);
-
-            if (isColdChina) {
-                if ("-1" == newOrder.getFreePostFlag()) {
-                    // 到付
-                    PostageInfo = "¥" + newOrder.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
-                } else if ("0" == newOrder.getFreePostFlag()) {
-                    // 包邮
-                    PostageInfo = "¥" + newOrder.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
-                } else {
-                    // 有运费
-                    PostageInfo = "¥" + newOrder.getFreight() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + MathUtil.sub(newOrder.getFreight(), ColdChina)+ ")";
-                }
-            } else {
-                PostageInfo = newOrder.getFreePostFlag() == "-1" ? "到付" : newOrder.getFreePostFlag() == "0" ? "包邮" : "¥" + newOrder.getFreight();
-            }
-            model.addAttribute("postageInfo", PostageInfo);
+
             Integer lastReceiptDetailId = cmDiscernReceiptDao.findOrderLastReceiptDetailId(newOrder.getOrderID().toString());
             model.addAttribute("lastReceiptDetailId", lastReceiptDetailId);
             model.addAttribute("isPromotions", isPromotions);
@@ -607,30 +587,7 @@ public class CmRefundsProductController extends BaseController {
             bpClause.setEnabledStatus("1");
             List<BpClause> bpClauses = bpClauseService.findList(bpClause);
             Integer lastReceiptDetailId = cmDiscernReceiptDao.findOrderLastReceiptDetailId(newOrder.getOrderID().toString());
-            //联合丽格运费
-            for (NewShopOrder newShopOrder : newOrder.getNewShopOrders()) {
-                Double coldChina = Double.valueOf(700);
-                String postageInfo = null;
-
-                if (newShopOrder.getIsColdChina() == 1) {
-                    if ("-1" == newOrder.getFreePostFlag()) {
-                        // 到付
-                        postageInfo = "¥" + newShopOrder.getFreePostageFee() + "(" + (newShopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + coldChina + "," : "") + "其他: 到付)";
-                    } else if ("0" == newOrder.getFreePostFlag()) {
-                        // 包邮
-                        postageInfo = "¥" + newShopOrder.getFreePostageFee() + "(" + (newShopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + coldChina + "," : "") + "其他: 包邮)";
-                    } else {
-                        // 有运费
-                        postageInfo = "¥" + newShopOrder.getShopPostFee() + "(" + (newShopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + coldChina + "," : "") + "其他: ¥" + MathUtil.sub(newOrder.getFreight(), coldChina) + ")";
-                    }
-                } else {
-                    postageInfo = newOrder.getFreePostFlag() == "-1" ? "到付" : newOrder.getFreePostFlag() == "0" ? "包邮" : "¥" + newShopOrder.getShopPostFee();
-                }
-                newShopOrder.setPostageInfo(postageInfo);
-                //支付凭证
-//            Integer orderID = order.getOrderID() == null ? 0: order.getOrderID();
-//            List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(order.getOrderID());
-            }
+
             model.addAttribute("lastReceiptDetailId", lastReceiptDetailId);
             model.addAttribute("from", from);
             model.addAttribute("bpClauses", bpClauses);

+ 1 - 1
src/main/java/com/caimei/modules/landing/web/CmBrandLandingController.java

@@ -217,4 +217,4 @@ public class CmBrandLandingController extends BaseController {
             generateUtils.generateHome();
         }
     }
-}
+}

+ 23 - 0
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -77,6 +77,8 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     @Resource
     private NewShopOrderDao newShopOrderDao;
     @Resource
+    private NewOrderService newOrderService;
+    @Resource
     private NewCmClubDao newCmClubDao;
     @Resource
     private LogisticsBatchDao logisticsBatchDao;
@@ -1297,6 +1299,27 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
             }
             if (CollectionUtils.isNotEmpty(shopOrders)) {
                 for (NewShopOrder shopOrder : shopOrders) {
+                    Double ColdChina = Double.valueOf(700);
+                    String PostageInfo = null;
+                    if (null!=shopOrder.getIsColdChina()&&shopOrder.getIsColdChina()==1) {
+                        if ("-1" == shopOrder.getShopPostFlag()) {
+                            // 到付
+                            PostageInfo = "¥" + ColdChina + "(" + (shopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
+                        } else if ("0" == shopOrder.getShopPostFlag()) {
+                            // 包邮
+                            PostageInfo = "¥" + ColdChina+ "(" + (shopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
+                        } else {
+                            // 有运费
+                            PostageInfo = "¥" + MathUtil.add(shopOrder.getShopPostFee(), ColdChina) + "(" + (shopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + shopOrder.getShopPostFee()+ ")";
+                        }
+                    } else {
+                        PostageInfo = shopOrder.getShopPostFlag() == "-1" ? "到付" : shopOrder.getShopPostFlag() == "0" ? "包邮" : "¥" + shopOrder.getShopPostFee();
+                    }
+
+                    //支付凭证
+                    List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(shopOrder.getShopOrderID() );
+                    shopOrder.setPostageInfo(PostageInfo);
+                    shopOrder.setVoucherVo(voucherVo);
                     List<String> code = newShopOrderDao.findCommercialCode(shopOrder.getOrderID());
                     for (String str : code) {
                         if ("E1807059160".equals(str)) {

+ 0 - 21
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -1288,27 +1288,6 @@ public class NewOrderController extends BaseController {
             if (newShopOrder.getShopID() != 998) {
                 count++;
             }
-            Double ColdChina = Double.valueOf(700);
-            String PostageInfo = null;
-            if (null!=newShopOrder.getIsColdChina()&&newShopOrder.getIsColdChina()==1) {
-                if ("-1" == newShopOrder.getShopPostFlag()) {
-                    // 到付
-                    PostageInfo = "¥" + ColdChina + "(" + (newShopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
-                } else if ("0" == newShopOrder.getShopPostFlag()) {
-                    // 包邮
-                    PostageInfo = "¥" + ColdChina+ "(" + (newShopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
-                } else {
-                    // 有运费
-                    PostageInfo = "¥" + MathUtil.add(newShopOrder.getShopPostFee(), ColdChina) + "(" + (newShopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + newShopOrder.getShopPostFee()+ ")";
-                }
-            } else {
-                PostageInfo = newShopOrder.getShopPostFlag() == "-1" ? "到付" : newShopOrder.getShopPostFlag() == "0" ? "包邮" : "¥" + newShopOrder.getShopPostFee();
-            }
-
-            //支付凭证
-            List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(newShopOrder.getShopOrderID() );
-            newShopOrder.setPostageInfo(PostageInfo);
-            newShopOrder.setVoucherVo(voucherVo);
         }
         if (order.getProductCount() <= count) {
             order.setSplitFlag("0");

+ 6 - 6
src/main/resources/config/dev/caimei.properties

@@ -12,14 +12,14 @@
 #mysql database setting
 jdbc.type=mysql
 jdbc.driver=com.mysql.cj.jdbc.Driver
-jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
-jdbc.username=developer
-jdbc.password=J5p3tgOVazNl4ydf
+#jdbc.url=jdbc:mysql://120.79.25.27:3306/caimei?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+#jdbc.username=developer
+#jdbc.password=J5p3tgOVazNl4ydf
 
 
-#jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
-#jdbc.username=developer
-#jdbc.password=05bZ/OxTB:X+yd%1
+jdbc.url=jdbc:mysql://192.168.2.100:3306/caimei?characterEncoding=UTF8&serverTimezone=Asia/Shanghai
+jdbc.username=developer
+jdbc.password=05bZ/OxTB:X+yd%1
 
 #jdbc.url=jdbc:mysql://119.29.0.46:3306/caimei?useUnicode=true&characterEncoding=utf-8
 #jdbc.username=root

+ 3 - 3
src/main/resources/mappings/modules/landing/CmBrandLandingMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.landing.mapper.CmBrandLandingMapper">
-    
+
     <resultMap type="CmBrandLanding" id="CmBrandLandingResult">
         <result property="id"    column="id"    />
         <result property="authUserId"    column="authUserId"    />
@@ -162,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCmBrandLandingByIds" parameterType="String">
-        delete from cm_brand_landing where id in 
+        delete from cm_brand_landing where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -170,4 +170,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
 
-</mapper>
+</mapper>

+ 33 - 10
src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

@@ -251,7 +251,7 @@
             width: 125px;
             position: absolute;
             left: 816px;
-            top: 30px;
+            top: 65px;
             padding: 10px;
             border: 1px solid #666;
             -webkit-border-radius: 5px;
@@ -388,18 +388,18 @@
     <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: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>
+<%--    <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">
@@ -872,6 +872,29 @@
             </span>
         <span>待收金额:<fmt:formatNumber value="${shopOrder.restAmount}" type="currency"/></span>
         <br/>
+        <span>子订单状态:
+
+<%--            订单状态 0:待确认 1:已确认 2:交易完成 3:订单完成 4:已关闭 5:交易全退--%>
+                            <c:if test="${shopOrder.status == 0}">
+                                <font color="red">待确认</font>
+                            </c:if>
+                            <c:if test="${shopOrder.status == 1}">
+                                <font color="red">已确认</font>
+                            </c:if>
+                            <c:if test="${shopOrder.status == 2}">
+                                <font color="red">交易完成</font>
+                            </c:if>
+                            <c:if test="${shopOrder.status == 3}">
+                                <font color="red">订单完成</font>
+                            </c:if>
+                            <c:if test="${shopOrder.status == 4}">
+                                <font color="red">已关闭</font>
+                            </c:if>
+                            <c:if test="${shopOrder.status == 5}">
+                                <font color="red">交易全退</font>
+                            </c:if>
+
+                        </span>
         <span>收款状态:
                             <c:if test="${shopOrder.shopReceiptStatus == 1}">
                                 <font color="red">待收款</font>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -825,14 +825,14 @@
             </td>
         </tr>
         <tr>
-            <td colspan="2" style="vertical-align: top;">
-                <div class="detailInfoEditor" style="width: 620px;">
+            <td colspan="2" style="vertical-align: top;style="width: 620px;"">
+                <div class="detailInfoEditor" >
                     <form:textarea path="detailInfo" htmlEscape="false" class="input-xlarge required hide"/>
                     <!-- 富文本编辑器 -->
                     <div id="detailInfoEditor">${product.detailInfo}</div>
                 </div>
             </td>
-            <td colspan="3" style="vertical-align: top;">
+            <td colspan="3" style="text-align:center;style="width: 620px;"">
                 <div class="detailInfoEditor" style="width: 620px;">
                     <form:textarea path="commonDetailInfo" htmlEscape="false" class="input-xlarge required hide"/>
                     <!-- 富文本编辑器 -->

+ 6 - 6
src/main/webapp/WEB-INF/views/modules/product-new/productList.jsp

@@ -465,12 +465,12 @@
                               value="0">已删除</label>
                 <label><input type="checkbox" name="searchValidFlag" id="validCheck" onchange="checkValid()">所有</label>
             </div>
-            <div class="item">
-                <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" style="margin-left:20px;"/>
-                &nbsp;&nbsp;&nbsp;&nbsp;<input class="btn btn-primary"
-                                               onclick="window.location='${ctx}/product/new/productEdit?shopType=2'"
-                                               value="发布特殊供应商商品"/>
-            </div>
+<%--            <div class="item">--%>
+<%--                <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" style="margin-left:20px;"/>--%>
+<%--                &nbsp;&nbsp;&nbsp;&nbsp;<input class="btn btn-primary"--%>
+<%--                                               onclick="window.location='${ctx}/product/new/productEdit?shopType=2'"--%>
+<%--                                               value="发布特殊供应商商品"/>--%>
+<%--            </div>--%>
                 <%--<div class="item">
                     <input type="button" class="btn btn-primary" value="更新所有商品索引" onclick="updateAllIndex()"  style="margin-left:20px;"/>
                 </div>--%>

+ 10 - 1
src/test/java/com/caimei/info/InfoTest.java

@@ -2,6 +2,8 @@ package com.caimei.info;
 
 import com.caimei.modules.coupon.dao.CmCouponVipDao;
 import com.caimei.modules.coupon.entity.CmVipCoupon;
+import com.caimei.modules.landing.domain.CmBrandLanding;
+import com.caimei.modules.landing.mapper.CmBrandLandingMapper;
 import com.caimei.modules.product.dao.CmOrganizeProductInfoMapper;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -27,12 +29,19 @@ public class InfoTest extends SpringTransactionalContextTests {
 	@Autowired
 	private InfoService infoService;
 
+	@Autowired
+	private CmBrandLandingMapper cmBrandLandingMapper;
+
 	@Autowired
 	private CmCouponVipDao dao;
 
 	@Test
 	public void test(){
-		cmOrganizeProductInfoMapper.getCmOrganizeProductInfoList(null);
+		CmBrandLanding cmBrandLanding = new CmBrandLanding();
+//		cmBrandLanding.setType("not=1,2");
+
+		cmBrandLandingMapper.selectCmBrandLandingList(cmBrandLanding);
+//		cmOrganizeProductInfoMapper.getCmOrganizeProductInfoList(null);
 //		String str = "/pages/goods/goods-classify?classType=2&id=1038&title=%E7%8E%BB%E5%B0%BF%E9%85%B8%EF%BC%88%E5%B0%8F%E5%88%86%E5%AD%90%EF%BC%89";
 //		String decode="";
 //		try {