wuxw7
2017-09-18 5f76c85439217934eeedb48818a42ce47b07d914
OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
@@ -10,7 +10,7 @@
import com.java110.config.properties.EventProperties;
import com.java110.core.base.smo.BaseServiceSMO;
import com.java110.core.context.AppContext;
import com.java110.core.event.AppEventPublishing;
import com.java110.event.AppEventPublishing;
import com.java110.entity.order.BusiOrder;
import com.java110.entity.order.BusiOrderAttr;
import com.java110.entity.order.OrderList;
@@ -89,7 +89,7 @@
     */
    @Override
    public String queryOrderInfo(OrderList orderList) throws Exception{
        return queryOrderInfo(orderList,true);
        return queryOrderInfo(orderList,true,false);
    }
    /**
@@ -133,7 +133,7 @@
     * @return
     */
    @Override
    public String queryOrderInfo(OrderList orderList,Boolean isQueryDataInfo) throws Exception{
    public String queryOrderInfo(OrderList orderList,Boolean isQueryDataInfo,Boolean isNeedDelete) throws Exception{
        /*List<OrderList> orderLists = iOrderServiceDao.queryOrderListAndAttr(orderList);
@@ -212,7 +212,7 @@
                //封装data 节点
                if(isQueryDataInfo){
                    busiOrderTmpJson.put("data",queryDataInfo(busiOrderTmp1,isNeedDelete));
                }
@@ -232,6 +232,26 @@
        return ProtocolUtil.createResultMsg(ProtocolUtil.RETURN_MSG_SUCCESS,"查询成功",orderListJson);
    }
    /**
     * 查询data信息
     * @return
     */
    private JSONObject queryDataInfo(BusiOrder busiOrder,Boolean isNeedDelete) throws Exception{
        //购物车订单类型
        String actionTypeCd = busiOrder.getActionTypeCd();
        //创建上下文对象
        AppContext context = createApplicationContext();
        //prepareContext(context, busiOrder);
        if(isNeedDelete) {
            return AppEventPublishing.queryDataInfoEvent(context, busiOrder);
        }else {
            return AppEventPublishing.queryNeedDeleteDataInfoEvent(context,busiOrder);
        }
    }
    /**
@@ -374,6 +394,7 @@
        //创建上下文对象
        AppContext context = createApplicationContext();
        prepareContext(context, datasTmp);
       /* try {*/
@@ -588,13 +609,11 @@
        }
        // 查询购物车信息,订单项信息
        String oldOrderInfo = this.queryOrderInfo(orderList,false);
        String oldOrderInfo = this.queryOrderInfo(orderList,true,true);
        JSONObject oldOrderInfoJson = ProtocolUtil.getObject(oldOrderInfo,JSONObject.class);
        oldOrderInfoJson.getJSONArray("orderLists");
        //重新发起撤单订单
        orderDispatch(null);
        orderDispatch(JSONObject.parseObject(oldOrderInfo));
    }
    /**