소스 검색

颜选商城V1.0.3

kaick 1 년 전
부모
커밋
162b894037

+ 8 - 1
src/main/java/com/caimei/modules/hehe/dao/CmHeheProductDao.java

@@ -41,6 +41,13 @@ public interface CmHeheProductDao extends CrudDao<CmHeheProduct> {
      */
     void deleteActivityProduct(Integer productId);
 
+    /**
+     * 删除活动商品sku
+     *
+     * @param productId
+     */
+    void deleteCmHeHeSku(Integer productId);
+
     /**
      *
      * @param product
@@ -89,4 +96,4 @@ public interface CmHeheProductDao extends CrudDao<CmHeheProduct> {
     void updateHeHeSkuPrice(@Param("skuId") Integer skuId, @Param("price") Double price);
 
     List<CmLadderPrice> findLadderList(Integer skuId);
-}
+}

+ 2 - 0
src/main/java/com/caimei/modules/hehe/service/CmHeheProductService.java

@@ -99,6 +99,8 @@ public class CmHeheProductService extends CrudService<CmHeheProductDao, CmHehePr
         super.delete(cmHeheProduct);
         //删除活动商品
         cmHeheProductDao.deleteActivityProduct(cmHeheProduct.getProductId());
+        //删除活动商品sku
+        cmHeheProductDao.deleteCmHeHeSku(cmHeheProduct.getProductId());
         //删除分销者活动商品
         activityProductDao.deleteUserActivity(cmHeheProduct.getProductId());
         //删除活动阶梯

+ 6 - 6
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -78,8 +78,8 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private NewOrder order;
     private List<NewOrderProduct> newOrderProducts;
     private Double preferential; //订单商品的总优惠
-    private int orderSubmitType;
-    private int orderType;             // 订单类型
+    private Integer orderSubmitType;
+    private Integer orderType;             // 订单类型
     private String orderTime;//下单时间
     private Integer presentNum;//赠品数量
     private Integer outStoreNum;//已经发货的商品数量
@@ -694,11 +694,11 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
         this.orderID = orderID;
     }
 
-    public int getOrderType() {
+    public Integer getOrderType() {
         return orderType;
     }
 
-    public void setOrderType(int orderType) {
+    public void setOrderType(Integer orderType) {
         this.orderType = orderType;
     }
 
@@ -807,11 +807,11 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
         this.preferential = preferential;
     }
 
-    public int getOrderSubmitType() {
+    public Integer getOrderSubmitType() {
         return orderSubmitType;
     }
 
-    public void setOrderSubmitType(int orderSubmitType) {
+    public void setOrderSubmitType(Integer orderSubmitType) {
         this.orderSubmitType = orderSubmitType;
     }
 

+ 12 - 121
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -79,7 +79,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     @Resource
     private NewShopOrderDao newShopOrderDao;
     @Resource
-    private NewOrderService newOrderService;
+    private NewShopOrderService newShopOrderService;
     @Resource
     private NewCmClubDao newCmClubDao;
     @Resource
@@ -1246,7 +1246,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     }
 
     @Override
-    public NewOrder get(String id) { //采美和颜选商城使用同一逻辑
+    public NewOrder get(String id) {
         NewOrder newOrder = super.get(id);
         CmUser user = cmUserDao.get(newOrder.getUserID().toString());
         if (user != null) {
@@ -1302,137 +1302,28 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
             BigDecimal payTotalFee=new BigDecimal(0);
             if (CollectionUtils.isNotEmpty(shopOrders)) {
                 for (NewShopOrder shopOrder : shopOrders) {
-                     payTotalFee = MathUtil.add(payTotalFee,shopOrder.getRealPay() != null ? shopOrder.getRealPay() : shopOrder.getNeedPayAmount());
-
-                    BigDecimal add = MathUtil.add(shopOrder.getReceiptAmount(),cmDiscernReceiptService.findShoOrderIDReceipt(shopOrder.getShopOrderID()));
-                    shopOrder.setReceiptAmount(add.doubleValue());
-                    BigDecimal sub = MathUtil.sub((shopOrder.getRealPay() != null ? shopOrder.getRealPay() : shopOrder.getNeedPayAmount()).doubleValue()
-                            , shopOrder.getReceiptAmount().doubleValue());
-                    shopOrder.setRestAmount(sub.doubleValue());
-
-                    if (1 == shopOrder.getStatus()) {
-                        if ("1".equals(shopOrder.getReceiptStatus()) && "1".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(11);
-                        } else if ("1".equals(shopOrder.getReceiptStatus()) && "2".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(12);
-                        } else if ("1".equals(shopOrder.getReceiptStatus()) && "3".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(13);
-                        } else if ("2".equals(shopOrder.getReceiptStatus()) && "1".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(21);
-                        } else if ("2".equals(shopOrder.getReceiptStatus()) && "2".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(22);
-                        } else if ("2".equals(shopOrder.getReceiptStatus()) && "3".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(23);
-                        } else if ("3".equals(shopOrder.getReceiptStatus()) && "1".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(31);
-                        } else if ("3".equals(shopOrder.getReceiptStatus()) && "2".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(32);
-                        } else if ("3".equals(shopOrder.getReceiptStatus()) && "3".equals(shopOrder.getSendOutStatus())) {
-                            shopOrder.setStatus(33);
-                        }
-                    }
-                    //拼接运费
-                    Double ColdChina = Double.valueOf(700);
-                    String shopPostFlag = shopOrder.getShopPostFlag()!=null?shopOrder.getShopPostFlag():"-2";
-                    String PostageInfo = null;
-                    if (null != shopOrder.getIsColdChina() && shopOrder.getIsColdChina() == 1) {
-                        if ("2" == 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 = shopPostFlag.equals("2") ? "到付" : shopPostFlag.equals("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)) {
-                            shopOrder.setCommercialCode("E1807059160");
-                        }
-                    }
-                    List<NewOrderProduct> pList = newOrderProductDao.findListByShopOrderID(shopOrder.getShopOrderID());
-                    pList.forEach(orderProduct -> {
+                    //累加子订单总金额
+                    payTotalFee = MathUtil.add(payTotalFee, shopOrder.getRealPay() != null ? shopOrder.getRealPay() : shopOrder.getNeedPayAmount());
+                    //子订单初始化
+                    newShopOrderService.initCmShopOrder(shopOrder);
+                    shopOrder.getNewOrderProducts().forEach(orderProduct->{
+                        //是否二手订单
                         if ("2".equals(orderProduct.getProductCategory())) {
                             newOrder.setSecondHandOrderFlag("1");
                         }
-                        if (orderProduct.getLadderPriceFlag() == 1) {
-                            // 查询订单商品阶梯价格
-                            List<OrderProductLadderPrice> ladderPriceList = newOrderProductDao.findladderPriceList(orderProduct.getOrderProductID());
-                            if (null != ladderPriceList && ladderPriceList.size() > 0) {
-                                IntStream.range(0, ladderPriceList.size()).forEach(i -> {
-                                    if (i == ladderPriceList.size() - 1) {
-                                        ladderPriceList.get(i).setBuyNumRangeShow("≥" + ladderPriceList.get(i).getBuyNum());
-                                    } else {
-                                        String buyNumRangeShow = ladderPriceList.get(i).getBuyNum() + "~" + (ladderPriceList.get(i + 1).getBuyNum() - 1);
-                                        ladderPriceList.get(i).setBuyNumRangeShow(buyNumRangeShow);
-                                    }
-                                });
-                                orderProduct.setOrderProductLadderPriceList(ladderPriceList);
-                            }
-                        }
                         //充值定金商品
                         if (6060 == orderProduct.getProductID()) {
                             newOrder.setRechargeGoods(1);
                         }
-                        // 设置超级会员税费优惠
-                        if (null != orderProduct.getSvipPriceFlag() && orderProduct.getSvipPriceFlag() == 1 && "0".equals(orderProduct.getIncludedTax()) && ("1".equals(orderProduct.getInvoiceType()) || "2".equals(orderProduct.getInvoiceType()))) {
-                            orderProduct.setSvipTaxReduction(orderProduct.getSvipReduction() - (orderProduct.getPrice() - orderProduct.getDiscountPrice()));
-                        } else {
-                            orderProduct.setSvipTaxReduction(0d);
-                        }
-                        // sku信息
-                        List<CmSku> skuList = productDao.findSkuList(orderProduct.getProductID());
-                        orderProduct.setSkuList(skuList);
                     });
-                    list.addAll(pList);
-                    shopOrder.setNewOrderProducts(pList);
-                    if (pList.stream().anyMatch(p -> p.getProductID().intValue() == 999))
-                        shopOrder.setPostFeeCos("1");
-                    pList.stream().forEach(item -> {
-                        if (NewOrderStatus.hasReturn(newOrder.getStatus())) {
-                            Integer returningNum = newOrderProductDao.getReturningNum(item.getOrderProductID());
-                            Integer returnedNum = newOrderProductDao.getReturnedNum(item.getOrderProductID());
-                            item.setReturningNum(returningNum);
-                            item.setReturnedNum(returnedNum);
-                        }
-                        /**确认收货信息*/
-                        if (NewOrderStatus.hasReceived(newOrder.getStatus())) {
-                            Integer receivedNum = newOrderProductDao.getReceivedNum(item.getOrderProductID());
-                            item.setReceivedNum(receivedNum);
-                        }
-                        String domain = SysConfig.getStringConfig("crm.server.domain");
-                        item.setProductImage(AppUtils.getProductImageURL(item.getProductImage(), AppKeys.ORIGINAL_PICTURE, domain));
-                        if (item != null && item.getOrderPromotionsId() != null && item.getOrderPromotionsId() > 0) {
-                            item.setProductPromotion(cmPromotionDao.findOrderPromotions(item.getOrderPromotionsId()));
-                        }
-                    });
-                    Double payed = cmPayShopRecordDao.sumByShopOrderID(shopOrder.getShopOrderID());
-                    shopOrder.setPayed(payed);
-                    //查询是否存在店铺促销活动
-                    CmPromotion shopPromotion = null;
-                    if (shopOrder.getOrderPromotionsId() != null && shopOrder.getOrderPromotionsId() > 0) {
-                        shopPromotion = cmPromotionDao.findOrderPromotions(shopOrder.getOrderPromotionsId());
-                        shopOrder.setShopPromotion(shopPromotion);
-                    }
-                    CmSecondHandDetail cmSecondHandDetail = cmSecondHandDetailDao.selectContactDockingPeople(shopOrder.getShopOrderNo());
-                    if (null != cmSecondHandDetail) {
-                        shopOrder.setContactName(cmSecondHandDetail.getContactName());
-                        shopOrder.setDockingPeopleName(cmSecondHandDetail.getDockingPeopleName());
-                    }
+                    //订单商品信息
+                    list.addAll(shopOrder.getNewOrderProducts());
                 }
                 newOrder.setNewShopOrders(shopOrders);
             }
+            //主订单总金额
             newOrder.setPayTotalFee(payTotalFee.doubleValue());
+
             if (CollectionUtils.isNotEmpty(list)) {
                 newOrder.setOrderProduct(list);
                 double freight = 0D;

+ 209 - 32
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -2,19 +2,34 @@ package com.caimei.modules.order.service;
 
 
 import com.caimei.modules.bulkpurchase.entity.BpOrderUserinfo;
+import com.caimei.modules.bulkpurchase.entity.OrderInvoice;
+import com.caimei.modules.coupon.entity.CmCouponOrderRecord;
 import com.caimei.modules.hehe.dao.HeHeNewOrderDao;
+import com.caimei.modules.hehe.entity.CmHeheCouponOrderRecord;
 import com.caimei.modules.order.dao.*;
 import com.caimei.modules.order.entity.*;
+import com.caimei.modules.order.utils.NewOrderStatus;
 import com.caimei.modules.product.dao.CmPromotionDao;
+import com.caimei.modules.product.dao.CmSecondHandDetailDao;
 import com.caimei.modules.product.dao.ProductDao;
 import com.caimei.modules.product.entity.CmPromotion;
+import com.caimei.modules.product.entity.CmSecondHandDetail;
+import com.caimei.modules.product.entity.CmSku;
+import com.caimei.modules.product.entity.OrderProductLadderPrice;
+import com.caimei.modules.user.entity.CmUser;
+import com.caimei.modules.user.entity.NewCmClub;
 import com.caimei.po.neworder.CmShopOrder;
+import com.caimei.utils.AppKeys;
+import com.caimei.utils.AppUtils;
+import com.caimei.utils.MathUtil;
+import com.caimei.utils.SysConfig;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.modules.sys.entity.User;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
 import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -23,6 +38,7 @@ import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
+import java.util.stream.IntStream;
 
 @Service
 @Transactional(readOnly = true)
@@ -64,6 +80,12 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
     private HeHeNewOrderDao heHeNewOrderDao;
     @Resource
     private CmPayShopDao cmPayShopDao;
+    @Autowired
+    private CmSecondHandDetailDao cmSecondHandDetailDao;
+    @Resource
+    private CmDiscernReceiptService cmDiscernReceiptService;
+    @Resource
+    private NewOrderService newOrderService;
 
     public NewShopOrder findByShopOrderID(Integer shopOrderID) {
         NewShopOrder shopOrder = newShopOrderDao.findByShopOrderID(shopOrderID);
@@ -686,6 +708,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
     public List<Integer> payWay(Integer shoprderID) {
         return newShopOrderDao.payWay(shoprderID);
     }
+
     /**
      * 查询子订单
      *
@@ -693,9 +716,12 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @return 子订单
      */
 
-    public NewShopOrder getCmShopOrderByShopOrderID(String shopOrderID)
-    {
-        return newShopOrderDao.getCmShopOrderByShopOrderID(shopOrderID);
+    public NewShopOrder getCmShopOrderByShopOrderID(String shopOrderID) {
+        NewShopOrder newShopOrder = new NewShopOrder();
+        newShopOrder.setShopOrderID(Integer.valueOf(shopOrderID));
+        NewShopOrder byCmShopOrder = newShopOrderDao.getByCmShopOrder(newShopOrder);
+        initCmShopOrder(byCmShopOrder);
+        return byCmShopOrder;
     }
 
     /**
@@ -705,8 +731,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @return String
      */
 
-    public String getById(NewShopOrder cmShopOrder)
-    {
+    public String getById(NewShopOrder cmShopOrder) {
         return newShopOrderDao.getById(cmShopOrder);
     }
 
@@ -717,8 +742,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @return List<String>
      */
 
-    public List<String> getByIds(NewShopOrder cmShopOrder)
-    {
+    public List<String> getByIds(NewShopOrder cmShopOrder) {
         return newShopOrderDao.getByIds(cmShopOrder);
     }
 
@@ -728,9 +752,10 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param cmShopOrder 子订单
      * @return 子订单
      */
-    public NewShopOrder getByCmShopOrder(NewShopOrder cmShopOrder)
-    {
-        return newShopOrderDao.getByCmShopOrder(cmShopOrder);
+    public NewShopOrder getByCmShopOrder(NewShopOrder cmShopOrder) {
+        NewShopOrder byCmShopOrder = newShopOrderDao.getByCmShopOrder(cmShopOrder);
+        initCmShopOrder(byCmShopOrder);
+        return byCmShopOrder;
     }
 
     /**
@@ -739,18 +764,19 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param cmShopOrder 子订单
      * @return 子订单
      */
-    public List<NewShopOrder> getCmShopOrderList(NewShopOrder cmShopOrder)
-    {
-        return newShopOrderDao.getCmShopOrderList(cmShopOrder);
+    public List<NewShopOrder> getCmShopOrderList(NewShopOrder cmShopOrder) {
+        List<NewShopOrder> cmShopOrderList = newShopOrderDao.getCmShopOrderList(cmShopOrder);
+        initCmShopOrders(cmShopOrderList);
+        return cmShopOrderList;
     }
+
     /**
      * 查询子订单记录总数
      *
      * @param cmShopOrder 子订单
      * @return 子订单
      */
-    public int getCmShopOrderCount(NewShopOrder cmShopOrder)
-    {
+    public int getCmShopOrderCount(NewShopOrder cmShopOrder) {
         return newShopOrderDao.getCmShopOrderCount(cmShopOrder);
     }
 
@@ -760,8 +786,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param cmShopOrder 子订单
      * @return 结果
      */
-    public int addCmShopOrder(NewShopOrder cmShopOrder)
-    {
+    public int addCmShopOrder(NewShopOrder cmShopOrder) {
         cmShopOrder.setCreateDate(new Date());
         return newShopOrderDao.addCmShopOrder(cmShopOrder);
     }
@@ -772,8 +797,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param cmShopOrder 子订单
      * @return 结果
      */
-    public int updateCmShopOrder(NewShopOrder cmShopOrder)
-    {
+    public int updateCmShopOrder(NewShopOrder cmShopOrder) {
         cmShopOrder.setUpdateDate(new Date());
         return newShopOrderDao.updateCmShopOrder(cmShopOrder);
     }
@@ -784,9 +808,8 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param shopOrderIDs 需要删除的子订单主键
      * @return 结果
      */
-    public int delCmShopOrderByShopOrderIDs(String[] shopOrderIDs)
-    {
-        return newShopOrderDao.updateDelCmShopOrderByShopOrderIDs(shopOrderIDs,1);
+    public int delCmShopOrderByShopOrderIDs(String[] shopOrderIDs) {
+        return newShopOrderDao.updateDelCmShopOrderByShopOrderIDs(shopOrderIDs, 1);
         //return newShopOrderDao.delCmShopOrderByShopOrderIDs(shopOrderIDs);
     }
 
@@ -796,8 +819,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param shopOrderID 子订单主键
      * @return 结果
      */
-    public int delCmShopOrderByShopOrderID(Integer shopOrderID)
-    {
+    public int delCmShopOrderByShopOrderID(Integer shopOrderID) {
         NewShopOrder newShopOrder = new NewShopOrder();
         newShopOrder.setShopOrderID(shopOrderID);
         newShopOrder.setDelFlag("1");
@@ -811,10 +833,8 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param cmShopOrderList 子订单列表
      * @return 结果
      */
-    public void batchAddCmShopOrder(List<NewShopOrder> cmShopOrderList)
-    {
-        for (NewShopOrder cmShopOrder : cmShopOrderList)
-        {
+    public void batchAddCmShopOrder(List<NewShopOrder> cmShopOrderList) {
+        for (NewShopOrder cmShopOrder : cmShopOrderList) {
             newShopOrderDao.addCmShopOrder(cmShopOrder);
         }
     }
@@ -825,12 +845,169 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      * @param cmShopOrderList 子订单列表
      * @return 结果
      */
-    public void batchUpdateCmShopOrder(List<NewShopOrder> cmShopOrderList)
-    {
-        for (NewShopOrder cmShopOrder : cmShopOrderList)
-        {
+    public void batchUpdateCmShopOrder(List<NewShopOrder> cmShopOrderList) {
+        for (NewShopOrder cmShopOrder : cmShopOrderList) {
             newShopOrderDao.updateCmShopOrder(cmShopOrder);
         }
     }
 
+    /**
+     * 功能描述: 初始化子订单集合
+     *
+     * @param cmShopOrderList
+     * @return [cmShopOrderList]
+     * @auther: Kaick
+     * @date: 2023/7/25 10:57
+     */
+    public void initCmShopOrders(List<NewShopOrder> cmShopOrderList) {
+        //获取订单商品
+        if (CollectionUtils.isNotEmpty(cmShopOrderList)) {
+            for (NewShopOrder shopOrder : cmShopOrderList) {
+                initCmShopOrder(shopOrder);
+            }
+        }
+        cmShopOrderList.sort((so1, so2) -> {
+            //给子订单排序  邮费排在最后  其余的按shopOrderID  asc
+            if ("1".equals(so1.getPostFeeCos())) return 1;
+            return so1.getShopOrderID() - so2.getShopOrderID();
+        });
+    }
+
+    /**
+     * 功能描述: 初始化子订单
+     *
+     * @param shopOrder
+     * @return [shopOrder]
+     * @auther: Kaick
+     * @date: 2023/7/25 10:56
+     */
+    public void initCmShopOrder(NewShopOrder shopOrder) {
+        //子订单已付金额
+        Double shoOrderIDReceipt = cmDiscernReceiptService.findShoOrderIDReceipt(shopOrder.getShopOrderID());
+        BigDecimal add = MathUtil.add(shopOrder.getReceiptAmount(), shoOrderIDReceipt != null ? shoOrderIDReceipt : 0);
+        shopOrder.setReceiptAmount(add.doubleValue());
+        //子订单待付金额
+        BigDecimal sub = MathUtil.sub((shopOrder.getRealPay() != null ? shopOrder.getRealPay() : shopOrder.getNeedPayAmount()).doubleValue()
+                , shopOrder.getReceiptAmount().doubleValue());
+        shopOrder.setRestAmount(sub.doubleValue());
+        if (1 == shopOrder.getStatus()) {
+            if ("1".equals(shopOrder.getReceiptStatus()) && "1".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(11);
+            } else if ("1".equals(shopOrder.getReceiptStatus()) && "2".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(12);
+            } else if ("1".equals(shopOrder.getReceiptStatus()) && "3".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(13);
+            } else if ("2".equals(shopOrder.getReceiptStatus()) && "1".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(21);
+            } else if ("2".equals(shopOrder.getReceiptStatus()) && "2".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(22);
+            } else if ("2".equals(shopOrder.getReceiptStatus()) && "3".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(23);
+            } else if ("3".equals(shopOrder.getReceiptStatus()) && "1".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(31);
+            } else if ("3".equals(shopOrder.getReceiptStatus()) && "2".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(32);
+            } else if ("3".equals(shopOrder.getReceiptStatus()) && "3".equals(shopOrder.getSendOutStatus())) {
+                shopOrder.setStatus(33);
+            }
+        }
+        //拼接运费
+        Double ColdChina = Double.valueOf(700);
+        String shopPostFlag = shopOrder.getShopPostFlag() != null ? shopOrder.getShopPostFlag() : "-2";
+        String PostageInfo = null;
+        if (null != shopOrder.getIsColdChina() && shopOrder.getIsColdChina() == 1) {
+            if ("2" == 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 = shopPostFlag.equals("2") ? "到付" : shopPostFlag.equals("0") ? "包邮" : "¥" + shopOrder.getShopPostFee();
+        }
+        shopOrder.setPostageInfo(PostageInfo);
+        //支付凭证
+        List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(shopOrder.getShopOrderID());
+        shopOrder.setVoucherVo(voucherVo);
+        List<String> code = newShopOrderDao.findCommercialCode(shopOrder.getOrderID());
+        for (String str : code) {
+            if ("E1807059160".equals(str)) {
+                shopOrder.setCommercialCode("E1807059160");
+            }
+        }
+        //子订单商品信息
+        List<NewOrderProduct> pList = newOrderProductDao.findListByShopOrderID(shopOrder.getShopOrderID());
+        pList.forEach(orderProduct -> {
+            initCmOrderProduct(orderProduct);
+        });
+        shopOrder.setNewOrderProducts(pList);
+        if (pList.stream().anyMatch(p -> p.getProductID().intValue() == 999)){
+            shopOrder.setPostFeeCos("1");
+        }
+        Double payed = cmPayShopRecordDao.sumByShopOrderID(shopOrder.getShopOrderID());
+        shopOrder.setPayed(payed);
+        //查询是否存在店铺促销活动
+        CmPromotion shopPromotion = null;
+        if (shopOrder.getOrderPromotionsId() != null && shopOrder.getOrderPromotionsId() > 0) {
+            shopPromotion = cmPromotionDao.findOrderPromotions(shopOrder.getOrderPromotionsId());
+            shopOrder.setShopPromotion(shopPromotion);
+        }
+        CmSecondHandDetail cmSecondHandDetail = cmSecondHandDetailDao.selectContactDockingPeople(shopOrder.getShopOrderNo());
+        if (null != cmSecondHandDetail) {
+            shopOrder.setContactName(cmSecondHandDetail.getContactName());
+            shopOrder.setDockingPeopleName(cmSecondHandDetail.getDockingPeopleName());
+        }
+    }
+
+    public void initCmOrderProduct(NewOrderProduct orderProduct) {
+//                        //是否二手订单
+//                        if ("2".equals(orderProduct.getProductCategory())) {
+//                            newOrder.setSecondHandOrderFlag("1");
+//                        }
+//                        //充值定金商品
+//                        if (6060 == orderProduct.getProductID()) {
+//                            newOrder.setRechargeGoods(1);
+//                        }
+        if (orderProduct.getLadderPriceFlag() == 1) {
+            // 查询订单商品阶梯价格
+            List<OrderProductLadderPrice> ladderPriceList = newOrderProductDao.findladderPriceList(orderProduct.getOrderProductID());
+            if (null != ladderPriceList && ladderPriceList.size() > 0) {
+                IntStream.range(0, ladderPriceList.size()).forEach(i -> {
+                    if (i == ladderPriceList.size() - 1) {
+                        ladderPriceList.get(i).setBuyNumRangeShow("≥" + ladderPriceList.get(i).getBuyNum());
+                    } else {
+                        String buyNumRangeShow = ladderPriceList.get(i).getBuyNum() + "~" + (ladderPriceList.get(i + 1).getBuyNum() - 1);
+                        ladderPriceList.get(i).setBuyNumRangeShow(buyNumRangeShow);
+                    }
+                });
+                orderProduct.setOrderProductLadderPriceList(ladderPriceList);
+            }
+        }
+        // 设置超级会员税费优惠
+        if (null != orderProduct.getSvipPriceFlag() && orderProduct.getSvipPriceFlag() == 1 && "0".equals(orderProduct.getIncludedTax()) && ("1".equals(orderProduct.getInvoiceType()) || "2".equals(orderProduct.getInvoiceType()))) {
+            orderProduct.setSvipTaxReduction(orderProduct.getSvipReduction() - (orderProduct.getPrice() - orderProduct.getDiscountPrice()));
+        } else {
+            orderProduct.setSvipTaxReduction(0d);
+        }
+        // sku信息
+        List<CmSku> skuList = productDao.findSkuList(orderProduct.getProductID());
+        orderProduct.setSkuList(skuList);
+        //商品退货信息
+        Integer returningNum = newOrderProductDao.getReturningNum(orderProduct.getOrderProductID());
+        Integer returnedNum = newOrderProductDao.getReturnedNum(orderProduct.getOrderProductID());
+        orderProduct.setReturningNum(returningNum);
+        orderProduct.setReturnedNum(returnedNum);
+        /**确认收货信息*/
+        Integer receivedNum = newOrderProductDao.getReceivedNum(orderProduct.getOrderProductID());
+        orderProduct.setReceivedNum(receivedNum);
+        String domain = SysConfig.getStringConfig("crm.server.domain");
+        orderProduct.setProductImage(AppUtils.getProductImageURL(orderProduct.getProductImage(), AppKeys.ORIGINAL_PICTURE, domain));
+        if (orderProduct != null && orderProduct.getOrderPromotionsId() != null && orderProduct.getOrderPromotionsId() > 0) {
+            orderProduct.setProductPromotion(cmPromotionDao.findOrderPromotions(orderProduct.getOrderPromotionsId()));
+        }
+    }
 }

+ 6 - 0
src/main/resources/mappings/modules/hehe/CmHeheProductMapper.xml

@@ -319,6 +319,12 @@
         WHERE productId = #{productId}
     </update>
 
+
+    <update id="deleteCmHeHeSku">
+        delete from  cm_hehe_sku
+        WHERE productId = #{productId}
+    </update>
+
     <update id="updateProductId">
         update cm_hehe_product
         set oldProductId = #{oldProductId},

+ 2 - 47
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -1635,16 +1635,7 @@
         <where>  cm_order.delFlag = 0
             <if test="orderID != null  and orderID != ''">
                 and cm_order.orderID
-                <if test="orderID.toUpperCase().indexOf('=')==-1">
                     = #{orderID}
-                </if>
-                <if test="orderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="orderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="orderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="orderIDIn" collection="orderID.substring(orderID.toUpperCase().indexOf('=')+1,orderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{orderIDIn}
-                    </foreach>
-                </if>
             </if>
             <if test="orderNo != null  and orderNo != ''"> and cm_order.orderNo = #{orderNo}</if>
             <if test="apiOrganizeOrderId != null  and apiOrganizeOrderId != ''"> and cm_order.apiOrganizeOrderId = #{apiOrganizeOrderId}</if>
@@ -1713,7 +1704,7 @@
             <if test="unionID != null  and unionID != ''"> and cm_order.unionID = #{unionID}</if>
         </where>
         group by cm_order.orderID
-        order by cm_order.createTime desc
+        order by cm_order.orderTime desc
         limit 0,1
     </select>
 
@@ -1723,16 +1714,7 @@
         <where>  cm_order.delFlag = 0
             <if test="orderID != null  and orderID != ''">
                 and cm_order.orderID
-                <if test="orderID.toUpperCase().indexOf('=')==-1">
                     = #{orderID}
-                </if>
-                <if test="orderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="orderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="orderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="orderIDIn" collection="orderID.substring(orderID.toUpperCase().indexOf('=')+1,orderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{orderIDIn}
-                    </foreach>
-                </if>
             </if>
             <if test="orderNo != null  and orderNo != ''"> and cm_order.orderNo = #{orderNo}</if>
             <if test="apiOrganizeOrderId != null  and apiOrganizeOrderId != ''"> and cm_order.apiOrganizeOrderId = #{apiOrganizeOrderId}</if>
@@ -1801,7 +1783,7 @@
             <if test="unionID != null  and unionID != ''"> and cm_order.unionID = #{unionID}</if>
         </where>
         group by cm_order.orderID
-        order by cm_order.createTime desc
+        order by cm_order.orderTime desc
     </select>
     <select id="getCmOrderCount" parameterType="com.caimei.modules.order.entity.NewOrder" resultType="String">
         select count(1)
@@ -1809,16 +1791,7 @@
         <where>  cm_order.delFlag = 0
             <if test="orderID != null  and  orderID != ''">
                 and cm_order.orderID
-                <if test="orderID.toUpperCase().indexOf('=')==-1">
                     = #{orderID}
-                </if>
-                <if test="orderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="orderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="orderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="orderIDIn" collection="orderID.substring(orderID.toUpperCase().indexOf('=')+1,orderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{orderIDIn}
-                    </foreach>
-                </if>
             </if>
             <if test="orderNo != null  and orderNo != ''"> and cm_order.orderNo = #{orderNo}</if>
             <if test="apiOrganizeOrderId != null  and apiOrganizeOrderId != ''"> and cm_order.apiOrganizeOrderId = #{apiOrganizeOrderId}</if>
@@ -1901,16 +1874,7 @@
         <where>  cm_order.delFlag = 0
             <if test="orderID != null  and orderID != ''">
                 and cm_order.orderID
-                <if test="orderID.toUpperCase().indexOf('=')==-1">
                     = #{orderID}
-                </if>
-                <if test="orderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="orderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="orderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="orderIDIn" collection="orderID.substring(orderID.toUpperCase().indexOf('=')+1,orderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{orderIDIn}
-                    </foreach>
-                </if>
             </if>
             <if test="orderNo != null  and orderNo != ''"> and cm_order.orderNo = #{orderNo}</if>
             <if test="apiOrganizeOrderId != null  and apiOrganizeOrderId != ''"> and cm_order.apiOrganizeOrderId = #{apiOrganizeOrderId}</if>
@@ -1986,16 +1950,7 @@
         <where>  cm_order.delFlag = 0
             <if test="orderID != null  and orderID != ''">
                 and cm_order.orderID
-                <if test="orderID.toUpperCase().indexOf('=')==-1">
                     = #{orderID}
-                </if>
-                <if test="orderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="orderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="orderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="orderIDIn" collection="orderID.substring(orderID.toUpperCase().indexOf('=')+1,orderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{orderIDIn}
-                    </foreach>
-                </if>
             </if>
             <if test="orderNo != null  and orderNo != ''"> and cm_order.orderNo = #{orderNo}</if>
             <if test="apiOrganizeOrderId != null  and apiOrganizeOrderId != ''"> and cm_order.apiOrganizeOrderId = #{apiOrganizeOrderId}</if>

+ 87 - 102
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -1344,7 +1344,6 @@
         <result property="paying"    column="paying"    />
         <result property="shopProductAmount"    column="shopProductAmount"    />
         <result property="shopPostFee"    column="shopPostFee"    />
-        <result property="secondHandOrderFlag"    column="secondHandOrderFlag"    />
         <result property="shopPostFlag"    column="shopPostFlag"    />
         <result property="shopTaxFee"    column="shopTaxFee"    />
         <result property="payCmAmount"    column="payCmAmount"    />
@@ -1387,16 +1386,13 @@
             cm_shop_order.outStoreTimes,
             cm_shop_order.townID,
             cm_shop_order.note,
-            cm_shop_order.eachDiscount,
-            cm_shop_order.realPay,
-            cm_shop_order.receiptAmount,
-            cm_shop_order.accountAmount,
-            cm_shop_order.productAmount,
-            cm_shop_order.totalAmount,
-            cm_shop_order.needPayAmount,
-            cm_shop_order.discountAmount,
-            cm_shop_order.preferential,
-            cm_shop_order.promotionFullReduction,
+            ifnull(cm_shop_order.accountAmount,0) AS accountAmount,
+            ifnull(cm_shop_order.productAmount,0) AS productAmount,
+            ifnull(cm_shop_order.totalAmount,0) AS totalAmount,
+            ifnull(cm_shop_order.needPayAmount,0) AS needPayAmount,
+            ifnull(cm_shop_order.discountAmount,0) AS discountAmount,
+            ifnull(cm_shop_order.preferential,0) AS preferential,
+            ifnull(cm_shop_order.promotionFullReduction,0) AS promotionFullReduction,
             cm_shop_order.payFlag,
             cm_shop_order.orderTime,
             cm_shop_order.payTime,
@@ -1404,13 +1400,13 @@
             cm_shop_order.autoOverTimeMills,
             cm_shop_order.settleStatus,
             cm_shop_order.payStatus,
-            cm_shop_order.receiptStatus,
             cm_shop_order.sendOutStatus,
             cm_shop_order.refundStatus,
+            cm_shop_order.shopStatus,
             cm_shop_order.returnGoodsStatus,
             cm_shop_order.receiveGoodsTime,
             cm_shop_order.autoReceiveTimeMills,
-            cm_shop_order.totalAddedValueTax,
+            ifnull(cm_shop_order.totalAddedValueTax,0) AS totalAddedValueTax,
             cm_shop_order.canRefundAmount,
             cm_shop_order.refundAmount,
             cm_shop_order.clubID,
@@ -1422,59 +1418,64 @@
             cm_shop_order.canRefundFlag,
             cm_shop_order.useBalanceFlag,
             cm_shop_order.canRefundBeans,
-            cm_shop_order.freePostageFee,
+            ifnull(cm_shop_order.freePostageFee,0) AS freePostageFee,
             cm_shop_order.freePostageTicketID,
-            cm_shop_order.brokerage,
+            ifnull(cm_shop_order.brokerage,0) AS brokerage,
             cm_shop_order.delFlag,
-            cm_shop_order.refundsAmount,
+            ifnull(cm_shop_order.refundsAmount,0) AS refundsAmount,
             cm_shop_order.orderStatusFlag,
             cm_shop_order.buyStatus,
             cm_shop_order.deliveryTimeMills,
+            cm_shop_order.confirmTime,
+            cm_shop_order.updateTime,
             cm_shop_order.orderDeliveryID,
             cm_shop_order.splitFlag,
-            cm_shop_order.paying,
-            cm_shop_order.shopProductAmount,
-            cm_shop_order.shopPostFee,
-            cm_shop_order.secondHandOrderFlag,
-            cm_shop_order.shopPostFlag,
-            cm_shop_order.shopTaxFee,
-            cm_shop_order.payCmAmount,
-            cm_shop_order.shouldPayShopAmount,
-            cm_shop_order.payedShopAmount,
-            cm_shop_order.shopOtherFee,
             cm_shop_order.receiptedFlag,
             cm_shop_order.receiptedType,
+            cm_shop_order.paying,
+            ifnull(cm_shop_order.shopProductAmount,0) AS shopProductAmount,
+            ifnull(cm_shop_order.shopPostFee,0) AS shopPostFee,
+            cm_shop_order.shopPostFlag,
+            ifnull(cm_shop_order.shopTaxFee,0) AS shopTaxFee,
+            ifnull(cm_shop_order.payCmAmount,0) AS payCmAmount,
+            ifnull(cm_shop_order.shouldPayShopAmount,0) AS shouldPayShopAmount,
+            ifnull(cm_shop_order.payedShopAmount,0) AS payedShopAmount,
+            ifnull(cm_shop_order.shopOtherFee,0) AS shopOtherFee,
             cm_shop_order.costType,
-            cm_shop_order.proportional,
+            ifnull(cm_shop_order.proportional,0) AS proportional,
             cm_shop_order.modifyShouldPayNote,
             cm_shop_order.modifyShouldPayUserID,
             cm_shop_order.modifyShouldPayDate,
             cm_shop_order.zeroCostFlag,
             cm_shop_order.differenceType,
-            cm_shop_order.differencePrice,
-            cm_shop_order.svipShopReduction,
+            ifnull(cm_shop_order.differencePrice,0) AS differencePrice,
+            ifnull(cm_shop_order.svipShopReduction,0) AS svipShopReduction,
+            ifnull(cm_shop_order.shopRefundAmount,0) AS shopRefundAmount,
             cm_shop_order.splitCode,
             cm_shop_order.paySuccessCounter,
             cm_shop_order.onlinePayWays,
-            cm_shop_order.shopStatus
+            cm_shop_order.receiptStatus,
+            ifnull(cm_shop_order.receiptAmount,0) AS receiptAmount,
+            ifnull(cm_shop_order.eachDiscount,0) AS eachDiscount,
+            ifnull(cm_shop_order.realPay,0) AS realPay,
+            cm_shop_order.discountFee,
+            cm_shop_order.fee
     </sql>
 
     <select id="getByCmShopOrder" parameterType="com.caimei.modules.order.entity.NewShopOrder" resultMap="CmShopOrderResult">
         <include refid="selectCmShopOrderVo"/>
         from cm_shop_order AS cm_shop_order
         <where>  cm_shop_order.delFlag = 0
-            <if test="shopOrderID != null  and shopOrderID != ''">
+            <if test="shopOrderID != null  and  shopOrderID != ''">
                 and cm_shop_order.shopOrderID
-                <if test="shopOrderID.toUpperCase().indexOf('=')==-1">
-                    = #{shopOrderID}
-                </if>
-                <if test="shopOrderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="shopOrderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="shopOrderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="shopOrderIDIn" collection="shopOrderID.substring(shopOrderID.toUpperCase().indexOf('=')+1,shopOrderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{shopOrderIDIn}
-                    </foreach>
-                </if>
+                = #{shopOrderID}
+            </if>
+            <if test="shopOrderID.toString().toUpperCase().indexOf('=')!=-1">
+                <if test="shopOrderID.toString().toUpperCase().indexOf('NOT')!=-1"> not </if>
+                <if test="shopOrderID.toString().toUpperCase().indexOf('IN')!=-1"> in </if>
+                <foreach item="shopOrderIDIn" collection="shopOrderID.toString().substring(shopOrderID.toUpperCase().toString().indexOf('=')+1,shopOrderID.toString().length()).trim().split(',')" open="(" separator="," close=")">
+                    #{shopOrderIDIn}
+                </foreach>
             </if>
             <if test="shopOrderNo != null  and shopOrderNo != ''"> and cm_shop_order.shopOrderNo = #{shopOrderNo}</if>
             <if test="orderNo != null  and orderNo != ''"> and cm_shop_order.orderNo = #{orderNo}</if>
@@ -1540,7 +1541,6 @@
             <if test="paying != null  and paying != ''"> and cm_shop_order.paying = #{paying}</if>
             <if test="shopProductAmount != null "> and cm_shop_order.shopProductAmount = #{shopProductAmount}</if>
             <if test="shopPostFee != null "> and cm_shop_order.shopPostFee = #{shopPostFee}</if>
-            <if test="secondHandOrderFlag != null  and secondHandOrderFlag != ''"> and cm_shop_order.secondHandOrderFlag = #{secondHandOrderFlag}</if>
             <if test="shopPostFlag != null  and shopPostFlag != ''"> and cm_shop_order.shopPostFlag = #{shopPostFlag}</if>
             <if test="shopTaxFee != null "> and cm_shop_order.shopTaxFee = #{shopTaxFee}</if>
             <if test="payCmAmount != null "> and cm_shop_order.payCmAmount = #{payCmAmount}</if>
@@ -1561,10 +1561,10 @@
             <if test="splitCode != null  and splitCode != ''"> and cm_shop_order.splitCode = #{splitCode}</if>
             <if test="paySuccessCounter != null "> and cm_shop_order.paySuccessCounter = #{paySuccessCounter}</if>
             <if test="onlinePayWays != null  and onlinePayWays != ''"> and cm_shop_order.onlinePayWays = #{onlinePayWays}</if>
-            <if test="shopStatus != null  and shopStatus != ''"> and cm_shop_order.shopStatus = #{shopStatus}</if>
+            <if test="status != null  and status != ''"> and cm_shop_order.shopStatus = #{status}</if>
         </where>
         group by cm_shop_order.shopOrderID
-        order by cm_shop_order.createTime desc
+        order by cm_shop_order.orderTime desc
         limit 0,1
     </select>
 
@@ -1572,18 +1572,16 @@
         <include refid="selectCmShopOrderVo"/>
         from cm_shop_order AS cm_shop_order
         <where>  cm_shop_order.delFlag = 0
-            <if test="shopOrderID != null  and shopOrderID != ''">
+            <if test="shopOrderID != null  and  shopOrderID != ''">
                 and cm_shop_order.shopOrderID
-                <if test="shopOrderID.toUpperCase().indexOf('=')==-1">
-                    = #{shopOrderID}
-                </if>
-                <if test="shopOrderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="shopOrderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="shopOrderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="shopOrderIDIn" collection="shopOrderID.substring(shopOrderID.toUpperCase().indexOf('=')+1,shopOrderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{shopOrderIDIn}
-                    </foreach>
-                </if>
+                = #{shopOrderID}
+            </if>
+            <if test="shopOrderID.toString().toUpperCase().indexOf('=')!=-1">
+                <if test="shopOrderID.toString().toUpperCase().indexOf('NOT')!=-1"> not </if>
+                <if test="shopOrderID.toString().toUpperCase().indexOf('IN')!=-1"> in </if>
+                <foreach item="shopOrderIDIn" collection="shopOrderID.toString().substring(shopOrderID.toUpperCase().toString().indexOf('=')+1,shopOrderID.toString().length()).trim().split(',')" open="(" separator="," close=")">
+                    #{shopOrderIDIn}
+                </foreach>
             </if>
             <if test="shopOrderNo != null  and shopOrderNo != ''"> and cm_shop_order.shopOrderNo = #{shopOrderNo}</if>
             <if test="orderNo != null  and orderNo != ''"> and cm_shop_order.orderNo = #{orderNo}</if>
@@ -1649,7 +1647,6 @@
             <if test="paying != null  and paying != ''"> and cm_shop_order.paying = #{paying}</if>
             <if test="shopProductAmount != null "> and cm_shop_order.shopProductAmount = #{shopProductAmount}</if>
             <if test="shopPostFee != null "> and cm_shop_order.shopPostFee = #{shopPostFee}</if>
-            <if test="secondHandOrderFlag != null  and secondHandOrderFlag != ''"> and cm_shop_order.secondHandOrderFlag = #{secondHandOrderFlag}</if>
             <if test="shopPostFlag != null  and shopPostFlag != ''"> and cm_shop_order.shopPostFlag = #{shopPostFlag}</if>
             <if test="shopTaxFee != null "> and cm_shop_order.shopTaxFee = #{shopTaxFee}</if>
             <if test="payCmAmount != null "> and cm_shop_order.payCmAmount = #{payCmAmount}</if>
@@ -1670,10 +1667,10 @@
             <if test="splitCode != null  and splitCode != ''"> and cm_shop_order.splitCode = #{splitCode}</if>
             <if test="paySuccessCounter != null "> and cm_shop_order.paySuccessCounter = #{paySuccessCounter}</if>
             <if test="onlinePayWays != null  and onlinePayWays != ''"> and cm_shop_order.onlinePayWays = #{onlinePayWays}</if>
-            <if test="shopStatus != null  and shopStatus != ''"> and cm_shop_order.shopStatus = #{shopStatus}</if>
+            <if test="status != null  and status != ''"> and cm_shop_order.shopStatus = #{status}</if>
         </where>
         group by cm_shop_order.shopOrderID
-        order by cm_shop_order.createTime desc
+        order by cm_shop_order.orderTime desc
     </select>
     <select id="getCmShopOrderCount" parameterType="com.caimei.modules.order.entity.NewShopOrder" resultType="String">
         select count(1)
@@ -1681,16 +1678,14 @@
         <where>  cm_shop_order.delFlag = 0
             <if test="shopOrderID != null  and  shopOrderID != ''">
                 and cm_shop_order.shopOrderID
-                <if test="shopOrderID.toUpperCase().indexOf('=')==-1">
-                    = #{shopOrderID}
-                </if>
-                <if test="shopOrderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="shopOrderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="shopOrderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="shopOrderIDIn" collection="shopOrderID.substring(shopOrderID.toUpperCase().indexOf('=')+1,shopOrderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{shopOrderIDIn}
-                    </foreach>
-                </if>
+                = #{shopOrderID}
+            </if>
+            <if test="shopOrderID.toString().toUpperCase().indexOf('=')!=-1">
+                <if test="shopOrderID.toString().toUpperCase().indexOf('NOT')!=-1"> not </if>
+                <if test="shopOrderID.toString().toUpperCase().indexOf('IN')!=-1"> in </if>
+                <foreach item="shopOrderIDIn" collection="shopOrderID.toString().substring(shopOrderID.toUpperCase().toString().indexOf('=')+1,shopOrderID.toString().length()).trim().split(',')" open="(" separator="," close=")">
+                    #{shopOrderIDIn}
+                </foreach>
             </if>
             <if test="shopOrderNo != null  and shopOrderNo != ''"> and cm_shop_order.shopOrderNo = #{shopOrderNo}</if>
             <if test="orderNo != null  and orderNo != ''"> and cm_shop_order.orderNo = #{orderNo}</if>
@@ -1756,7 +1751,6 @@
             <if test="paying != null  and paying != ''"> and cm_shop_order.paying = #{paying}</if>
             <if test="shopProductAmount != null "> and cm_shop_order.shopProductAmount = #{shopProductAmount}</if>
             <if test="shopPostFee != null "> and cm_shop_order.shopPostFee = #{shopPostFee}</if>
-            <if test="secondHandOrderFlag != null  and secondHandOrderFlag != ''"> and cm_shop_order.secondHandOrderFlag = #{secondHandOrderFlag}</if>
             <if test="shopPostFlag != null  and shopPostFlag != ''"> and cm_shop_order.shopPostFlag = #{shopPostFlag}</if>
             <if test="shopTaxFee != null "> and cm_shop_order.shopTaxFee = #{shopTaxFee}</if>
             <if test="payCmAmount != null "> and cm_shop_order.payCmAmount = #{payCmAmount}</if>
@@ -1777,7 +1771,7 @@
             <if test="splitCode != null  and splitCode != ''"> and cm_shop_order.splitCode = #{splitCode}</if>
             <if test="paySuccessCounter != null "> and cm_shop_order.paySuccessCounter = #{paySuccessCounter}</if>
             <if test="onlinePayWays != null  and onlinePayWays != ''"> and cm_shop_order.onlinePayWays = #{onlinePayWays}</if>
-            <if test="shopStatus != null  and shopStatus != ''"> and cm_shop_order.shopStatus = #{shopStatus}</if>
+            <if test="status != null  and status != ''"> and cm_shop_order.shopStatus = #{status}</if>
         </where>
         group by cm_shop_order.shopOrderID
     </select>
@@ -1792,18 +1786,16 @@
         select shopOrderID
         from cm_shop_order AS cm_shop_order
         <where>  cm_shop_order.delFlag = 0
-            <if test="shopOrderID != null  and shopOrderID != ''">
+            <if test="shopOrderID != null  and  shopOrderID != ''">
                 and cm_shop_order.shopOrderID
-                <if test="shopOrderID.toUpperCase().indexOf('=')==-1">
-                    = #{shopOrderID}
-                </if>
-                <if test="shopOrderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="shopOrderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="shopOrderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="shopOrderIDIn" collection="shopOrderID.substring(shopOrderID.toUpperCase().indexOf('=')+1,shopOrderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{shopOrderIDIn}
-                    </foreach>
-                </if>
+                = #{shopOrderID}
+            </if>
+            <if test="shopOrderID.toString().toUpperCase().indexOf('=')!=-1">
+                <if test="shopOrderID.toString().toUpperCase().indexOf('NOT')!=-1"> not </if>
+                <if test="shopOrderID.toString().toUpperCase().indexOf('IN')!=-1"> in </if>
+                <foreach item="shopOrderIDIn" collection="shopOrderID.toString().substring(shopOrderID.toUpperCase().toString().indexOf('=')+1,shopOrderID.toString().length()).trim().split(',')" open="(" separator="," close=")">
+                    #{shopOrderIDIn}
+                </foreach>
             </if>
             <if test="shopOrderNo != null  and shopOrderNo != ''"> and cm_shop_order.shopOrderNo = #{shopOrderNo}</if>
             <if test="orderNo != null  and orderNo != ''"> and cm_shop_order.orderNo = #{orderNo}</if>
@@ -1869,7 +1861,6 @@
             <if test="paying != null  and paying != ''"> and cm_shop_order.paying = #{paying}</if>
             <if test="shopProductAmount != null "> and cm_shop_order.shopProductAmount = #{shopProductAmount}</if>
             <if test="shopPostFee != null "> and cm_shop_order.shopPostFee = #{shopPostFee}</if>
-            <if test="secondHandOrderFlag != null  and secondHandOrderFlag != ''"> and cm_shop_order.secondHandOrderFlag = #{secondHandOrderFlag}</if>
             <if test="shopPostFlag != null  and shopPostFlag != ''"> and cm_shop_order.shopPostFlag = #{shopPostFlag}</if>
             <if test="shopTaxFee != null "> and cm_shop_order.shopTaxFee = #{shopTaxFee}</if>
             <if test="payCmAmount != null "> and cm_shop_order.payCmAmount = #{payCmAmount}</if>
@@ -1890,7 +1881,7 @@
             <if test="splitCode != null  and splitCode != ''"> and cm_shop_order.splitCode = #{splitCode}</if>
             <if test="paySuccessCounter != null "> and cm_shop_order.paySuccessCounter = #{paySuccessCounter}</if>
             <if test="onlinePayWays != null  and onlinePayWays != ''"> and cm_shop_order.onlinePayWays = #{onlinePayWays}</if>
-            <if test="shopStatus != null  and shopStatus != ''"> and cm_shop_order.shopStatus = #{shopStatus}</if>
+            <if test="status != null  and status != ''"> and cm_shop_order.shopStatus = #{status}</if>
         </where>
         group by cm_shop_order.shopOrderID
     </select>
@@ -1898,18 +1889,16 @@
         select shopOrderID
         from cm_shop_order AS cm_shop_order
         <where>  cm_shop_order.delFlag = 0
-            <if test="shopOrderID != null  and shopOrderID != ''">
+            <if test="shopOrderID != null  and  shopOrderID != ''">
                 and cm_shop_order.shopOrderID
-                <if test="shopOrderID.toUpperCase().indexOf('=')==-1">
-                    = #{shopOrderID}
-                </if>
-                <if test="shopOrderID.toUpperCase().indexOf('=')!=-1">
-                    <if test="shopOrderID.toUpperCase().indexOf('NOT')!=-1"> not </if>
-                    <if test="shopOrderID.toUpperCase().indexOf('IN')!=-1"> in </if>
-                    <foreach item="shopOrderIDIn" collection="shopOrderID.substring(shopOrderID.toUpperCase().indexOf('=')+1,shopOrderID.length()).trim().split(',')" open="(" separator="," close=")">
-                        #{shopOrderIDIn}
-                    </foreach>
-                </if>
+                = #{shopOrderID}
+            </if>
+            <if test="shopOrderID.toString().toUpperCase().indexOf('=')!=-1">
+                <if test="shopOrderID.toString().toUpperCase().indexOf('NOT')!=-1"> not </if>
+                <if test="shopOrderID.toString().toUpperCase().indexOf('IN')!=-1"> in </if>
+                <foreach item="shopOrderIDIn" collection="shopOrderID.toString().substring(shopOrderID.toUpperCase().toString().indexOf('=')+1,shopOrderID.toString().length()).trim().split(',')" open="(" separator="," close=")">
+                    #{shopOrderIDIn}
+                </foreach>
             </if>
             <if test="shopOrderNo != null  and shopOrderNo != ''"> and cm_shop_order.shopOrderNo = #{shopOrderNo}</if>
             <if test="orderNo != null  and orderNo != ''"> and cm_shop_order.orderNo = #{orderNo}</if>
@@ -1975,7 +1964,6 @@
             <if test="paying != null  and paying != ''"> and cm_shop_order.paying = #{paying}</if>
             <if test="shopProductAmount != null "> and cm_shop_order.shopProductAmount = #{shopProductAmount}</if>
             <if test="shopPostFee != null "> and cm_shop_order.shopPostFee = #{shopPostFee}</if>
-            <if test="secondHandOrderFlag != null  and secondHandOrderFlag != ''"> and cm_shop_order.secondHandOrderFlag = #{secondHandOrderFlag}</if>
             <if test="shopPostFlag != null  and shopPostFlag != ''"> and cm_shop_order.shopPostFlag = #{shopPostFlag}</if>
             <if test="shopTaxFee != null "> and cm_shop_order.shopTaxFee = #{shopTaxFee}</if>
             <if test="payCmAmount != null "> and cm_shop_order.payCmAmount = #{payCmAmount}</if>
@@ -1996,7 +1984,7 @@
             <if test="splitCode != null  and splitCode != ''"> and cm_shop_order.splitCode = #{splitCode}</if>
             <if test="paySuccessCounter != null "> and cm_shop_order.paySuccessCounter = #{paySuccessCounter}</if>
             <if test="onlinePayWays != null  and onlinePayWays != ''"> and cm_shop_order.onlinePayWays = #{onlinePayWays}</if>
-            <if test="shopStatus != null  and shopStatus != ''"> and cm_shop_order.shopStatus = #{shopStatus}</if>
+            <if test="status != null  and status != ''"> and cm_shop_order.shopStatus = #{status}</if>
         </where>
         group by cm_shop_order.shopOrderID
         limit 0,1
@@ -2070,7 +2058,6 @@
             <if test="paying != null and paying != ''">paying,</if>
             <if test="shopProductAmount != null">shopProductAmount,</if>
             <if test="shopPostFee != null">shopPostFee,</if>
-            <if test="secondHandOrderFlag != null and secondHandOrderFlag != ''">secondHandOrderFlag,</if>
             <if test="shopPostFlag != null and shopPostFlag != ''">shopPostFlag,</if>
             <if test="shopTaxFee != null">shopTaxFee,</if>
             <if test="payCmAmount != null">payCmAmount,</if>
@@ -2091,7 +2078,7 @@
             <if test="splitCode != null and splitCode != ''">splitCode,</if>
             <if test="paySuccessCounter != null">paySuccessCounter,</if>
             <if test="onlinePayWays != null and onlinePayWays != ''">onlinePayWays,</if>
-            <if test="shopStatus != null and shopStatus != ''">shopStatus,</if>
+            <if test="status != null and status != ''">shopStatus,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="shopOrderID != null and shopOrderID != ''">#{shopOrderID},</if>
@@ -2159,7 +2146,6 @@
             <if test="paying != null and paying != ''">#{paying},</if>
             <if test="shopProductAmount != null">#{shopProductAmount},</if>
             <if test="shopPostFee != null">#{shopPostFee},</if>
-            <if test="secondHandOrderFlag != null and secondHandOrderFlag != ''">#{secondHandOrderFlag},</if>
             <if test="shopPostFlag != null and shopPostFlag != ''">#{shopPostFlag},</if>
             <if test="shopTaxFee != null">#{shopTaxFee},</if>
             <if test="payCmAmount != null">#{payCmAmount},</if>
@@ -2180,7 +2166,7 @@
             <if test="splitCode != null and splitCode != ''">#{splitCode},</if>
             <if test="paySuccessCounter != null">#{paySuccessCounter},</if>
             <if test="onlinePayWays != null and onlinePayWays != ''">#{onlinePayWays},</if>
-            <if test="shopStatus != null and shopStatus != ''">#{shopStatus},</if>
+            <if test="status != null and status != ''">#{status},</if>
         </trim>
     </insert>
 
@@ -2251,7 +2237,6 @@
             <if test="paying != null and paying != ''">paying = #{paying},</if>
             <if test="shopProductAmount != null">shopProductAmount = #{shopProductAmount},</if>
             <if test="shopPostFee != null">shopPostFee = #{shopPostFee},</if>
-            <if test="secondHandOrderFlag != null and secondHandOrderFlag != ''">secondHandOrderFlag = #{secondHandOrderFlag},</if>
             <if test="shopPostFlag != null and shopPostFlag != ''">shopPostFlag = #{shopPostFlag},</if>
             <if test="shopTaxFee != null">shopTaxFee = #{shopTaxFee},</if>
             <if test="payCmAmount != null">payCmAmount = #{payCmAmount},</if>
@@ -2272,7 +2257,7 @@
             <if test="splitCode != null and splitCode != ''">splitCode = #{splitCode},</if>
             <if test="paySuccessCounter != null">paySuccessCounter = #{paySuccessCounter},</if>
             <if test="onlinePayWays != null and onlinePayWays != ''">onlinePayWays = #{onlinePayWays},</if>
-            <if test="shopStatus != null and shopStatus != ''">shopStatus = #{shopStatus},</if>
+            <if test="status != null and status != ''">shopStatus = #{status},</if>
         </trim>
         where shopOrderID = #{shopOrderID}
     </update>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderConfirmReturnRecord.jsp

@@ -125,7 +125,7 @@
 </ul>
 <br/>
 <div class="refund-btn-top">
-    <input type="button" class="btn btn-primary" onclick="window.location.href='${ctx}/order/cmReturnedPurchase/'"
+    <input type="button" class="btn btn-primary" onclick="window.history.go(-1)"
            value="返回">
     <input type="button" class="btn btn-primary print-now" value="打印">
 </div>

+ 6 - 7
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheProductForm.jsp

@@ -308,7 +308,7 @@
     <table id="contentTable" class="table table-striped table-bordered table-condensed" hidden="hidden">
         <thead>
         <tr>
-            <th>图片</th>
+            <th style="text-align:right">图片</th>
             <th>商品名称</th>
             <th>供应商</th>
             <th>操作</th>
@@ -316,7 +316,7 @@
         </thead>
         <tbody>
         <tr>
-            <td><img id="mainImage" src="${cmHeheProduct.mainImage}" width="50px" height="50px"></td>
+            <td style="text-align:right"><img id="mainImage" src="${cmHeheProduct.mainImage}" width="50px" height="50px"></td>
             <td style="text-align: center" id="name">${cmHeheProduct.name}</td>
             <td id="shopName">${cmHeheProduct.shopName}</td>
             <td><a href="javascript:void(0);" onclick="deleteProduct()">删除</a></td>
@@ -334,7 +334,7 @@
             <c:forEach items="${cmHeheProduct.skus}" var="sku" varStatus="index">
                 <div>
                     <input type="number" style="display:none" value="${sku.skuId}" name="skus[${index.index}].skuId">
-                    <label class="control-label" style="text-align:left">
+                    <label class="control-label" style="text-align:right">
                         <font color="red">*</font>规格:${sku.unit}
                     </label>
                     <div class="controls">
@@ -348,7 +348,7 @@
                             <label><font color="red">*</font>成本价:${sku.costPrice}</label>
                         </c:if>
                         <c:if test="${sku.costCheckFlag eq 2}">
-                            <label><font color="red">*</font>${sku.skuId } 比例:供应商${sku.shopPercent}%,集团${sku.organizePercent}%,采美${sku.cmPercent}%</label>
+                            <label><font color="red">*</font>比例:供应商${sku.shopPercent}%,集团${sku.organizePercent}%,采美${sku.cmPercent}%</label>
                         </c:if>
                     </div>
                 </div>
@@ -502,11 +502,10 @@
 
                             for (let i = 0; i < skus.length; i++) {
                                 var unit=i+1;
-                                var cost = skus[i].costCheckFlag == 1 ? '固定成本' : '比例成本'+skus[i].shuId+'gggggg' ;
+                                var cost = skus[i].costCheckFlag == 1 ? '固定成本' : '比例成本' ;
                                 var costShow = skus[i].costCheckFlag == 1 ? '<label><font color="red">*</font>成本价:' + skus[i].costPrice + '</label>' : '<label><font color="red">*</font>比例:供应商' + skus[i].shopPercent + '%,集团' + skus[i].organizePercent + '%,采美' + skus[i].cmPercent + '%</label>';
                                 html += '<div><input type="number" style="display:none" value="' + skus[i].skuId + '" name="skus[' + i + '].skuId">';
-                                html += '<label class="control-label"><font color="red">*</font>规格:规格' + unit;
-                                html += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>';
+                                html += '<label class="control-label" style="text-align:right"><font color="red">*</font>规格:' + unit+'</label>';
                                 html += '<div class="controls"><font color="red">*</font>售价:';
                                 html += '<input type="number" style="width:100px;" min="0" id="price" name="skus[' + i + '].price" value="' + skus[i].price + '" required onblur="checkPrice(this)">';
                                 html += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

+ 23 - 15
src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderDetail.jsp

@@ -1035,20 +1035,20 @@
 </c:forEach>
 <script type="text/javascript">
     (function () {
-        $('body').click(function (e) {
-            var target = $(e.target),
-                $block = $('.operation-block');
-            if (target.is('.operation-btn')) {
-                if ($block.css('display') === 'none') {
-                    $block.show();
-                } else {
-                    $block.hide();
-                }
-            }
-            if (!target.is('.operation-block') && !target.is('.operation-btn')) {
-                $block.hide();
-            }
-        });
+        // $('body').click(function (e) {
+        //     var target = $(e.target),
+        //         $block = $('.operation-block');
+        //     if (target.is('.operation-btn')) {
+        //         if ($block.css('display') === 'none') {
+        //             $block.show();
+        //         } else {
+        //             $block.hide();
+        //         }
+        //     }
+        //     if (!target.is('.operation-block') && !target.is('.operation-btn')) {
+        //         $block.hide();
+        //     }
+        // });
 
         $('.clauseId').each(function () {
             var self = $(this);
@@ -1069,7 +1069,15 @@
             }
         })
     })();
-
+    function operation(shopOrderID) {
+        var operationBlok = $('.' + shopOrderID)
+        if (operationBlok.css('display') == 'none') {
+            $('.operation-block').hide()
+            operationBlok.show()
+        } else {
+            operationBlok.hide()
+        }
+    }
     function openClauseInfo(index) {
         var content = $("#clauseContent" + index).val();
         if (content == '') {

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

@@ -183,17 +183,17 @@
 							<div>线上退回:<fmt:formatNumber type="number" pattern="#,##0.00"
 														value="${cmReturnedPurchase.refundOnlineFee}"/>元<br></div>
 						</c:if>
-<%--						<c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">--%>
-<%--							<div>线下转账:<fmt:formatNumber type="number" pattern="#,##0.00"--%>
-<%--														value="${cmReturnedPurchase.refundOfflineFee}"/>元--%>
-<%--							</div>--%>
-<%--						</c:if>--%>
-					</c:if>
-					<c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">
-						<div>线下转账:<fmt:formatNumber type="number" pattern="#,##0.00"
-													value="${cmReturnedPurchase.refundOfflineFee}"/>元
-						</div>
+						<c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">
+							<div>线下转账:<fmt:formatNumber type="number" pattern="#,##0.00"
+														value="${cmReturnedPurchase.refundOfflineFee}"/>元
+							</div>
+						</c:if>
 					</c:if>
+<%--					<c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">--%>
+<%--						<div>线下转账:<fmt:formatNumber type="number" pattern="#,##0.00"--%>
+<%--													value="${cmReturnedPurchase.refundOfflineFee}"/>元--%>
+<%--						</div>--%>
+<%--					</c:if>--%>
 				</td>
 				<td>
 					----

+ 9 - 2
src/test/java/com/caimei/info/InfoTest.java

@@ -4,6 +4,8 @@ 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.order.entity.NewShopOrder;
+import com.caimei.modules.order.service.NewShopOrderService;
 import com.caimei.modules.product.dao.CmOrganizeProductInfoMapper;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +27,8 @@ public class InfoTest extends SpringTransactionalContextTests {
 	private InfomationService infomationService;
 	@Autowired
 	CmOrganizeProductInfoMapper cmOrganizeProductInfoMapper;
+	@Autowired
+	NewShopOrderService newShopOrderService;
 
 	@Autowired
 	private InfoService infoService;
@@ -37,10 +41,13 @@ public class InfoTest extends SpringTransactionalContextTests {
 
 	@Test
 	public void test(){
-		CmBrandLanding cmBrandLanding = new CmBrandLanding();
+		NewShopOrder cmShopOrderByShopOrderID = newShopOrderService.getCmShopOrderByShopOrderID("29352");
+		System.out.println(cmShopOrderByShopOrderID);
+
+//		CmBrandLanding cmBrandLanding = new CmBrandLanding();
 //		cmBrandLanding.setType("not=1,2");
 
-		cmBrandLandingMapper.selectCmBrandLandingList(cmBrandLanding);
+//		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="";