yujian
2019-10-08 0c78c7aaeaa5a427bc8a5c5faf3cd6bbb589c2da
map 改造
49个文件已修改
1133 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/aspect/RequestSerializableServiceAspect.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/LostOrderAdminController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserSystemCouponAdminController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/utils/AdminUtils.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ExtractAuditRecordMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/UserInfoMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/jd/JDOrderItemMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/LostOrderMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/pdd/PDDOrderMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/taobao/TaoBaoOrderMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/taobao/TaoBaoWeiQuanOrderMapper.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/UserSystemCouponCountMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/jd/JDGoods.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/ExtractAuditRecordMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/jd/JDOrderItemMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/LostOrderMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/pdd/PDDOrderMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/taobao/TaoBaoOrderMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/taobao/TaoBaoWeiQuanOrderMapper.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponCountMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserInfoCountServiceImpl.java 154 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserSystemCouponCountServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractAuditRecordServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/UserInfoCountService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/UserSystemCouponCountService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/money/extract/ExtractAuditRecordService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderCountService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/LostOrderService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/DouYinUtil.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/goods/OtherInfo.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/goods/RewardCouponVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/aspect/RequestSerializableServiceAspect.java
@@ -77,14 +77,12 @@
                                result = jedis.setnx(cacheKey, "1");
                                if (result <= 0) {
                                    try {
                                        System.out.println("__________已有线程在执行");
                                        Thread.sleep(50);
                                    } catch (InterruptedException e) {
                                        e.printStackTrace();
                                    }
                                    if (System.currentTimeMillis() - startTime > 1000 * 60L) {
                                        Constant.waitingThreadSet.remove(Thread.currentThread().getId());
                                        System.out.println("__________删除线程");
                                        return null;
                                    }
                                } else {
@@ -95,7 +93,6 @@
                            if (result > 0) {
                                try {
                                    System.out.println("__________放行执行");
                                    return joinPoint.proceed();
                                } catch (Throwable e) {
                                    e.printStackTrace();
@@ -123,9 +120,6 @@
        } catch (SecurityException e) {
            e.printStackTrace();
        }
        return joinPoint.proceed();
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java
@@ -24,6 +24,7 @@
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.controller.admin.utils.AdminUtils;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.Extract;
import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
@@ -821,9 +822,8 @@
                    innerList.put("name", "驳回数");
                }
                List<Map<String, Object>> list = extractAuditRecordService.countAuditTotal(state, dateType, year,
                List<ChartTDO> list = extractAuditRecordService.countAuditTotal(state, dateType, year,
                        startTime, endTime);
                if (dateType != 3) {
                    innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType, dateList, list)));
                } else {
@@ -835,7 +835,6 @@
                    }
                    innerList.put("data", gson.toJson(map.get("value")));
                }
                line_list.add(innerList);
            }
@@ -847,9 +846,7 @@
            }
            data.put("line_list", line_list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
@@ -875,7 +872,6 @@
    @RequestMapping(value = "getExtractApplyMoney")
    public void getExtractApplyMoney(String callback, Integer dateType, String year, String startTime, String endTime,
            PrintWriter out) {
        String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
        if (validateMsg != null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg));
@@ -908,12 +904,10 @@
            List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
            Gson gson = new Gson();
            JSONArray line_list = new JSONArray();
            JSONObject innerList = new JSONObject();
            innerList.put("name", "总计");
            List<Map<String, Object>> list = extractAuditRecordService.countExtractApplyMoney(null, dateType, year,
            List<ChartTDO> list = extractAuditRecordService.countExtractApplyMoney(null, dateType, year,
                    startTime, endTime);
            if (dateType != 3) {
@@ -928,6 +922,7 @@
                innerList.put("data", gson.toJson(map.get("value")));
            }
            JSONArray line_list = new JSONArray();
            line_list.add(innerList);
            JSONObject data = new JSONObject();
@@ -938,9 +933,7 @@
            }
            data.put("line_list", line_list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
@@ -968,7 +961,6 @@
    @RequestMapping(value = "getExtractApplyNumber")
    public void getExtractApplyNumber(String callback, Integer state, Integer dateType, String year, String startTime,
            String endTime, PrintWriter out) {
        String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
        if (validateMsg != null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg));
@@ -996,17 +988,15 @@
        }
        try {
            Object objectDate = null;
            Gson gson = new Gson();
            List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
            Gson gson = new Gson();
            JSONArray line_list = new JSONArray();
            JSONObject innerList = new JSONObject();
            innerList.put("name", "总计");
            List<Map<String, Object>> list = extractAuditRecordService.countExtractApplyNumber(null, dateType, year,
            List<ChartTDO> list = extractAuditRecordService.countExtractApplyNumber(null, dateType, year,
                    startTime, endTime);
            if (dateType != 3) {
@@ -1021,6 +1011,7 @@
                innerList.put("data", gson.toJson(map.get("value")));
            }
            JSONArray line_list = new JSONArray();
            line_list.add(innerList);
            JSONObject data = new JSONObject();
@@ -1031,9 +1022,7 @@
            }
            data.put("line_list", line_list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
fanli/src/main/java/com/yeshi/fanli/controller/admin/LostOrderAdminController.java
@@ -15,6 +15,7 @@
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.controller.admin.utils.AdminUtils;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.LostOrder;
import com.yeshi.fanli.entity.bus.user.Order;
import com.yeshi.fanli.entity.bus.user.UserInfo;
@@ -214,7 +215,6 @@
    @RequestMapping(value = "getLostNum")
    public void getLostNum(String callback, Integer dateType, String stateArray, String year, 
            String startTime, String endTime, PrintWriter out) {
        String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
        if (validateMsg != null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg));
@@ -225,7 +225,6 @@
            startTime = null;
            endTime = null;
        }
        
        List<Integer> channelList = null;
        if (stateArray != null && stateArray.trim().length() > 0) {
@@ -257,20 +256,14 @@
        Gson gson = new Gson();
        Object objectDate = null;
        List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
        try {
            JSONArray line_list = new JSONArray();
            if (channelList == null || channelList.size() == 0) {
                
            } else {
                for (Integer state : channelList) {
                    List<Map<String, Object>> list = lostOrderService.countLostNum(dateType, state, year,
                    List<ChartTDO> list = lostOrderService.countLostNum(dateType, state, year,
                            startTime, endTime);
                    JSONObject innerList = new JSONObject();
                    if (state == 1) {
                        innerList.put("name", "未处理");
@@ -285,7 +278,6 @@
                    } else {
                        // 年视图
                        Map<String, Object> map = AdminUtils.yearsDataFactory(list);
                        if (objectDate == null) {
                            objectDate = map.get("date");
                        }
@@ -294,7 +286,6 @@
                    
                    line_list.add(innerList);
                }
            }
            JSONObject data = new JSONObject();
@@ -305,9 +296,7 @@
            }
            
            data.put("line_list", line_list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
@@ -363,15 +352,9 @@
        Gson gson = new Gson();
        Object objectDate = null;
        List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
        try {
            JSONArray line_list = new JSONArray();
            List<Map<String, Object>> list = lostOrderService.countAppealMoney(dateType, year, startTime, endTime);
            List<ChartTDO> list = lostOrderService.countAppealMoney(dateType, year, startTime, endTime);
            JSONObject innerList = new JSONObject();
                innerList.put("name", "总计");
@@ -386,9 +369,7 @@
                }
                innerList.put("data", gson.toJson(map.get("value")));
            }
            line_list.add(innerList);
            JSONObject data = new JSONObject();
            if (objectDate != null) {
@@ -396,11 +377,8 @@
            } else {
                data.put("xAxis_list", gson.toJson(dateList));
            }
            data.put("line_list", line_list);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -18,8 +18,9 @@
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.controller.admin.utils.AdminUtils;
import com.yeshi.fanli.entity.money.UserMoneyDebt.UserMoneyDebtTypeEnum;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.money.UserMoneyDebt;
import com.yeshi.fanli.entity.money.UserMoneyDebt.UserMoneyDebtTypeEnum;
import com.yeshi.fanli.entity.money.UserMoneyDetail;
import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
import com.yeshi.fanli.entity.order.CommonOrder;
@@ -402,7 +403,7 @@
            JSONArray line_list = new JSONArray();
            for (String channel : channelList) {
                List<Map<String, Object>> list = hongBaoV2CountService.count24HOderByChannel(channel, dateType, year,
                List<ChartTDO> list = hongBaoV2CountService.count24HOderByChannel(channel, dateType, year,
                        startTime, endTime);
                if ("all".equalsIgnoreCase(channel)) {
@@ -527,7 +528,6 @@
     */
    public JSONObject countHistoryHongBao(String channelArray, Integer dateType, Integer state, String year,
            String startTime, String endTime, int countType) throws Exception {
        if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) {
            startTime = null;
            endTime = null;
@@ -571,7 +571,7 @@
        JSONArray line_list = new JSONArray();
        for (String channel : channelList) {
            List<Map<String, Object>> list = null;
            List<ChartTDO> list = null;
            if (countType == 1) {
                list = hongBaoV2CountService.countHongBaoNum(channel, dateType, state, year, startTime, endTime);
            } else if (countType == 2) {
@@ -596,7 +596,6 @@
                }
                innerList.put("data", gson.toJson(map.get("value")));
            }
            line_list.add(innerList);
        }
@@ -606,9 +605,7 @@
        } else {
            data.put("xAxis_list", gson.toJson(dateList));
        }
        data.put("line_list", line_list);
        return data;
    }
@@ -628,7 +625,6 @@
    @RequestMapping(value = "getTypeNumber")
    public void getTypeNumber(String callback, Integer dateType, String typeArray, String year, String startTime,
            String endTime, PrintWriter out) {
        String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
        if (validateMsg != null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg));
@@ -675,15 +671,11 @@
        Gson gson = new Gson();
        Object objectDate = null;
        List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
        try {
            JSONArray line_list = new JSONArray();
            for (Integer type : channelList) {
                List<Map<String, Object>> list = hongBaoV2CountService.countHongBaoType(dateType, type, year, startTime,
                List<ChartTDO> list = hongBaoV2CountService.countHongBaoType(dateType, type, year, startTime,
                        endTime);
                JSONObject innerList = new JSONObject();
                if (type == 1) {
                    innerList.put("name", "返利订单");
@@ -772,7 +764,7 @@
            JSONArray line_list = new JSONArray();
            List<Map<String, Object>> list = commonOrderCountService.getTrackAccuracyRate(dateType, year, startTime,
            List<ChartTDO> list = commonOrderCountService.getTrackAccuracyRate(dateType, year, startTime,
                    endTime, sourceType);
            JSONObject innerList = new JSONObject();
@@ -936,7 +928,7 @@
        List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
        JSONArray line_list = new JSONArray();
        List<Map<String, Object>> list = null;
        List<ChartTDO> list = null;
        if (countType == 1) {
            list = commonOrderCountService.countWeiQaunOrderNumber(dateType, year, startTime, endTime);
        } else if (countType == 2) {
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
@@ -19,6 +19,7 @@
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.controller.admin.utils.AdminUtils;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.BindingAccount;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
@@ -857,7 +858,7 @@
            JSONArray line_list = new JSONArray();
            for (String channel : channelList) {
                List<Map<String, Object>> list = userInfoCountService.countNewUserByDate(channel, dateType, year,
                List<ChartTDO> list = userInfoCountService.countNewUserByDate(channel, dateType, year,
                        startTime, endTime);
                if ("all".equalsIgnoreCase(channel)) {
@@ -975,7 +976,7 @@
            JSONArray line_list = new JSONArray();
            for (String channel : channelList) {
                List<Map<String, Object>> list = userInfoCountService.getTodayBuyRate(channel, dateType, year,
                List<ChartTDO> list = userInfoCountService.getTodayBuyRate(channel, dateType, year,
                        startTime, endTime);
                if ("all".equalsIgnoreCase(channel)) {
fanli/src/main/java/com/yeshi/fanli/controller/admin/UserSystemCouponAdminController.java
@@ -13,6 +13,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.yeshi.fanli.controller.admin.utils.AdminUtils;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord;
import com.yeshi.fanli.service.inter.count.UserSystemCouponCountService;
import com.yeshi.fanli.service.inter.user.UserSystemCouponGiveRecordService;
@@ -409,7 +410,6 @@
    public void getFreeCouponMoneyCharts(String callback, Integer dateType, String year, String startTime,
            String endTime, Integer coupon, PrintWriter out){
        try {
            if (coupon == null || (coupon.intValue() < 0 && coupon.intValue() > 4)) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("券类型不正确"));
                return;
@@ -430,7 +430,6 @@
                couponType = "freeCouponBuy";
            }
            
            JSONObject data = getChartsData(dateType, year, startTime, endTime, 3, couponType);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
@@ -441,7 +440,6 @@
    
    public JSONObject getChartsData(Integer dateType, String year, String startTime,
            String endTime, int source, String couponType) throws Exception {
        if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) {
            startTime = null;
            endTime = null;
@@ -470,7 +468,7 @@
        List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
        JSONObject innerList = new JSONObject();
        List<Map<String, Object>> list = null;
        List<ChartTDO> list = null;
        if (source == 1) {
            // 奖励券数量
            innerList.put("name", "数量");
@@ -488,9 +486,7 @@
                    startTime, endTime, couponType);
        }
        
        Object objectDate = null;
        if (dateType != 3) {
            innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType, dateList, list)));
        } else {
fanli/src/main/java/com/yeshi/fanli/controller/admin/utils/AdminUtils.java
@@ -5,13 +5,14 @@
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.yeshi.utils.DateUtil;
import com.google.gson.Gson;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.util.StringUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class AdminUtils {
@@ -65,21 +66,18 @@
    }
    
    
    public static Map<String, Object> yearsDataFactory(List<Map<String, Object>> list) {
    public static Map<String, Object> yearsDataFactory(List<ChartTDO> list) {
        List<Object> resultList = new ArrayList<Object>();
        List<Object> listDate = new ArrayList<Object>();
        
        if (list != null && list.size() > 0) {
            for (int i = 0; i < list.size(); i++) {
                Map<String, Object> map = list.get(i);
                Object showValue = map.get("showValue");
                Object showDate = map.get("showDate");
            for (ChartTDO chart: list) {
                String showDate = chart.getShowDate();
                String showValue = chart.getShowValue();
                if (showValue == null) {
                    showValue = 0;
                    showValue = "0";
                }
                resultList.add(showValue);
                listDate.add(showDate);
            }
@@ -95,43 +93,30 @@
    
    
    public static List<Object> dayOrMonthDataFactory(Integer dateType, List<String> listDate , 
            List<Map<String, Object>> list) throws Exception {
            List<ChartTDO> list) throws Exception {
        List<Object> resultList = new ArrayList<Object>();
        if (list != null && list.size() > 0) {
            for (int i = 0; i < listDate.size(); i++) {
                Object showValue = null;
                if (list != null && list.size() > 0) {
                String showValue = null;
                    // 日期匹配赋值
                    for (int j = 0; j < list.size(); j++) {
                        Map<String, Object> map = list.get(j);
                for (ChartTDO chart: list) {
                        String showDate = listDate.get(i);
                        if (dateType == 2 && Integer.parseInt(showDate) < 10 ) {
                            showDate = "0" + showDate;
                        }
                        Object reslutDate = map.get("showDate");
                        String reslutTime = reslutDate.toString();
                    String reslutTime = chart.getShowDate();
                        if (showDate.equalsIgnoreCase(reslutTime)) {
                            showValue = map.get("showValue");
                        showValue = chart.getShowValue();
                            break;
                        }
                    }
                }
                
                if (showValue == null) {
                    showValue = 0;
                    showValue = "0";
                }
                resultList.add(showValue);
            }
        }
        return resultList;
    }
    
@@ -146,7 +131,7 @@
     * @throws Exception
     */
    public static JSONObject chartDataFactory(Integer dateType, String year, String startTime, String endTime, 
            List<Map<String, Object>> list) throws Exception{
            List<ChartTDO> list) throws Exception{
        Object objectDate = null;
        List<String> dateList = getDateList(dateType, startTime, endTime, year);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -206,6 +206,10 @@
            case 4:
                break;
            case 5:
                list.add(new GoodsClass(0L, "全部"));
                list.add(new GoodsClass(1L, "淘宝"));
                list.add(new GoodsClass(2L, "京东"));
                list.add(new GoodsClass(3L, "拼多多"));
                break;
            default:
                break;
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -16,6 +16,7 @@
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.taobao.TbImgUtil;
import com.yeshi.fanli.dto.jd.JDCategoryInfo;
import com.yeshi.fanli.dto.jd.JDCouponInfo;
import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
@@ -25,9 +26,9 @@
import com.yeshi.fanli.entity.bus.user.ShamUser;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.jd.JDGoodsClass;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.entity.system.SystemClientParams;
import com.yeshi.fanli.entity.taobao.ClientTBPid;
@@ -47,6 +48,7 @@
import com.yeshi.fanli.service.inter.goods.CollectionGoodsV2Service;
import com.yeshi.fanli.service.inter.goods.ScanHistoryV2Service;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
import com.yeshi.fanli.service.inter.jd.JDGoodsClassService;
import com.yeshi.fanli.service.inter.money.UserMoneyExtraService;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.service.inter.taobao.TLJBuyGoodsService;
@@ -180,6 +182,10 @@
    @Resource
    private JumpDetailV2Service jumpDetailV2Service;
    @Resource
    private JDGoodsClassService jdGoodsClassService;
    /**
     * 淘宝商品详情
@@ -630,7 +636,30 @@
        // 附加信息
        OtherInfo otherInfo = new OtherInfo();
        // 京东plus返利
        String maxMoneyPlus = null;
        JDCategoryInfo categoryInfo = jdGoods.getCategoryInfo();
        if (categoryInfo != null && categoryInfo.getCid3() != null && jdGoods.getCommissionInfo() != null) {
            Long cid3 = categoryInfo.getCid3();
            JDGoodsClass threeClass = jdGoodsClassService.getThreeClassByCid(Integer.parseInt(cid3.toString()));
            if (threeClass != null && threeClass.getSelfComm() != null && threeClass.getSelfComm().compareTo(new BigDecimal(0)) > 0) {
                BigDecimal commissionShare = jdGoods.getCommissionInfo().getCommissionShare();
                // plus比例 小于正常比例
                if (commissionShare != null && commissionShare.compareTo(threeClass.getSelfComm()) > 0) {
                    jdGoods.setCommissionPlus(threeClass.getSelfComm());
                    // plus返利
                    BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods, fanLiRate);
                    otherInfo.setFanliMoneyPlus("京东plus会员返¥" + fanliMoneyPlus);
                    // 使用奖励券最高返
                    maxMoneyPlus = "(京东plus会员最高返¥"+ fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))+")";
                }
            }
        }
        // 奖励券返利
        RewardCouponVO rewardCoupon = new RewardCouponVO();
        rewardCoupon.setMaxMoneyPlus(maxMoneyPlus);
        rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("integralExchange"));
        JSONObject params1=new JSONObject();
        params1.put("balanceMore", true);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
@@ -787,17 +787,17 @@
        } else {
            long rebateOrder = hongBaoV2CountService.countRebateOrder(uid);
            long shareOrInviteOrder = hongBaoV2CountService.countShareOrInviteOrder(uid);
            if (rebateOrder <= 0 && shareOrInviteOrder <= 0) {
            if (rebateOrder + shareOrInviteOrder >= 3) {
                // 熟客版
            } else if (rebateOrder <= 0 && shareOrInviteOrder <= 0) {
                // 新人版
                tips = configService.get("tip_guide_new_user");
            } else if (rebateOrder > 0 && shareOrInviteOrder <= 0) {
                // 省钱版
                tips = configService.get("tip_guide_save_money");
            } else if (shareOrInviteOrder > 0) {
            } else {
                // 赚钱版
                tips = configService.get("tip_guide_share_invite");
            } else {
                // 熟客版
            }
        }
        
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -16,12 +16,14 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.yeshi.utils.HttpUtil;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.NumberUtil;
import org.yeshi.utils.taobao.TbImgUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.yeshi.fanli.dto.douyin.DouYinGoods;
import com.yeshi.fanli.dto.jd.JDFilter;
import com.yeshi.fanli.dto.jd.JDSearchFilter;
import com.yeshi.fanli.dto.jd.JDSearchResult;
@@ -52,6 +54,7 @@
import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.DouYinUtil;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.Utils;
@@ -230,6 +233,9 @@
                type = 4;
                tb = TaoBaoUtil.getTmallGoodsInfo(id);
            }
        } else if (text.contains("v.douyin.com")) { // 抖音
            analysisDouYin(acceptData, text, out);
            return;
        } else {
            tb = TaoBaoUtil.parsePhoneShareUrlByTB(text);
            if (tb == null)// 淘宝是空值
@@ -361,6 +367,49 @@
        out.print(JsonUtil.loadTrueResult(root));
    }
    /**
     * 解析抖音链接
     * @param acceptData
     * @param text
     * @param out
     * @return
     */
    private void analysisDouYin(AcceptData acceptData, String text, PrintWriter out) {
        String location = HttpUtil.getLocation(text);
        if (!StringUtil.isNullOrEmpty(location)) {
            if (location.contains("taobao.com")) { // 淘宝商品
                String realUrl = TaoBaoUtil.getRealUrl(location);
                if (!StringUtil.isNullOrEmpty(realUrl)) {
                    getRecommendInfo(acceptData, realUrl, null, out);
                    return;
                }
            } else if (location.contains("haohuo.jinritemai.com")) { // 抖音商品
                DouYinGoods goods = DouYinUtil.getGoodsInfo(location);
                JSONObject goodsJSON = new JSONObject();
                goodsJSON.put("title", goods.getName());
                goodsJSON.put("pictUrl", goods.getImg());
                JSONObject data = new JSONObject();
                data.put("type", 4);
                data.put("desc", "该商品无推广信息");
                data.put("goods", goodsJSON);
                out.print(JsonUtil.loadTrueResult(data));
                return;
            }
        }
        out.println(JsonUtil.loadFalseResult("暂未找到该商品,请稍后再试!"));
        return;
    }
    /**
     * 解析淘口令
     * @param acceptData
     * @param text
     * @param out
     * @return
     */
    private boolean analysisTaoToken(AcceptData acceptData, String text, PrintWriter out) {
        String token = StringUtil.picUpTaoToken(text);
        if (!StringUtil.isNullOrEmpty(token)) {
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ExtractAuditRecordMapper.java
@@ -1,10 +1,10 @@
package com.yeshi.fanli.dao.mybatis;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
public interface ExtractAuditRecordMapper {
@@ -147,7 +147,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countAuditTotal(@Param("state")Integer state, @Param("type")Integer type,
    List<ChartTDO> countAuditTotal(@Param("state")Integer state, @Param("type")Integer type,
        @Param("years")String years, @Param("startTime")String startTime, @Param("endTime")String endTime);
    
    /**
@@ -159,7 +159,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countExtractMoney(@Param("state")Integer state, @Param("type")Integer type,
    List<ChartTDO> countExtractMoney(@Param("state")Integer state, @Param("type")Integer type,
        @Param("years")String years, @Param("startTime")String startTime, @Param("endTime")String endTime);
    
    /**
@@ -171,7 +171,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countExtractApplyNumber(@Param("state")Integer state, @Param("type")Integer type,
    List<ChartTDO> countExtractApplyNumber(@Param("state")Integer state, @Param("type")Integer type,
        @Param("years")String years, @Param("startTime")String startTime, @Param("endTime")String endTime);
    
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java
@@ -3,10 +3,10 @@
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.vo.order.HongBaoV2VO;
public interface HongBaoV2CountMapper {
@@ -49,7 +49,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countHongBaoMoney(@Param("channel") String channel, @Param("dateType") Integer dateType,
    List<ChartTDO> countHongBaoMoney(@Param("channel") String channel, @Param("dateType") Integer dateType,
            @Param("state") Integer state, @Param("year") String year, @Param("startTime") String startTime,
            @Param("endTime") String endTime);
@@ -65,7 +65,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countHongBaoNum(@Param("channel") String channel, @Param("dateType") Integer dateType,
    List<ChartTDO> countHongBaoNum(@Param("channel") String channel, @Param("dateType") Integer dateType,
            @Param("state") Integer state, @Param("year") String year, @Param("startTime") String startTime,
            @Param("endTime") String endTime);
@@ -81,7 +81,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countHongBaoType(@Param("dateType") Integer dateType, @Param("type") Integer type,
    List<ChartTDO> countHongBaoType(@Param("dateType") Integer dateType, @Param("type") Integer type,
            @Param("year") String year, @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
@@ -96,7 +96,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countHongBaoTotalNum(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countHongBaoTotalNum(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime") String startTime, @Param("endTime") String endTime);
    // 累计提成订单数量(包含无效订单)
@@ -127,7 +127,7 @@
     * @param channel
     * @return
     */
    List<Map<String, Object>> count24HOderByChannel(@Param("channel") String channel, @Param("type") Integer type,
    List<ChartTDO> count24HOderByChannel(@Param("channel") String channel, @Param("type") Integer type,
            @Param("years") String years, @Param("startTime") String startTime, @Param("endTime") String endTime);
    List<HongBaoV2VO> listShareAndInviteMoney(@Param("start") long start, @Param("count") int count,
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/UserInfoMapper.java
@@ -2,10 +2,10 @@
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.vo.user.UserInfoVO;
@@ -166,7 +166,7 @@
     * 
     * @return
     */
    List<Map<String, Object>> countNewUserByDate(@Param("channel") String channel, @Param("type") Integer type,
    List<ChartTDO> countNewUserByDate(@Param("channel") String channel, @Param("type") Integer type,
            @Param("years") String years, @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
@@ -174,7 +174,7 @@
     * 
     * @return
     */
    List<Map<String, Object>> getTodayHasOrder(@Param("channel") String channel, @Param("type") Integer type,
    List<ChartTDO> getTodayHasOrder(@Param("channel") String channel, @Param("type") Integer type,
            @Param("years") String years, @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
@@ -182,7 +182,7 @@
     * 
     * @return
     */
    Map<String, Object> getWeekHasOrder(@Param("channel") String channel, @Param("startTime") String startTime,
    ChartTDO getWeekHasOrder(@Param("channel") String channel, @Param("startTime") String startTime,
            @Param("endTime") String endTime, @Param("orderNum") Integer orderNum);
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/jd/JDOrderItemMapper.java
@@ -1,11 +1,11 @@
package com.yeshi.fanli.dao.mybatis.jd;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.jd.JDOrderItem;
public interface JDOrderItemMapper extends BaseMapper<JDOrderItem> {
@@ -32,7 +32,7 @@
     * @param channel
     * @return
     */
    List<Map<String, Object>> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime") String startTime, @Param("endTime") String endTime);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/CommonOrderCountMapper.java
@@ -6,6 +6,8 @@
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
public interface CommonOrderCountMapper {
    
@@ -23,7 +25,7 @@
     * @param channel
     * @return
     */
    List<Map<String, Object>> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime")String startTime, @Param("endTime")String endTime,@Param("sourceType") int sourceType);
    
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/LostOrderMapper.java
@@ -6,6 +6,7 @@
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.LostOrder;
public interface LostOrderMapper extends BaseMapper<LostOrder> {
@@ -50,7 +51,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countLostNum(@Param("dateType") Integer dateType, @Param("resultCode") Integer resultCode,
    List<ChartTDO> countLostNum(@Param("dateType") Integer dateType, @Param("resultCode") Integer resultCode,
            @Param("year") String year, @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
@@ -63,7 +64,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countAppealMoney(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countAppealMoney(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/pdd/PDDOrderMapper.java
@@ -1,11 +1,11 @@
package com.yeshi.fanli.dao.mybatis.pdd;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.pdd.PDDOrder;
public interface PDDOrderMapper extends BaseMapper<PDDOrder> {
@@ -27,7 +27,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/taobao/TaoBaoOrderMapper.java
@@ -5,6 +5,7 @@
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
public interface TaoBaoOrderMapper {
@@ -72,7 +73,7 @@
     * @param channel
     * @return
     */
    List<Map<String, Object>> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/taobao/TaoBaoWeiQuanOrderMapper.java
@@ -1,10 +1,10 @@
package com.yeshi.fanli.dao.mybatis.taobao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
public interface TaoBaoWeiQuanOrderMapper {
@@ -40,7 +40,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countWeiQaunOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countWeiQaunOrderNumber(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
@@ -52,7 +52,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> countWeiQaunOrderMoney(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> countWeiQaunOrderMoney(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime") String startTime, @Param("endTime") String endTime);
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/UserSystemCouponCountMapper.java
@@ -2,10 +2,10 @@
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord;
import com.yeshi.fanli.vo.user.SystemCouponVO;
import com.yeshi.fanli.vo.user.UserSystemCouponCountVO;
@@ -117,7 +117,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> getRebateCouponUsedNumToCharts(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> getRebateCouponUsedNumToCharts(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime")String startTime, @Param("endTime")String endTime);
    
    
@@ -129,7 +129,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> getRebateCouponMoneyToCharts(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> getRebateCouponMoneyToCharts(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime")String startTime, @Param("endTime")String endTime);
    
    
@@ -141,7 +141,7 @@
     * @param endTime
     * @return
     */
    List<Map<String, Object>> getFreeCouponMoneyToCharts(@Param("dateType") Integer dateType, @Param("year") String year,
    List<ChartTDO> getFreeCouponMoneyToCharts(@Param("dateType") Integer dateType, @Param("year") String year,
            @Param("startTime")String startTime, @Param("endTime")String endTime,  @Param("couponType")String couponType);
    
}
fanli/src/main/java/com/yeshi/fanli/entity/jd/JDGoods.java
@@ -43,6 +43,7 @@
    private Long totalCount;// 有效商品总数量
    private Integer isFreeShipping; // 是否包邮(1:是,0:否,2:自营商品遵从主站包邮规则)
    
    private BigDecimal commissionPlus;// 佣金比例 : 京东plus会员
    public JDCategoryInfo getCategoryInfo() {
        return categoryInfo;
@@ -211,4 +212,12 @@
    public void setIsFreeShipping(Integer isFreeShipping) {
        this.isFreeShipping = isFreeShipping;
    }
    public BigDecimal getCommissionPlus() {
        return commissionPlus;
    }
    public void setCommissionPlus(BigDecimal commissionPlus) {
        this.commissionPlus = commissionPlus;
    }
}
fanli/src/main/java/com/yeshi/fanli/mapping/ExtractAuditRecordMapper.xml
@@ -21,8 +21,13 @@
        <association property="extract" column="extractId"
            select="com.yeshi.fanli.dao.mybatis.ExtractMapper.selectByPrimaryKey">
        </association>
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">id,aid,extractId,beforeMoney,afterMoney,countMoney,countNum,orderNum,cancelOrderNum,auditTime,auditRole,extraInfo
    </sql>
@@ -291,7 +296,7 @@
    <select id="countAuditTotal" resultType="java.util.HashMap">
    <select id="countAuditTotal" resultMap="ChartMap">
        SELECT COALESCE(COUNT(tr.id),0) AS 'showValue',
        <if test="type == 1">
            FROM_UNIXTIME(tr.`auditTime`/1000,'%Y-%m-%d') AS
@@ -333,7 +338,7 @@
        ORDER BY tr.`auditTime`
    </select>
    <select id="countExtractMoney" resultType="java.util.HashMap">
    <select id="countExtractMoney" resultMap="ChartMap">
        SELECT CAST(SUM(t.`money`)AS DECIMAL(19,2)) AS showValue,
        <if test="type == 1">
            FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') AS
@@ -372,7 +377,7 @@
        ORDER BY t.`extractTime`
    </select>
    <select id="countExtractApplyNumber" resultType="java.util.HashMap">
    <select id="countExtractApplyNumber" resultMap="ChartMap">
        SELECT COUNT(t.id) AS showValue,
        <if test="type == 1">
            FROM_UNIXTIME(t.`extractTime`/1000,'%Y-%m-%d') AS
fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml
@@ -82,6 +82,11 @@
        <result column="uie_gold_coin" property="goldCoin" jdbcType="INTEGER" />
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">id,identifycode,login_type,wx_open_id,wx_union_id,nick_name,tbName,tbPic,wxName,wxPic,portrait,createtime,last_logintime,loginip,tuiguang_code,appid,my_hongBao,pay_password,sid,rank,phone,state,state_desc
    </sql>
    <!-- 不能查询缓存 -->
@@ -548,7 +553,7 @@
    </select>
    <select id="countNewUserByDate" resultType="java.util.HashMap">
    <select id="countNewUserByDate" resultMap="ChartMap">
        SELECT COUNT(DISTINCT h.`id`) AS showValue,
        <if test="type == 1">
            FROM_UNIXTIME(h.`createtime`/1000,'%Y-%m-%d') AS
@@ -594,7 +599,7 @@
        ORDER BY h.`createtime`
    </select>
    <select id="getTodayHasOrder" resultType="java.util.HashMap">
    <select id="getTodayHasOrder" resultMap="ChartMap">
        SELECT COALESCE(COUNT(DISTINCT u.`id`),0) AS 'showValue',
        <if test="type == 1">
            FROM_UNIXTIME(u.`createtime`/1000,'%Y-%m-%d') AS
@@ -648,7 +653,7 @@
    <select id="getWeekHasOrder" resultType="java.util.HashMap">
    <select id="getWeekHasOrder" resultMap="ChartMap">
        SELECT COUNT(DISTINCT hb.uid) AS
        showValue,FROM_UNIXTIME(u.`createtime`/1000,'%Y-%m-%d') AS 'showDate'
        FROM (SELECT COUNT(v2.`hb_id`) AS num,v2.hb_uid AS uid
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml
@@ -31,6 +31,12 @@
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Column_DateType">
        <if test="dateType == 1">
            DATE_FORMAT(t.`hb_create_time`,'%Y-%m-%d') AS 'showDate'
@@ -91,7 +97,7 @@
        </if>
    </sql>
    <select id="countHongBaoMoney" resultType="java.util.HashMap">
    <select id="countHongBaoMoney" resultMap="ChartMap">
        SELECT CAST(SUM(t.`hb_money`)AS DECIMAL(19,2)) AS showValue,
        <include refid="Column_DateType" />
        FROM yeshi_ec_hongbao_v2 t
@@ -111,7 +117,7 @@
        ORDER BY t.`hb_create_time`
    </select>
    <select id="countHongBaoNum" resultType="java.util.HashMap">
    <select id="countHongBaoNum" resultMap="ChartMap">
        SELECT COUNT(t.`hb_id`)AS showValue,
        <include refid="Column_DateType" />
        FROM yeshi_ec_hongbao_v2 t
@@ -138,9 +144,7 @@
    </select>
    <select id="countHongBaoType" resultType="java.util.HashMap">
    <select id="countHongBaoType" resultMap="ChartMap">
        SELECT COUNT(t.`hb_id`)AS showValue,
        <include refid="Column_DateType" />
        FROM yeshi_ec_hongbao_v2 t
@@ -151,7 +155,7 @@
        ORDER BY t.`hb_create_time`
    </select>
    <select id="countHongBaoTotalNum" resultType="java.util.HashMap">
    <select id="countHongBaoTotalNum" resultMap="ChartMap">
        SELECT COUNT(t.`hb_id`)AS showValue,
        <include refid="Column_DateType" />
        FROM yeshi_ec_hongbao_v2 t
@@ -231,7 +235,7 @@
    </select>
    <select id="count24HOderByChannel" resultType="java.util.HashMap">
    <select id="count24HOderByChannel" resultMap="ChartMap">
        SELECT <!-- COALESCE(SUM(b.money*2),0) AS 'commision', -->
        COALESCE(COUNT(b.hb_id),0) AS 'showValue',
        <!-- COALESCE(SUM(b.payMoney),0) AS 'payMoney', -->
fanli/src/main/java/com/yeshi/fanli/mapping/jd/JDOrderItemMapper.xml
@@ -53,6 +53,12 @@
            jdbcType="TIMESTAMP" />
        <result column="joi_order_by" property="orderBy" jdbcType="INTEGER" />
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">joi_id,joi_order_id,joi_actual_cos_price,joi_actual_fee,joi_commission_rate,joi_estimate_cos_price,joi_estimate_fee,joi_final_rate,joi_cid1,joi_frozen_sku_num,joi_pid,joi_position_id,joi_price,joi_cid2,joi_site_id,joi_sku_id,joi_sku_name,joi_sku_num,joi_sku_return_num,joi_sub_side_rate,joi_sub_sidy_rate,joi_cid3,joi_union_alias,joi_union_tag,joi_union_traffic_group,joi_valid_code,joi_sub_union_id,joi_trace_type,joi_pay_month,joi_pop_id,joi_ext1,joi_trade_id,joi_create_time,joi_update_time,joi_order_by
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
@@ -269,7 +275,7 @@
    </sql>
    
    
    <select id="countOrderNumber" resultType="java.util.HashMap">
    <select id="countOrderNumber" resultMap="ChartMap">
        SELECT IFNULL(COUNT(`joi_id`),0) AS showValue,
        <include refid="Column_DateType" />
        FROM `yeshi_ec_jd_order_item` left join yeshi_ec_jd_order on jo_order_id=joi_order_id  WHERE jo_order_time IS NOT NULL
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml
@@ -2,6 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeshi.fanli.dao.mybatis.order.CommonOrderCountMapper">
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Column_DateType">
        <if test="dateType == 1">
@@ -47,7 +52,7 @@
            </if>
    </select>
    
    <select id="countOrderNumber" resultType="java.util.HashMap">
    <select id="countOrderNumber" resultMap="ChartMap">
        SELECT IFNULL(COUNT(t.`co_id`),0) AS showValue,<include refid="Column_DateType"/>
        FROM `yeshi_ec_common_order` t 
        WHERE t.co_source_type=#{sourceType} and t.`co_third_create_time` IS NOT NULL <include refid="Count_Select_DateType"/> 
fanli/src/main/java/com/yeshi/fanli/mapping/order/LostOrderMapper.xml
@@ -37,6 +37,12 @@
        <association property="order" column="oid"
            select="com.yeshi.fanli.dao.mybatis.order.OrderMapper.selectByPrimaryKey" />
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_lost_order where id = #{id,jdbcType=BIGINT}
    </delete>
@@ -94,7 +100,7 @@
        <if test="handleType != null and handleType != 0">AND (d.state = 1 or d.state = 2)</if>
        <if test="type != null">AND d.type = #{type}</if>
    </select>
    <select id="countLostNum" resultType="java.util.HashMap">
    <select id="countLostNum" resultMap="ChartMap">
        SELECT COUNT(t.`id`) AS showValue,
        <if test="dateType == 1">FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS
            'showDate'
@@ -118,7 +124,7 @@
        <if test="dateType == 3">GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y')</if>
        ORDER BY t.`createTime`
    </select>
    <select id="countAppealMoney" resultType="java.util.HashMap">
    <select id="countAppealMoney" resultMap="ChartMap">
        SELECT CAST(SUM(v.`hb_money`)AS DECIMAL(19,2)) AS showValue,
        <if test="dateType == 1">FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS
            'showDate'
fanli/src/main/java/com/yeshi/fanli/mapping/pdd/PDDOrderMapper.xml
@@ -44,6 +44,12 @@
        <result column="po_create_time" property="createTime" jdbcType="TIMESTAMP" />
        <result column="po_update_time" property="updateTime" jdbcType="TIMESTAMP" />
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">po_id,po_order_sn,po_goods_id,po_group_id,po_goods_name,po_goods_thumbnail_url,po_goods_quantity,po_goods_price,po_order_amount,po_p_id,po_promotion_rate,po_promotion_amount,po_order_status,po_order_status_desc,po_order_create_time,po_order_pay_time,po_order_group_success_time,po_order_verify_time,po_order_modify_at,po_custom_parameters,po_order_settle_time,po_order_id,po_create_time,po_update_time,po_order_receive_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
@@ -225,7 +231,7 @@
    <select id="countOrderNumber" resultType="java.util.HashMap">
    <select id="countOrderNumber" resultMap="ChartMap">
        SELECT IFNULL(COUNT(`po_id`),0) AS showValue,
        <include refid="Column_DateType" />
        FROM `yeshi_ec_pdd_order` t WHERE po_order_create_time IS NOT NULL
fanli/src/main/java/com/yeshi/fanli/mapping/taobao/TaoBaoOrderMapper.xml
@@ -54,6 +54,12 @@
        <result column="to_special_id" property="specialId" jdbcType="VARCHAR" />
        <result column="to_trade_id" property="tradeId" jdbcType="VARCHAR" />
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">to_id,to_create_time,to_click_time,to_pay_time,to_title,to_auction_id,to_manager_wangwang,to_shop,to_count,to_price,to_order_state,to_order_type,to_iratio,to_sratio,to_payment,to_estimate,to_settlement,to_eIncome,to_settlement_time,to_tk_rate,to_tk_money,to_technology_support_percent,to_subsidy_ratio,to_subsidy,to_subsidy_type,to_transaction_platform,to_third_service,to_order_id,to_class_name,to_source_media_id,to_source_media_name,to_ad_position_id,to_ad_position_name,to_latest_updatetime,to_orderby,to_relation_id,to_special_id,to_trade_id
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
@@ -444,7 +450,7 @@
        <if test="dateType == 2">GROUP BY DATE_FORMAT(t.`to_create_time`,'%Y-%m')</if>
        <if test="dateType == 3">GROUP BY DATE_FORMAT(t.`to_create_time`,'%Y')</if>
    </sql>
    <select id="countOrderNumber" resultType="java.util.HashMap">
    <select id="countOrderNumber" resultMap="ChartMap">
        SELECT IFNULL(COUNT(t.`to_id`),0) AS showValue,
        <include refid="Column_DateType" />
        FROM `yeshi_ec_taobao_order` t WHERE t.`to_create_time` IS NOT NULL
fanli/src/main/java/com/yeshi/fanli/mapping/taobao/TaoBaoWeiQuanOrderMapper.xml
@@ -22,6 +22,13 @@
        <result column="tmo_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
        <result column="tmo_settlement" property="settlement" jdbcType="DECIMAL" />
    </resultMap>
    <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
        <result column="showDate" property="showDate" jdbcType="VARCHAR" />
        <result column="showValue" property="showValue" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List">tmo_id,tmo_order_id,tmo_order_item_id,tmo_goods_name,tmo_money,tmo_fan_money,tmo_state,tmo_jiesuan_time,tmo_weiquan_time,tmo_weiquan_finish_time,tmo_createtime,tmo_updatetime,tmo_settlement
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
@@ -183,7 +190,7 @@
        <if test="dateType == 2">GROUP BY DATE_FORMAT(t.`tmo_weiquan_time`,'%Y-%m')</if>
        <if test="dateType == 3">GROUP BY DATE_FORMAT(t.`tmo_weiquan_time`,'%Y')</if>
    </sql>
    <select id="countWeiQaunOrderNumber" resultType="java.util.HashMap">
    <select id="countWeiQaunOrderNumber" resultMap="ChartMap">
        SELECT IFNULL(COUNT(t.`tmo_id`),0) AS showValue,
        <include refid="Column_DateType" />
        FROM yeshi_ec_taobao_weiqaun_order t WHERE t.`tmo_createtime`IS NOT
@@ -192,7 +199,7 @@
        <include refid="Count_Group_DateType" />
        ORDER BY t.`tmo_weiquan_time`
    </select>
    <select id="countWeiQaunOrderMoney" resultType="java.util.HashMap">
    <select id="countWeiQaunOrderMoney" resultMap="ChartMap">
        SELECT CAST(SUM(t.`tmo_fan_money`)AS DECIMAL(19,2)) AS showValue,
        <include refid="Column_DateType" />
        FROM yeshi_ec_taobao_weiqaun_order t WHERE t.`tmo_createtime` IS NOT
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserSystemCouponCountMapper.xml
@@ -61,7 +61,11 @@
    
    <association property="userSystemCoupon" column="ucr_user_coupon_id" 
        resultMap="com.yeshi.fanli.dao.mybatis.user.UserSystemCouponMapper.BaseResultMap"/>
  </resultMap>
        
  <resultMap id="ChartMap" type="com.yeshi.fanli.dto.ChartTDO">
    <result column="showDate" property="showDate" jdbcType="VARCHAR" />
    <result column="showValue" property="showValue" jdbcType="VARCHAR" />
  </resultMap>
  
  <select id="listRebateCoupon" resultMap="BaseResultMap">
@@ -268,7 +272,7 @@
        </if>
  </select>
  
  <select id="getRebateCouponUsedNumToCharts" resultType="java.util.HashMap">
  <select id="getRebateCouponUsedNumToCharts" resultMap="ChartMap">
      SELECT IFNULL(COUNT(c.`usc_id`),0) AS showValue,
          <if test="dateType == 1">
            DATE_FORMAT(c.`usc_use_time`,'%Y-%m-%d') AS 'showDate'
@@ -305,7 +309,7 @@
  </select>
  
  
  <select id="getRebateCouponMoneyToCharts" resultType="java.util.HashMap">
  <select id="getRebateCouponMoneyToCharts" resultMap="ChartMap">
      SELECT IFNULL(SUM(c.`hb_money`),0) AS showValue,
          <if test="dateType == 1">
            DATE_FORMAT(c.`hb_get_time`,'%Y-%m-%d') AS 'showDate'
@@ -340,7 +344,7 @@
    ORDER BY c.`hb_get_time`
  </select>
  <select id="getFreeCouponMoneyToCharts" resultType="java.util.HashMap">
  <select id="getFreeCouponMoneyToCharts" resultMap="ChartMap">
       SELECT IFNULL(SUM(v2.`hb_money`),0) AS showValue,
          <if test="dateType == 1">
            DATE_FORMAT(v2.`hb_get_time`,'%Y-%m-%d') AS 'showDate'
fanli/src/main/java/com/yeshi/fanli/service/impl/count/CommonOrderCountServiceImpl.java
@@ -3,7 +3,6 @@
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -17,6 +16,7 @@
import com.yeshi.fanli.dao.mybatis.pdd.PDDOrderMapper;
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoWeiQuanOrderMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.service.inter.order.CommonOrderCountService;
import com.yeshi.fanli.util.Constant;
@@ -43,19 +43,16 @@
        return commonOrderCountMapper.countByState(state);
    }
    public List<Map<String, Object>> dayFactory(String startTime, String endTime, List<Map<String, Object>> list)
    public List<ChartTDO> dayFactory(String startTime, String endTime, List<ChartTDO> list)
            throws Exception {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        if (startTime.equals(endTime)) {
            Map<String, Object> map = list.get(0);
            Object total = map.get("showValue");
            if (total == null) {
                map.put("showValue", 0);
            ChartTDO chartTDO = list.get(0);
            String showValue = chartTDO.getShowValue();
            if (showValue == null) {
                chartTDO.setShowValue("0");
            }
            listObject.add(map);
            listObject.add(chartTDO);
            return listObject;
        }
@@ -67,27 +64,22 @@
                plusDay = DateUtil.plusDay(i, startTime);
            }
            Map<String, Object> mapObject = new HashMap<String, Object>();
            Object total = null;
            String total = null;
            for (int j = 0; j < list.size(); j++) {
                Map<String, Object> map = list.get(j);
                Object createDate = map.get("showDate");
                String month = createDate.toString();
                if (plusDay.equalsIgnoreCase(month)) {
                    total = map.get("showValue");
                ChartTDO chartTDO = list.get(j);
                String showDate = chartTDO.getShowDate();
                if (plusDay.equalsIgnoreCase(showDate)) {
                    total = chartTDO.getShowValue();
                    break;
                }
            }
            if (total == null) {
                total = 0;
                total = "0";
            }
            mapObject.put("showValue", total);
            mapObject.put("showDate", plusDay);
            listObject.add(mapObject);
            ChartTDO chartTDO = new ChartTDO();
            chartTDO.setShowDate(plusDay);
            chartTDO.setShowValue(total);
            listObject.add(chartTDO);
            if (plusDay.equals(endTime)) {
                break; // 时间结束
@@ -97,74 +89,64 @@
        return listObject;
    }
    public List<Map<String, Object>> monthFactory(List<Map<String, Object>> list) {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
    public List<ChartTDO> monthFactory(List<ChartTDO> list) {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        // 12 个月处理
        for (int i = 1; i <= 12; i++) {
            Map<String, Object> mapObject = new HashMap<String, Object>();
            Object total = null;
            String total = null;
            for (int j = 0; j < list.size(); j++) {
                Map<String, Object> map = list.get(j);
                Object createDate = map.get("showDate");
                String month = createDate.toString();
                ChartTDO chartTDO = list.get(j);
                String month =chartTDO.getShowDate();
                if ((i + "").equalsIgnoreCase(month) || i == Integer.parseInt(month)) {
                    total = map.get("showValue");
                    total = chartTDO.getShowValue();
                    break;
                }
            }
            if (total == null) {
                total = 0;
                total = "0";
            }
            mapObject.put("showValue", total);
            ChartTDO chartTDO = new ChartTDO();
            chartTDO.setShowValue(total);
            if (i < 10) {
                mapObject.put("showDate", "0" + i);
                chartTDO.setShowDate("0" + i);
            } else {
                mapObject.put("showDate", i);
                chartTDO.setShowDate(i + "");
            }
            listObject.add(mapObject);
            listObject.add(chartTDO);
        }
        return listObject;
    }
    public List<Map<String, Object>> yearFactory(List<Map<String, Object>> list) {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
    public List<ChartTDO> yearFactory(List<ChartTDO> list) {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        for (int i = 0; i < list.size(); i++) {
            Map<String, Object> map = list.get(i);
            Object total = map.get("showValue");
            if (total == null) {
                total = 0;
            ChartTDO chartTDO = list.get(i);
            String showValue = chartTDO.getShowValue();
            if (showValue == null) {
                chartTDO.setShowValue("0");
            }
            map.put("showValue", total);
            listObject.add(map);
            listObject.add(chartTDO);
        }
        return listObject;
    }
    @Override
    public List<Map<String, Object>> getTrackAccuracyRate(Integer dateType, String year, String startTime,
    public List<ChartTDO> getTrackAccuracyRate(Integer dateType, String year, String startTime,
            String endTime, int sourceType) throws Exception {
        List<Map<String, Object>> result_list = null;
        List<ChartTDO> result_list = null;
        // 用户订单
        List<Map<String, Object>> listTotal = commonOrderCountMapper.countOrderNumber(dateType, year, startTime,
        List<ChartTDO> listTotal = commonOrderCountMapper.countOrderNumber(dateType, year, startTime,
                endTime, sourceType);
        if (listTotal == null || listTotal.size() == 0) {
            return result_list;
        }
        // 淘宝联盟
        List<Map<String, Object>> type_list = null;
        List<ChartTDO> type_list = null;
        switch (sourceType) {
        case Constant.SOURCE_TYPE_TAOBAO:
            type_list = taoBaoOrderMapper.countOrderNumber(dateType, year, startTime, endTime);
@@ -197,44 +179,39 @@
        DecimalFormat df = new DecimalFormat("#.00");
        for (int i = 0; i < result_list.size(); i++) {
            double proportion = 0;
            Map<String, Object> resultMap = result_list.get(i);
            Object showDate = resultMap.get("showDate");
            ChartTDO chartTDO = result_list.get(i);
            String showDate = chartTDO.getShowDate();
            for (int j = 0; j < listTotal.size(); j++) {
                Map<String, Object> innerMap = listTotal.get(j);
                Object innerDate = innerMap.get("showDate");
                ChartTDO innerChartTDO = listTotal.get(j);
                String innerDate = innerChartTDO.getShowDate();
                if (innerDate != null && innerDate.toString().equals(showDate.toString())) {
                    Object innerValue = innerMap.get("showValue");
                    long innerData = Long.parseLong(innerValue.toString());
                    String innerValue = innerChartTDO.getShowValue();
                    long innerData = Long.parseLong(innerValue);
                    Object showValue = resultMap.get("showValue");
                    long showData = Long.parseLong(showValue.toString());
                    String showValue = chartTDO.getShowValue();
                    long showData = Long.parseLong(showValue);
                    if (showData > 0) {
                        proportion = innerData / (double) showData;
                    }
                    break; // 结束内部循环
                }
            }
            resultMap.put("showValue", Double.parseDouble(df.format(proportion * 100)));
            chartTDO.setShowValue(Double.parseDouble(df.format(proportion * 100)) + "");
        }
        return result_list;
    }
    @Override
    public List<Map<String, Object>> countWeiQaunOrderMoney(Integer dateType, String year, String startTime,
    public List<ChartTDO> countWeiQaunOrderMoney(Integer dateType, String year, String startTime,
            String endTime) throws Exception {
        return taoBaoWeiQuanOrderMapper.countWeiQaunOrderMoney(dateType, year, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countWeiQaunOrderNumber(Integer dateType, String year, String startTime,
    public List<ChartTDO> countWeiQaunOrderNumber(Integer dateType, String year, String startTime,
            String endTime) throws Exception {
        return taoBaoWeiQuanOrderMapper.countWeiQaunOrderNumber(dateType, year, startTime, endTime);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java
@@ -4,9 +4,7 @@
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@@ -20,6 +18,7 @@
import com.yeshi.fanli.dao.mybatis.order.OrderMapper;
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoWeiQuanOrderMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.order.CommonOrderService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
@@ -55,23 +54,24 @@
    @Resource
    private TaoBaoWeiQuanOrderMapper taoBaoWeiQuanOrderMapper;
    public List<Map<String, Object>> dayFactory(String startTime, String endTime, List<Map<String, Object>> list)
    public List<ChartTDO> dayFactory(String startTime, String endTime, List<ChartTDO> list)
            throws Exception {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        if (startTime.equals(endTime)) {
            Map<String, Object> map = list.get(0);
            Object total = map.get("showValue");
            ChartTDO chartTDO = list.get(0);
            String total = chartTDO.getShowValue();
            if (total == null) {
                map.put("showValue", 0);
                chartTDO.setShowValue("0");
            }
            listObject.add(map);
            listObject.add(chartTDO);
            return listObject;
        }
        String plusDay = "";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/MM/dd");
        for (int i = 0; i < 1000; i++) {
            if (i == 0) {
                plusDay = startTime;
@@ -79,31 +79,25 @@
                plusDay = DateUtil.plusDay(i, startTime);
            }
            Map<String, Object> mapObject = new HashMap<String, Object>();
            Object total = null;
            String total = null;
            ChartTDO chart = new ChartTDO();
            for (int j = 0; j < list.size(); j++) {
                Map<String, Object> map = list.get(j);
                Object createDate = map.get("showDate");
                ChartTDO chartTDO  = list.get(j);
                String createDate = chartTDO.getShowDate();
                String month = createDate.toString();
                if (plusDay.equalsIgnoreCase(month)) {
                    total = map.get("showValue");
                    total = chartTDO.getShowValue();
                    break;
                }
            }
            if (total == null) {
                total = 0;
                total = "0";
            }
            mapObject.put("showValue", total);
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/MM/dd");
            chart.setShowValue(total);
            Date parseDate = sdf.parse(plusDay.toString());
            mapObject.put("showDate", sdf2.format(parseDate));
            listObject.add(mapObject);
            chart.setShowDate(sdf2.format(parseDate));
            listObject.add(chart);
            if (plusDay.equals(endTime)) {
                break; // 时间结束
@@ -113,86 +107,79 @@
        return listObject;
    }
    public List<Map<String, Object>> monthFactory(List<Map<String, Object>> list) {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
    public List<ChartTDO> monthFactory(List<ChartTDO> list) {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        // 12 个月处理
        for (int i = 1; i <= 12; i++) {
            Map<String, Object> mapObject = new HashMap<String, Object>();
            Object total = null;
            String total = null;
            for (int j = 0; j < list.size(); j++) {
                Map<String, Object> map = list.get(j);
                Object createDate = map.get("showDate");
                ChartTDO chartTDO = list.get(j);
                String createDate = chartTDO.getShowDate();
                String month = createDate.toString();
                if ((i + "").equalsIgnoreCase(month) || i == Integer.parseInt(month)) {
                    total = map.get("showValue");
                    total = chartTDO.getShowValue();
                    break;
                }
            }
            if (total == null) {
                total = 0;
                total = "0";
            }
            mapObject.put("showValue", total);
            mapObject.put("showDate", i + "月");
            ChartTDO mapObject = new ChartTDO();
            mapObject.setShowValue(total);
            mapObject.setShowDate(i + "月");
            listObject.add(mapObject);
        }
        return listObject;
    }
    public List<Map<String, Object>> yearFactory(List<Map<String, Object>> list) {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
    public List<ChartTDO> yearFactory(List<ChartTDO> list) {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        for (int i = 0; i < list.size(); i++) {
            Map<String, Object> map = list.get(i);
            Object total = map.get("showValue");
            if (total == null) {
                total = 0;
            ChartTDO chartTDO = list.get(i);
            String showValue = chartTDO.getShowValue();
            if (showValue == null) {
                showValue = "0";
            }
            map.put("showValue", total);
            listObject.add(map);
            chartTDO.setShowValue(showValue);
            listObject.add(chartTDO);
        }
        return listObject;
    }
    @Override
    public List<Map<String, Object>> countHongBaoMoney(String channel, Integer dateType, Integer state, String year,
    public List<ChartTDO> countHongBaoMoney(String channel, Integer dateType, Integer state, String year,
            String startTime, String endTime) throws Exception {
        return hongBaoV2CountMapper.countHongBaoMoney(channel, dateType, state, year, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countHongBaoNum(String channel, Integer dateType, Integer state, String year,
    public List<ChartTDO> countHongBaoNum(String channel, Integer dateType, Integer state, String year,
            String startTime, String endTime) throws Exception {
        return hongBaoV2CountMapper.countHongBaoNum(channel, dateType, state, year, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countHongBaoType(Integer dateType, Integer type, String year, String startTime,
    public List<ChartTDO> countHongBaoType(Integer dateType, Integer type, String year, String startTime,
            String endTime) throws Exception {
        return hongBaoV2CountMapper.countHongBaoType(dateType, type, year, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> getProportionByType(Integer dateType, Integer type, String year, String startTime,
    public List<ChartTDO> getProportionByType(Integer dateType, Integer type, String year, String startTime,
            String endTime) throws Exception {
        List<Map<String, Object>> result_list = null;
        List<ChartTDO> result_list = null;
        List<Map<String, Object>> listTotal = hongBaoV2CountMapper.countHongBaoTotalNum(dateType, year, startTime,
        List<ChartTDO> listTotal = hongBaoV2CountMapper.countHongBaoTotalNum(dateType, year, startTime,
                endTime);
        if (listTotal == null || listTotal.size() == 0) {
            return result_list;
        }
        List<Map<String, Object>> type_list = hongBaoV2CountMapper.countHongBaoType(dateType, type, year, startTime,
        List<ChartTDO> type_list = hongBaoV2CountMapper.countHongBaoType(dateType, type, year, startTime,
                endTime);
        if (type_list == null || type_list.size() == 0) {
@@ -214,33 +201,25 @@
        }
        for (int i = 0; i < result_list.size(); i++) {
            float proportion = 0;
            Map<String, Object> resultMap = result_list.get(i);
            Object showDate = resultMap.get("showDate");
            ChartTDO chartTDO = result_list.get(i);
            String showDate = chartTDO.getShowDate();
            for (int j = 0; j < listTotal.size(); j++) {
                Map<String, Object> innerMap = result_list.get(j);
                Object innerDate = innerMap.get("showDate");
                if (innerDate != null && innerDate.toString().equals(showDate.toString())) {
                    Object innerValue = innerMap.get("showValue");
                    long innerData = Long.parseLong(innerValue.toString());
                    Object showValue = resultMap.get("showValue");
                    long showData = Long.parseLong(showValue.toString());
                ChartTDO innerChart = result_list.get(j);
                String innerDate = innerChart.getShowDate();
                if (innerDate != null && innerDate.equals(showDate)) {
                    String innerValue = innerChart.getShowValue();
                    long innerData = Long.parseLong(innerValue);
                    String showValue = chartTDO.getShowValue();
                    long showData = Long.parseLong(showValue);
                    if (showData > 0) {
                        proportion = innerData / showData;
                    }
                    break; // 结束内部循环
                }
            }
            resultMap.put("showValue", proportion);
            chartTDO.setShowValue(proportion+"");
        }
        return result_list;
    }
@@ -275,7 +254,7 @@
    }
    @Override
    public List<Map<String, Object>> count24HOderByChannel(String channel, Integer type, String years, String startTime,
    public List<ChartTDO> count24HOderByChannel(String channel, Integer type, String years, String startTime,
            String endTime) throws Exception {
        return hongBaoV2CountMapper.count24HOderByChannel(channel, type, years, startTime, endTime);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserInfoCountServiceImpl.java
@@ -4,7 +4,6 @@
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -15,6 +14,7 @@
import com.yeshi.fanli.dao.mybatis.UserInfoCountMapper;
import com.yeshi.fanli.dao.mybatis.UserInfoMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.service.inter.count.UserInfoCountService;
import com.yeshi.fanli.vo.user.UserGoldCoinVO;
@@ -55,27 +55,26 @@
    }
    
    @Override
    public List<Map<String, Object>> countNewUserByDate(String channel,Integer type,String years, String startTime,
    public List<ChartTDO> countNewUserByDate(String channel,Integer type,String years, String startTime,
            String endTime) throws Exception {
        return userInfoMapper.countNewUserByDate(channel, type, years, startTime, endTime);
        
    }
    @Override
    public List<Map<String, Object>> getTodayBuyRate(String channel, Integer dateType,String years, String startTime,
    public List<ChartTDO> getTodayBuyRate(String channel, Integer dateType,String years, String startTime,
            String endTime) throws Exception {
        
        List<Map<String, Object>> result_list = null;
        List<ChartTDO> result_list = null;
        
        List<Map<String, Object>> listToday =
        List<ChartTDO> listToday =
                userInfoMapper.getTodayHasOrder(channel, dateType, years, startTime, endTime);
        
        if (listToday == null || listToday.size() == 0) {
            return result_list;
        } 
        
        List<Map<String, Object>> listTotal =
                userInfoMapper.countNewUserByDate(channel, dateType, years, startTime, endTime);
        List<ChartTDO> listTotal = userInfoMapper.countNewUserByDate(channel, dateType, years, startTime, endTime);
        
        if (listTotal == null || listTotal.size() == 0) {
            return result_list;
@@ -98,50 +97,40 @@
        DecimalFormat df = new DecimalFormat("#.00");
        
        for (int i = 0; i < result_list.size(); i++) {
            double proportion = 0;
            Map<String, Object> resultMap = result_list.get(i);
            Object showDate = resultMap.get("showDate");
            ChartTDO chartTDO = result_list.get(i);
            String showDate = chartTDO.getShowDate();
            for (int j = 0; j < listToday.size(); j++) {
                ChartTDO innerTDO =  listToday.get(j);
                String innerDate = innerTDO.getShowDate();
                if (innerDate != null && innerDate.equals(showDate)) {
                    String innerValue = innerTDO.getShowValue();
                    long innerData = Long.parseLong(innerValue);
                
                Map<String, Object> innerMap = listToday.get(j);
                Object innerDate = innerMap.get("showDate");
                if (innerDate != null && innerDate.toString().equals(showDate.toString())) {
                    Object innerValue = innerMap.get("showValue");
                    long innerData = Long.parseLong(innerValue.toString());
                    Object showValue = resultMap.get("showValue");
                    long showData = Long.parseLong(showValue.toString());
                    String showValue = chartTDO.getShowValue();
                    long showData = Long.parseLong(showValue);
                    
                    if (showData > 0) {
                        proportion =  innerData/(double)showData;
                    }
                    break; // 结束内部循环
                }
            }
            resultMap.put("showValue", Double.parseDouble(df.format(proportion *100)));
            chartTDO.setShowValue(Double.parseDouble(df.format(proportion *100)) + "");
        }
        return result_list;
    }
    
    
    @Override
    public List<Object> getWeekBuyRate(String channel, String startTime, String endTime,
            Integer orderNum, List<String> dateList)
            throws Exception {
            Integer orderNum, List<String> dateList) throws Exception {
        List<Object> resultList = new ArrayList<Object>();
        if (dateList == null || dateList.size() == 0) {
            return resultList;
        }
        List<Map<String, Object>> totalList = userInfoMapper.countNewUserByDate(channel, 1, null, startTime, endTime);
        List<ChartTDO> totalList = userInfoMapper.countNewUserByDate(channel, 1, null, startTime, endTime);
        if (totalList == null || totalList.size() == 0) {
            return resultList;
        }
@@ -149,24 +138,21 @@
        DecimalFormat df = new DecimalFormat("#.00");
        for (int i = 0; i < dateList.size(); i++) {
            double proportion = 0;
            String showDate = dateList.get(i);
            String plusDay = DateUtil.plusDay(7, showDate);
            Map<String, Object> map = userInfoMapper.getWeekHasOrder(channel, showDate, plusDay, orderNum);
            ChartTDO chartTDO = userInfoMapper.getWeekHasOrder(channel, showDate, plusDay, orderNum);
            Object showValue = null;
            if (map != null) {
                showValue = map.get("showValue");
            String showValue = null;
            if (chartTDO != null) {
                showValue = chartTDO.getShowValue();
                if (showValue != null) {
                    for (int j = 0; j < totalList.size(); j++) {
                        Map<String, Object> mapTotal = totalList.get(j);
                        String reslutTime = mapTotal.get("showDate").toString();
                        ChartTDO chart = totalList.get(j);
                        String reslutTime = chart.getShowDate();
                        if (showDate.equalsIgnoreCase(reslutTime)) {
                            Object totalObject = mapTotal.get("showValue");
                            long hasCount = Long.parseLong(showValue.toString());
                            long total = Long.parseLong(totalObject.toString());
                            String totalObject = chart.getShowValue();
                            long hasCount = Long.parseLong(showValue);
                            long total = Long.parseLong(totalObject);
                            if (total > 0) {
                                proportion = hasCount / (double) total;
@@ -184,18 +170,15 @@
    }
    
    
    public List<Map<String, Object>> dayFactory(String startTime, String endTime, List<Map<String, Object>> list) throws Exception {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
    public List<ChartTDO> dayFactory(String startTime, String endTime, List<ChartTDO> list) throws Exception {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        if (startTime.equals(endTime)) {
            Map<String, Object> map = list.get(0);
            Object total = map.get("showValue");
            if (total == null) {
                map.put("showValue", 0);
            ChartTDO chartTDO = list.get(0);
            String showValue = chartTDO.getShowValue();
            if (showValue == null) {
                chartTDO.setShowValue("0");
            }
            listObject.add(map);
            listObject.add(chartTDO);
            return listObject;
        }
@@ -207,27 +190,24 @@
                plusDay = DateUtil.plusDay(i, startTime);
            }
            Map<String, Object> mapObject = new HashMap<String, Object>();
            Object total = null;
            String total = null;
            for (int j = 0; j < list.size(); j++) {
                Map<String, Object> map = list.get(j);
                Object createDate = map.get("showDate");
                String month = createDate.toString();
                ChartTDO chartTDO = list.get(j);
                String month = chartTDO.getShowDate();
                if (plusDay.equalsIgnoreCase(month)) {
                    total = map.get("showValue");
                    total = chartTDO.getShowValue();
                    break;
                }
            }
            if (total == null) {
                total = 0;
                total = "0";
            }
            mapObject.put("showValue", total);
            mapObject.put("showDate", plusDay);
            listObject.add(mapObject);
            ChartTDO chartTDO = new ChartTDO();
            chartTDO.setShowValue(total);
            chartTDO.setShowDate(plusDay);
            listObject.add(chartTDO);
            if (plusDay.equals(endTime)) {
                break; // 时间结束
@@ -237,56 +217,48 @@
        return listObject;
    }
    public List<Map<String, Object>> monthFactory(List<Map<String, Object>> list) {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
    public List<ChartTDO> monthFactory(List<ChartTDO> list) {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        // 12 个月处理
        for (int i = 1; i <= 12; i++) {
            Map<String, Object> mapObject = new HashMap<String, Object>();
            Object total = null;
            String total = null;
            for (int j = 0; j < list.size(); j++) {
                Map<String, Object> map = list.get(j);
                Object createDate = map.get("showDate");
                String month = createDate.toString();
                ChartTDO chartTDO  = list.get(j);
                String month = chartTDO.getShowDate();
                if ((i + "").equalsIgnoreCase(month) || i == Integer.parseInt(month)) {
                    total = map.get("showValue");
                    total = chartTDO.getShowValue();
                    break;
                }
            }
            if (total == null) {
                total = 0;
                total = "0";
            }
            mapObject.put("showValue", total);
            ChartTDO chartTDO = new ChartTDO();
            chartTDO.setShowValue(total);
            
            if (i <10) {
                mapObject.put("showDate", "0"+ i);
                chartTDO.setShowDate( "0"+ i);
            } else {
                mapObject.put("showDate", i);
                chartTDO.setShowDate( ""+ i);
            }
            listObject.add(mapObject);
            listObject.add(chartTDO);
        }
        return listObject;
    }
    public List<Map<String, Object>> yearFactory(List<Map<String, Object>> list) {
        List<Map<String, Object>> listObject = new ArrayList<Map<String, Object>>();
    public List<ChartTDO> yearFactory(List<ChartTDO> list) {
        List<ChartTDO> listObject = new ArrayList<ChartTDO>();
        for (int i = 0; i < list.size(); i++) {
            Map<String, Object> map = list.get(i);
            Object total = map.get("showValue");
            ChartTDO chartTDO = list.get(i);
            String total = chartTDO.getShowValue();
            if (total == null) {
                total = 0;
                total = "0";
            }
            map.put("showValue", total);
            listObject.add(map);
            chartTDO.setShowValue(total);
            listObject.add(chartTDO);
        }
        return listObject;
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/count/UserSystemCouponCountServiceImpl.java
@@ -3,7 +3,6 @@
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@@ -11,6 +10,7 @@
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.user.UserSystemCouponCountMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
import com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord;
@@ -262,19 +262,19 @@
    
    
    @Override
    public List<Map<String, Object>> getRebateCouponUsedNumToCharts(Integer dateType,  String year,
    public List<ChartTDO> getRebateCouponUsedNumToCharts(Integer dateType,  String year,
            String startTime, String endTime){
        return userSystemCouponCountMapper.getRebateCouponUsedNumToCharts(dateType, year, startTime, endTime);
    }
    
    @Override
    public List<Map<String, Object>> getRebateCouponMoneyToCharts(Integer dateType,  String year,
    public List<ChartTDO> getRebateCouponMoneyToCharts(Integer dateType,  String year,
            String startTime, String endTime){
        return userSystemCouponCountMapper.getRebateCouponMoneyToCharts(dateType, year, startTime, endTime);
    }
    
    @Override
    public List<Map<String, Object>> getFreeCouponMoneyToCharts(Integer dateType,  String year, String startTime,
    public List<ChartTDO> getFreeCouponMoneyToCharts(Integer dateType,  String year, String startTime,
            String endTime, String couponType){
        return userSystemCouponCountMapper.getFreeCouponMoneyToCharts(dateType, year, startTime, endTime, couponType);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractAuditRecordServiceImpl.java
@@ -9,6 +9,7 @@
import com.google.gson.Gson;
import com.yeshi.fanli.dao.mybatis.ExtractAuditRecordMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.dto.money.ExtractOrderStatisticDTO;
import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
import com.yeshi.fanli.service.inter.money.extract.ExtractAuditRecordService;
@@ -106,19 +107,19 @@
    }
    @Override
    public List<Map<String, Object>> countAuditTotal(Integer state, Integer type, String years, String startTime,
    public List<ChartTDO> countAuditTotal(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception {
        return extractAuditRecordMapper.countAuditTotal(state, type, years, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countExtractApplyMoney(Integer state, Integer type, String years, String startTime,
    public List<ChartTDO> countExtractApplyMoney(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception {
        return extractAuditRecordMapper.countExtractMoney(state, type, years, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countExtractApplyNumber(Integer state, Integer type, String years,
    public List<ChartTDO> countExtractApplyNumber(Integer state, Integer type, String years,
            String startTime, String endTime) throws Exception {
        return extractAuditRecordMapper.countExtractApplyNumber(state, type, years, startTime, endTime);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java
@@ -13,6 +13,7 @@
import org.springframework.transaction.annotation.Transactional;
import com.yeshi.fanli.dao.mybatis.order.LostOrderMapper;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
import com.yeshi.fanli.entity.bus.user.LostOrder;
import com.yeshi.fanli.entity.bus.user.Order;
@@ -314,13 +315,13 @@
    }
    @Override
    public List<Map<String, Object>> countLostNum(Integer dateType, Integer resultCode, String year, String startTime,
    public List<ChartTDO> countLostNum(Integer dateType, Integer resultCode, String year, String startTime,
            String endTime) throws Exception {
        return lostOrderMapper.countLostNum(dateType, resultCode, year, startTime, endTime);
    }
    @Override
    public List<Map<String, Object>> countAppealMoney(Integer dateType, String year, String startTime, String endTime)
    public List<ChartTDO> countAppealMoney(Integer dateType, String year, String startTime, String endTime)
            throws Exception {
        return lostOrderMapper.countAppealMoney(dateType, year, startTime, endTime);
    }
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java
@@ -3,8 +3,8 @@
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.vo.order.HongBaoV2VO;
public interface HongBaoV2CountService {
@@ -52,7 +52,7 @@
     *            结束时间
     * @return
     */
    public List<Map<String, Object>> countHongBaoMoney(String channel, Integer dateType, Integer state, String year,
    public List<ChartTDO> countHongBaoMoney(String channel, Integer dateType, Integer state, String year,
            String startTime, String endTime) throws Exception;
    /**
@@ -72,7 +72,7 @@
     *            结束时间
     * @return
     */
    public List<Map<String, Object>> countHongBaoNum(String channel, Integer dateType, Integer state, String year,
    public List<ChartTDO> countHongBaoNum(String channel, Integer dateType, Integer state, String year,
            String startTime, String endTime) throws Exception;
    /**
@@ -86,7 +86,7 @@
     * @return
     * @throws Exception
     */
    public List<Map<String, Object>> getProportionByType(Integer dateType, Integer type, String year, String startTime,
    public List<ChartTDO> getProportionByType(Integer dateType, Integer type, String year, String startTime,
            String endTime) throws Exception;
    /**
@@ -123,7 +123,7 @@
     */
    public Date getLastHongBaoTime(Long uid);
    public List<Map<String, Object>> count24HOderByChannel(String channel, Integer type, String years, String startTime,
    public List<ChartTDO> count24HOderByChannel(String channel, Integer type, String years, String startTime,
            String endTime) throws Exception;
    /**
@@ -137,7 +137,7 @@
     * @return
     * @throws Exception
     */
    public List<Map<String, Object>> countHongBaoType(Integer dateType, Integer type, String year, String startTime,
    public List<ChartTDO> countHongBaoType(Integer dateType, Integer type, String year, String startTime,
            String endTime) throws Exception;
    /**
fanli/src/main/java/com/yeshi/fanli/service/inter/count/UserInfoCountService.java
@@ -2,8 +2,8 @@
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.vo.user.UserGoldCoinVO;
@@ -51,11 +51,11 @@
     * 统计新增用户
     * @return
     */
    public List<Map<String, Object>> countNewUserByDate(String channel,Integer type,String years, String startTime, String endTime) throws Exception;
    public List<ChartTDO> countNewUserByDate(String channel,Integer type,String years, String startTime, String endTime) throws Exception;
    
    
    public List<Map<String, Object>> getTodayBuyRate(String channel, Integer type, String years, String startTime,
    public List<ChartTDO> getTodayBuyRate(String channel, Integer type, String years, String startTime,
            String endTime) throws Exception;
    
fanli/src/main/java/com/yeshi/fanli/service/inter/count/UserSystemCouponCountService.java
@@ -1,8 +1,8 @@
package com.yeshi.fanli.service.inter.count;
import java.util.List;
import java.util.Map;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.vo.user.SystemCouponVO;
import com.yeshi.fanli.vo.user.UserSystemCouponCountVO;
@@ -82,7 +82,7 @@
     * @param endTime
     * @return
     */
    public List<Map<String, Object>> getRebateCouponUsedNumToCharts(Integer dateType, String year, String startTime,
    public List<ChartTDO> getRebateCouponUsedNumToCharts(Integer dateType, String year, String startTime,
            String endTime);
    /**
@@ -93,7 +93,7 @@
     * @param endTime
     * @return
     */
    public List<Map<String, Object>> getRebateCouponMoneyToCharts(Integer dateType, String year, String startTime,
    public List<ChartTDO> getRebateCouponMoneyToCharts(Integer dateType, String year, String startTime,
            String endTime);
    /**
@@ -105,7 +105,7 @@
     * @param couponType
     * @return
     */
    public List<Map<String, Object>> getFreeCouponMoneyToCharts(Integer dateType, String year, String startTime,
    public List<ChartTDO> getFreeCouponMoneyToCharts(Integer dateType, String year, String startTime,
            String endTime, String couponType);
    
}
fanli/src/main/java/com/yeshi/fanli/service/inter/money/extract/ExtractAuditRecordService.java
@@ -1,8 +1,8 @@
package com.yeshi.fanli.service.inter.money.extract;
import java.util.List;
import java.util.Map;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.ExtractAuditRecord;
public interface ExtractAuditRecordService {
@@ -121,7 +121,7 @@
     * @param endTime
     * @return
     */
    public List<Map<String, Object>>countAuditTotal(Integer state, Integer type, String years, String startTime,
    public List<ChartTDO>countAuditTotal(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception;
    
    
@@ -135,7 +135,7 @@
     * @param endTime
     * @return
     */
    public List<Map<String, Object>> countExtractApplyMoney(Integer state, Integer type, String years, String startTime,
    public List<ChartTDO> countExtractApplyMoney(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception;
    /**
@@ -147,7 +147,7 @@
     * @param endTime
     * @return
     */
    public List<Map<String, Object>> countExtractApplyNumber(Integer state, Integer type, String years, String startTime,
    public List<ChartTDO> countExtractApplyNumber(Integer state, Integer type, String years, String startTime,
            String endTime) throws Exception;
    
    
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderCountService.java
@@ -4,6 +4,8 @@
import java.util.List;
import java.util.Map;
import com.yeshi.fanli.dto.ChartTDO;
public interface CommonOrderCountService {
@@ -19,7 +21,7 @@
     * @param channel
     * @return
     */
    public List<Map<String, Object>> getTrackAccuracyRate(Integer dateType, String year, String startTime,
    public List<ChartTDO> getTrackAccuracyRate(Integer dateType, String year, String startTime,
            String endTime,int sourceType) throws Exception;
    /**
@@ -31,7 +33,7 @@
     * @return
     * @throws Exception
     */
    public List<Map<String, Object>> countWeiQaunOrderMoney(Integer dateType, String year, String startTime,
    public List<ChartTDO> countWeiQaunOrderMoney(Integer dateType, String year, String startTime,
            String endTime)    throws Exception;
    /**
@@ -43,7 +45,7 @@
     * @return
     * @throws Exception
     */
    public List<Map<String, Object>> countWeiQaunOrderNumber(Integer dateType, String year, String startTime, String endTime)
    public List<ChartTDO> countWeiQaunOrderNumber(Integer dateType, String year, String startTime, String endTime)
            throws Exception;
    /**
fanli/src/main/java/com/yeshi/fanli/service/inter/order/LostOrderService.java
@@ -4,6 +4,7 @@
import java.util.Map;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.bus.user.LostOrder;
public interface LostOrderService {
@@ -106,10 +107,10 @@
     * @return
     * @throws Exception
     */
    public List<Map<String, Object>> countLostNum(Integer dateType, Integer resultCode, String year, String startTime,
    public List<ChartTDO> countLostNum(Integer dateType, Integer resultCode, String year, String startTime,
            String endTime) throws Exception;
    public List<Map<String, Object>> countAppealMoney(Integer dateType, String year, String startTime, String endTime)
    public List<ChartTDO> countAppealMoney(Integer dateType, String year, String startTime, String endTime)
            throws Exception;
    /**
fanli/src/main/java/com/yeshi/fanli/util/DouYinUtil.java
@@ -5,6 +5,12 @@
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
import org.yeshi.utils.HttpUtil;
import org.yeshi.utils.StringUtil;
import com.yeshi.fanli.dto.douyin.DouYinGoods;
import net.sf.json.JSONObject;
public class DouYinUtil {
@@ -31,4 +37,51 @@
        return null;
    }
    /**
     * 通过链接获取商品标题,图片信息
     * @param url
     * @return
     */
    public static DouYinGoods getGoodsInfo(String url) {
        if (StringUtil.isNullOrEmpty(url))
            return null;
        try {
            String id = null;
            int indexOf = url.indexOf("?");
            url = url.substring(indexOf + 1, url.length()-1);
            String[] temp = url.split("&");
            for (int i =0; i < temp.length; i ++) {
                 String content = temp[i];
                if (content.startsWith("id")) {
                    id = content.split("=")[content.split("=").length-1];
                    break;
                }
            }
            if (StringUtil.isNullOrEmpty(id))
                return null;
            // 请求地址
            String requestUrl = "https://ec.snssdk.com/product/fxgajaxstaticitem?b_type_new=0&id=%s";
            // 执行请求
            String result = HttpUtil.get(String.format(requestUrl,id));
            if (!StringUtil.isNullOrEmpty(result)) {
                JSONObject json = JSONObject.fromObject(result);
                JSONObject data = json.getJSONObject("data");
                DouYinGoods goods = new DouYinGoods();
                goods.setId(id);
                goods.setName(data.optString("name"));
                goods.setImg(data.optString("img"));
                return goods;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
@@ -26,6 +26,7 @@
import org.yeshi.utils.BigDecimalUtil;
import org.yeshi.utils.HttpUtil;
import com.yeshi.fanli.dto.GoodsClassDTO;
import com.yeshi.fanli.dto.jd.JDCommissionInfo;
import com.yeshi.fanli.dto.jd.JDCouponInfo;
import com.yeshi.fanli.dto.jd.JDPingouInfo;
@@ -33,7 +34,6 @@
import com.yeshi.fanli.dto.jd.JDSearchResult;
import com.yeshi.fanli.dto.jd.JDShopInfo;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.StringUtil;
@@ -390,6 +390,57 @@
        return BigDecimalUtil.getWithNoZera(MoneyBigDecimalUtil.mul(money, new BigDecimal("0.9")));
    }
    /**
     * 商品佣金计算
     *
     * @param goods
     * @param rate
     * @return
     */
    public static BigDecimal getGoodsFanLiMoneyPlus(JDGoods goods, BigDecimal rate) {
        BigDecimal money = new BigDecimal(0);
        BigDecimal commissionPlus = goods.getCommissionPlus();
        if (commissionPlus == null) {
            return money;
        }
        BigDecimal price = null;
        JDPingouInfo pinGouInfo = goods.getPinGouInfo();
        if (pinGouInfo == null) {
            price = goods.getPrice();
        } else {
            price = pinGouInfo.getPingouPrice();
        }
        JDCouponInfo couponInfo = goods.getCouponInfo();
        if (couponInfo == null) {
            money = MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil
                    .mul(MoneyBigDecimalUtil.mul(price, commissionPlus), new BigDecimal("0.01")),
                    MoneyBigDecimalUtil.div(rate, new BigDecimal(100)));
        } else {
            BigDecimal quota = couponInfo.getQuota();
            BigDecimal discount = couponInfo.getDiscount();
            if (quota.compareTo(price) <= 0 && price.compareTo(discount) > 0) {
                BigDecimal finalPrice = price.subtract(discount);
                money = MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul(
                        MoneyBigDecimalUtil.mul(finalPrice, commissionPlus),
                        new BigDecimal("0.01")), MoneyBigDecimalUtil.div(rate, new BigDecimal(100)));
            } else {// 不能用券
                money = MoneyBigDecimalUtil.mul(
                        MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul(price,commissionPlus),
                                new BigDecimal("0.01")),
                        MoneyBigDecimalUtil.div(rate, new BigDecimal(100)));
            }
        }
        // 返利比例为原来的90%
        return BigDecimalUtil.getWithNoZera(MoneyBigDecimalUtil.mul(money, new BigDecimal("0.9")));
    }
    /**
     * 计算商品券后价,没有券则返回原价
     * 
@@ -629,4 +680,90 @@
        return jdGoods;
    }
    /**
     * 获取类目
     * @param level 等级
     * @param parentId 上级id
     * @return
     */
    public static List<GoodsClassDTO> getCategoryList(int level, int parentId) {
        try {
            // 请求地址
            String requestUrl = "https://union.jd.com/api/help/getCategoryList?level=%s&parentId=%s";
            // 执行请求
            String result = HttpUtil.get(String.format(requestUrl, level, parentId));
            if (!StringUtil.isNullOrEmpty(result)) {
                JSONObject json = JSONObject.fromObject(result);
                JSONArray jsonArray = json.getJSONArray("data");
                if (jsonArray != null && jsonArray.size() > 0) {
                    List<GoodsClassDTO> list = new ArrayList<GoodsClassDTO>();
                    for (int i=0;i <jsonArray.size() ;i ++ ) {
                        Object object = jsonArray.get(i);
                        if (object == null)
                            continue;
                        JSONObject jsonClass = JSONObject.fromObject(object);
                        GoodsClassDTO goodsClass = new GoodsClassDTO();
                        goodsClass.setId(jsonClass.optString("id"));
                        goodsClass.setName(jsonClass.optString("categoryName"));
                        list.add(goodsClass);
                    }
                    return list;
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
    /**
     * 获取类目
     * @param level 等级
     * @param parentId 上级id
     * @return
     */
    public static List<GoodsClassDTO> getCategoryCommiPlus(int level, int parentId) {
        try {
            // 请求地址
            String requestUrl = "https://union.jd.com/api/help/getCategoryCommiPlus?level=%s&parentId=%s";
            // 执行请求
            String result = HttpUtil.get(String.format(requestUrl, level, parentId));
            if (!StringUtil.isNullOrEmpty(result)) {
                JSONObject json = JSONObject.fromObject(result);
                JSONArray jsonArray = json.getJSONArray("data");
                if (jsonArray != null && jsonArray.size() > 0) {
                    List<GoodsClassDTO> list = new ArrayList<GoodsClassDTO>();
                    for (int i=0;i <jsonArray.size() ;i ++ ) {
                        Object object = jsonArray.get(i);
                        if (object == null)
                            continue;
                        JSONObject jsonClass = JSONObject.fromObject(object);
                        GoodsClassDTO goodsClass = new GoodsClassDTO();
                        goodsClass.setId(jsonClass.optString("id"));
                        goodsClass.setName(jsonClass.optString("name"));
                        String selfMobileComm = jsonClass.optString("selfMobileComm");
                        if (!StringUtil.isNullOrEmpty(selfMobileComm))
                            goodsClass.setSelfComm(new BigDecimal(selfMobileComm));
                        String popMobileComm = jsonClass.optString("popMobileComm");
                        if (!StringUtil.isNullOrEmpty(popMobileComm))
                            goodsClass.setPopComm(new BigDecimal(popMobileComm));
                        list.add(goodsClass);
                    }
                    return list;
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
@@ -3,6 +3,7 @@
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
@@ -21,7 +22,9 @@
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
@@ -1964,4 +1967,35 @@
        return taoBaoGoodsBrief;
    }
    /**
     * 抖音返利local 获取真实淘宝链接
     * @param url https://s.click.taobao.com/t?e=m%3D2%26s%3DT9DFpHQCT7Rw4vFB6t2Z2ueEDrYVVa64XoO8tOebS+dRAdhuF14FMR8
     * @return
     */
    public static String getRealUrl(String url) {
        if (StringUtil.isNullOrEmpty(url))
            return null;
        try {
            HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager());
            client.getHttpConnectionManager().getParams().setConnectionTimeout(10000);
            client.getParams().setParameter(HttpMethodParams.USER_AGENT,"Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"); // 让服务器认为是IE
            GetMethod get = new GetMethod(url);
            get.setFollowRedirects(false); // 禁止自动重定向
            int iGetResultCode = client.executeMethod(get);
            String location = get.getResponseHeader("location").getValue(); // 打印地址
            GetMethod get2 = new GetMethod(URLDecoder.decode(location.split("tu=")[1]));
            get2.addRequestHeader("Referer", location);
            get2.setFollowRedirects(false); // 禁止自动重定向
            int iGetResultCode2 = client.executeMethod(get2);
            return get2.getResponseHeader("location").getValue(); // 真实地址
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
    }
}
fanli/src/main/java/com/yeshi/fanli/vo/goods/OtherInfo.java
@@ -28,6 +28,11 @@
    @Expose
    private RewardCouponVO rewardCoupon;
    @Expose
    private String fanliMoneyPlus;
    public RewardCouponVO getRewardCoupon() {
        return rewardCoupon;
    }
@@ -52,4 +57,11 @@
        this.reduceHongBao = reduceHongBao;
    }
    public String getFanliMoneyPlus() {
        return fanliMoneyPlus;
    }
    public void setFanliMoneyPlus(String fanliMoneyPlus) {
        this.fanliMoneyPlus = fanliMoneyPlus;
    }
}
fanli/src/main/java/com/yeshi/fanli/vo/goods/RewardCouponVO.java
@@ -12,6 +12,8 @@
    private JumpDetailV2 jumpDetail;
    @Expose
    private String params;
    @Expose
    private String maxMoneyPlus;
    public String getMaxMoney() {
        return maxMoney;
@@ -45,4 +47,12 @@
        this.params = params;
    }
    public String getMaxMoneyPlus() {
        return maxMoneyPlus;
    }
    public void setMaxMoneyPlus(String maxMoneyPlus) {
        this.maxMoneyPlus = maxMoneyPlus;
    }
}