admin
2019-08-30 4ce64cfcc457ca93dfc19960e89def4d07433c14
用户查询订单修改
3个文件已修改
46 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java
@@ -13,6 +13,7 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.yeshi.utils.DateUtil;
import org.yeshi.utils.IPUtil;
import org.yeshi.utils.JsonUtil;
@@ -108,9 +109,12 @@
     * @param out
     */
    @RequestMapping(value = "getorder", method = RequestMethod.POST)
    public void getOrder(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type, Integer orderState,
            String orderNo, String startTime, String endTime, Integer slotTime, boolean needCount, Integer dateType,
            Integer goodsType, PrintWriter out) {
    public void getOrder(AcceptData acceptData, Integer page, Long uid, Integer state,
            @RequestParam("type") String type1, Integer orderState, String orderNo, String startTime, String endTime,
            Integer slotTime, boolean needCount, Integer dateType, Integer goodsType, PrintWriter out) {
        Integer type = null;
        if (StringUtil.isNullOrEmpty(type1))
            type = null;
        if (uid == null) {
            out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
@@ -136,14 +140,14 @@
            orderState = 2; // 已维权
            state = null; // 清空
        }
        if (type != null && type == 0) {
            type = null; // 所有类型订单
        }
        if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
            goodsType = Constant.SOURCE_TYPE_TAOBAO;
        } else if (goodsType != null && goodsType == 0){
        } else if (goodsType != null && goodsType == 0) {
            goodsType = null; // 所有平台订单
        }
@@ -170,8 +174,8 @@
            BigDecimal todayMoney = null;
            // 查询列表
            List<CommonOrderVO> list = commonOrderService.getOrderByUid(acceptData, page, uid, state, type, orderState, orderNo,
                    startTime, endTime, dateType, goodsType);
            List<CommonOrderVO> list = commonOrderService.getOrderByUid(acceptData, page, uid, state, type, orderState,
                    orderNo, startTime, endTime, dateType, goodsType);
            if (list != null && list.size() > 0) {
                // 统计总数
@@ -182,9 +186,11 @@
            // 需要统计筛选信息 :未失效的总金额 以及订单
            if (needCount && page == 1) {
                todayMoney = commonOrderService.countBonusOrderMoney(uid, type, dateType, startTime, endTime, goodsType);
                todayMoney = commonOrderService.countBonusOrderMoney(uid, type, dateType, startTime, endTime,
                        goodsType);
                todayTotal = commonOrderService.countBonusOrderNumber(uid, type, dateType, startTime, endTime, goodsType);
                todayTotal = commonOrderService.countBonusOrderNumber(uid, type, dateType, startTime, endTime,
                        goodsType);
                // 统计有效的订单数量 、 失效订单数量 、维权订单数量
                Map<String, BigDecimal> countOrder = commonOrderService.countByUidAndOrderState(uid, type, startTime,
@@ -293,8 +299,8 @@
            Integer goodsType = null; // 版本区分
            if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
                goodsType = Constant.SOURCE_TYPE_TAOBAO;
            }
            }
            /* 总订单统计 */
            Map<String, BigDecimal> countOrder = commonOrderService.countHistoryOrder(uid, null, goodsType);
            int self = 0;
@@ -379,10 +385,10 @@
            e.printStackTrace();
        }
    }
    /**
     * 统计各个平台数据
     *
     * @param acceptData
     * @param uid
     * @param goodsType
@@ -400,7 +406,7 @@
            out.print(JsonUtil.loadFalseResult(1, "平台类型缺失或不正确"));
            return;
        }
        /* 今日订单统计 */
        Map<String, BigDecimal> countToday = commonOrderService.countHistoryOrder(uid, 1, goodsType);
@@ -456,8 +462,7 @@
        data.put("yesterday", yesterdaydata);
        out.print(JsonUtil.loadTrueResult(data));
    }
    /**
     * 统计奖金
     * 
@@ -479,11 +484,11 @@
            BigDecimal sharemoney = new BigDecimal(0.00);
            Object inviteCount = 0;
            BigDecimal inviteMoney = new BigDecimal(0.00);
            Integer goodsType = null; // 版本区分
            if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
                goodsType = Constant.SOURCE_TYPE_TAOBAO;
            }
            }
            Map<String, Object> shareMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, 2, dateType, null,
                    null, goodsType);
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java
@@ -142,7 +142,7 @@
            doUserMoneyDebtJob();// 债务偿还
            initScheduler();// 启动商品更新定时任务
            doUpdateGoodsJob(); // 更新商品队列
//            doJDOrderJob();// 京东订单处理
            doJDOrderJob();// 京东订单处理
            doPDDOrderJob();// 拼多多订单处理
            doImportantTaoBaoGoodsUpdateJob();// 淘宝重要商品的信息更新
            doHongBaoRecieveIntegralGetJob();// 返利到账,金币增加
fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java
@@ -306,6 +306,7 @@
        goodsInfo.setSalesCount(TaoBaoUtil.getSaleCount(goods.getBiz30day()));
        //白底图可能有错误  https://img.alicdn.com/bao/uploaded/TB1LVqmVZbpK1RjSZFyXXX_qFXa.png
        if (!StringUtil.isNullOrEmpty(goods.getPictUrlWhite())) {
            goodsInfo.setPicUrl(TbImgUtil.getTBSize320Img(goods.getPictUrlWhite()));
        } else {