yujian
2020-05-09 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64
2.1需求
31个文件已修改
17个文件已添加
2844 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/PushGoodsController.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SpecialCardAdminController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/PushController.java 154 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserMoneyControllerV2.java 405 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/dynamic/GoodsEvaluateDao.java 123 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ExtractMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/SpecialExtraMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/order/DateTypeEnum.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/order/OrderMoneyDailyCountDao.java 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/user/ThreeSaleFocusInfoDao.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/user/ThreeSaleFocusDTO.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SpecialExtra.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/ThreeSaleFocusInfo.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/dynamic/GoodsEvaluate.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/order/OrderMoneyDailyCount.java 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/push/PushGoods.java 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/system/ConfigKeyEnum.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/ExtractMapper.xml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SpecialExtraMapper.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialExtraServiceImpl.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderMoneyDailyCountServiceImpl.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java 218 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserCustomSettingsServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/dynamic/GoodsEvaluateService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialExtraService.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/money/extract/ExtractService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/OrderMoneyDailyCountService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/push/PushGoodsService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/homemodule/SpecialVO.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/money/IncomeDetailVO.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/money/MoneyPredictVO.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/money/MoneyStatisticVO.java 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/vo/push/PushRecommendVO.java 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/test/java/org/fanli/MyBatisProduce2.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java
@@ -407,14 +407,14 @@
     * @param out
     */
    @RequestMapping(value = "saveActivityPic")
    public void saveActivityPic(String callback, String pid, ImgInfo imgInfo, HttpServletRequest request,
    public void saveActivityPic(String callback, String pid, ImgInfo imgInfo, String picUrls, HttpServletRequest request,
            PrintWriter out) {
        try {
            MultipartHttpServletRequest fileRequest = null;
            if (request instanceof MultipartHttpServletRequest) {
                fileRequest = (MultipartHttpServletRequest) request;
            }
            goodsEvaluateService.saveActivityPic(pid, imgInfo, fileRequest);
            goodsEvaluateService.saveActivityPic(pid, imgInfo,picUrls, fileRequest);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
        } catch (GoodsEvaluateException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
@@ -436,19 +436,19 @@
        try {
            String videoPic = "";
            String videoUrl = "";
            String activityPic = "";
            String activityUrl = "";
            List<String> list = new ArrayList<String>();
            GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pid);
            if (goodsEvaluate != null && goodsEvaluate.getImgList() != null && goodsEvaluate.getImgList().size() > 0) {
                activityUrl = goodsEvaluate.getJumpLink();
                List<ImgInfo> imgList = goodsEvaluate.getImgList();
                for (ImgInfo imgInfo : imgList) {
                    ImgEnum type = imgInfo.getType();
                    if (type == ImgEnum.video) {
                        videoPic = imgInfo.getUrl();
                        videoUrl = imgInfo.getVideoUrl();
                    } else if (type == ImgEnum.activity) {
                        activityPic = imgInfo.getUrl();
                        activityUrl = imgInfo.getActivityUrl();
                    } else {
                        list.add(imgInfo.getUrl());
                    }
                }
            }
@@ -456,7 +456,7 @@
            JSONObject data = new JSONObject();
            data.put("videoUrl", videoUrl);
            data.put("videoPic", videoPic);
            data.put("activityPic", activityPic);
            data.put("listPic", list);
            data.put("activityUrl", activityUrl);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
@@ -608,8 +608,7 @@
     * @param out
     */
    @RequestMapping(value = "query")
    public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state,
            PrintWriter out) {
    public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state, String typeEnum, PrintWriter out) {
        if (pageIndex == null || pageIndex < 1) {
            pageIndex = 1;
        }
@@ -618,7 +617,7 @@
        }
        try {
            List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 1);
            List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 1, typeEnum);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
@@ -640,7 +639,7 @@
                }
            }
            long count = goodsEvaluateService.count(key, state, 1);
            long count = goodsEvaluateService.count(key, state, 1, typeEnum);
            int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
@@ -675,7 +674,7 @@
        }
        try {
            List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 2);
            List<GoodsEvaluate> list = goodsEvaluateService.query((pageIndex - 1) * pageSize, pageSize, key, state, 2, null);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
@@ -697,7 +696,7 @@
                }
            }
            long count = goodsEvaluateService.count(key, state, 2);
            long count = goodsEvaluateService.count(key, state, 2, null);
            int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
            PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
fanli/src/main/java/com/yeshi/fanli/controller/admin/PushGoodsController.java
@@ -86,6 +86,31 @@
        }
    }
    /**
     * 新增/修改
     *
     * @param callback
     * @param special
     * @param out
     */
    @RequestMapping(value = "saveInfo")
    public void saveInfo(String callback, PushGoods pushGoods, String arrayIOS,    String arrayAndroid, PrintWriter out) {
        try {
            // 版本处理
            convertVersion(pushGoods, arrayIOS, arrayAndroid);
            // 保存
            pushGoodsService.saveInfo(pushGoods);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("添加成功"));
        } catch (PushGoodsException e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
            e.printStackTrace();
        }
    }
    /**
     * 删除
     * 
@@ -150,10 +175,8 @@
            Date controlTime = pushGoods.getControlTime();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
            if (controlTime == null) {
                pushGoods.setTimeTask(false);
                pushGoods.setControlTime_str("");
            } else {
                pushGoods.setTimeTask(true);
                pushGoods.setControlTime_str(sdf.format(controlTime));
            }
            
@@ -216,21 +239,18 @@
        try {
            List<PushGoods> list = pushGoodsService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
            for (PushGoods pushGoods : list) {
                
                Date controlTime = pushGoods.getControlTime();
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
                if (controlTime == null) {
                    pushGoods.setTimeTask(false);
                    pushGoods.setControlTime_str("");
                } else {
                    pushGoods.setTimeTask(true);
                    pushGoods.setControlTime_str(sdf.format(controlTime));
                }
                
fanli/src/main/java/com/yeshi/fanli/controller/admin/homemodule/SpecialCardAdminController.java
@@ -21,6 +21,7 @@
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialCard;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.exception.homemodule.SpecialCardException;
import com.yeshi.fanli.exception.homemodule.SpecialException;
import com.yeshi.fanli.service.inter.config.AppVersionService;
@@ -30,6 +31,7 @@
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -164,16 +166,16 @@
     * @param out
     */
    @RequestMapping(value = "saveSpecial")
    public void saveSpecial(String callback, Special record, String jumpType, HttpServletRequest request,
    public void saveSpecial(String callback, Special record, String jumpType, SpecialExtra extra, HttpServletRequest request,
            PrintWriter out) {
        try {
            // 1. 先判断httpRequest 是否含有文件类型
            if (request instanceof MultipartHttpServletRequest) {
                MultipartHttpServletRequest fileRequest = (MultipartHttpServletRequest) request;
                specialService.saveObject(fileRequest.getFile("file"), fileRequest.getFile("file2"),
                        fileRequest.getFile("file3"), record, jumpType);
                        fileRequest.getFile("file3"), record, jumpType, extra);
            } else {
                specialService.saveObject(null, null, null, record, jumpType);
                specialService.saveObject(null, null, null, record, jumpType, extra);
            }
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
@@ -281,20 +283,18 @@
        try {
            List<Special> list = specialService.listQueryByCard((pageIndex - 1) * pageSize, pageSize, cardId, key, sex);
            long count = specialService.countlistQueryByCard(cardId, key, sex);
            // 获取有效的专题
            List<SpecialVO> list = specialService.listQueryByCard((pageIndex - 1) * pageSize, pageSize, cardId, key, sex);
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
            long count = specialService.countlistQueryByCard(cardId, key, sex);
            // 过滤
            if (versionList != null) {
                if (versionList.size() > 0) {
                    List<Long> sourceIdList = new ArrayList<>();
                    for (Special special : list) {
                    for (SpecialVO special : list) {
                        sourceIdList.add(special.getId());
                    }
                    List<Long> versionIdList = new ArrayList<>();
@@ -324,9 +324,7 @@
            JSONObject data = new JSONObject();
            data.put("pe", pe);
            data.put("result_list", gson.toJson(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/client/v1/PushController.java
@@ -1,6 +1,7 @@
package com.yeshi.fanli.controller.client.v1;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -14,7 +15,9 @@
import org.yeshi.utils.taobao.TbImgUtil;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.activity.ActivityUser;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.dynamic.GoodsEvaluate;
import com.yeshi.fanli.entity.goods.CommonGoods;
import com.yeshi.fanli.entity.push.DeviceActive;
import com.yeshi.fanli.entity.push.DeviceTokenOPPO;
@@ -29,6 +32,7 @@
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.config.BusinessSystemService;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
import com.yeshi.fanli.service.inter.push.DeviceActiveService;
import com.yeshi.fanli.service.inter.push.DeviceTokenHWService;
import com.yeshi.fanli.service.inter.push.DeviceTokenOPPOService;
@@ -44,6 +48,8 @@
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
import com.yeshi.fanli.util.factory.JumpDetailParamsFactory;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
import com.yeshi.fanli.vo.push.PushRecommendVO;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -95,6 +101,10 @@
    @Resource
    private DeviceTokenXMService deviceTokenXMService;
    @Resource
    private GoodsEvaluateService goodsEvaluateService;
    @RequestMapping(value = "callback", method = RequestMethod.POST)
    public void callback(AcceptData acceptData, String pushId, PrintWriter out) {
@@ -199,127 +209,128 @@
     */
    @RequestMapping(value = "/gethistory", method = RequestMethod.POST)
    public void getHistory(AcceptData acceptData, Long uid, String deviceToken, int page, PrintWriter out) {
        long count = 0;
        List<PushGoods> list = null;
        JSONArray resultList = new JSONArray();
        DeviceActive deviceActive = deviceActiveService.getDeviceByDeviceAndPlatform(acceptData.getDevice(),
                deviceToken, acceptData.getPlatform());
        if (deviceActive != null) {
        if (deviceActive == null) {
            JSONObject resultJson = new JSONObject();
            resultJson.put("count", count);
            resultJson.put("result_list", resultList);
            out.print(JsonUtil.loadTrueResult(resultJson));
            return;
        }
            // 设备注册时间
            Date createTime = deviceActive.getCreateTime();
            count = pushGoodsService.countHistoryByPushTime(uid, createTime);
            int pageSize = Constant.PAGE_SIZE;
        List<PushGoods> list = pushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, uid, createTime);
        if (list == null)
            list = new ArrayList<>();
            list = pushGoodsService.listHistoryByPushTime((page - 1) * pageSize, pageSize, uid, createTime);
            if (list != null && list.size() > 0) {
                for (PushGoods pushGoods : list) {
                    JSONObject result = new JSONObject();
            Long id = pushGoods.getId();
                    Long pushId = pushGoods.getId();
                    String picture = pushGoods.getPicture();
                    String alertContent = pushGoods.getAlertContent();
                    Date pushTime = pushGoods.getPushTime();
            PushRecommendVO vo = new PushRecommendVO();
            vo.setTitle(pushGoods.getTitle());
            vo.setContent(pushGoods.getContent());
            vo.setPicture(pushGoods.getPicture());
            vo.setPushtime(pushGoods.getPushTime().getTime());
                    result.put("content", alertContent);
                    result.put("pushtime", pushTime.getTime());
            Integer scanNum = pushGoods.getScanNum();
            if (scanNum == null) {
                vo.setScanNum("0");
            } else if (scanNum >= 10000) {
                double num = scanNum;
                String numMidea = String.format("%.1f", num / 10000);
                vo.setScanNum(numMidea + "万");
            } else {
                vo.setScanNum(scanNum +"");
            }
                    // 统计商品数量
            String params = "";
            String nickName = "";
            JumpDetailV2 jumpDetail = null;
            List<ClientTextStyleVO> totalwords = new ArrayList<ClientTextStyleVO>();
            Integer type = pushGoods.getType();
            if (type == null || type == PushGoods.TYPE_GOODS) {
                    long totalgoods = 0;
                    // 商品id
                    CommonGoods commonGoods = null;
                    if (StringUtil.isNullOrEmpty(picture)) {
                CommonGoods goods = null;
                        try {
                            List<PushGoodsGroup> listGroup = pushGoodsGroupService.getAllInfoByPushId(pushId);
                    List<PushGoodsGroup> listGroup = pushGoodsGroupService.getAllInfoByPushId(id);
                            if (listGroup != null && listGroup.size() > 0) {
                                totalgoods = listGroup.size();
                                PushGoodsGroup pushGoodsGroup = listGroup.get(0);
                                if (pushGoodsGroup != null) {
                                    commonGoods = pushGoodsGroup.getCommonGoods();
                                    if (commonGoods != null) {
                                        picture = commonGoods.getPicture();
                                    }
                            goods = pushGoodsGroup.getCommonGoods();
                                }
                            }
                        } catch (PushGoodsGroupException e) {
                            e.printStackTrace();
                        }
                if (goods != null && StringUtil.isNullOrEmpty(vo.getPicture())) {
                    vo.setPicture(TbImgUtil.getTBSize320Img(goods.getPicture()));
                    }
                    result.put("picture", TbImgUtil.getTBSize320Img(picture));
                    String fontColor1 = "#666666";
                    String fontColor2 = "#E5005C";
                    JSONArray array = new JSONArray();
                    JSONObject contentJson1 = new JSONObject();
                    contentJson1.put("color", fontColor1);
                    contentJson1.put("content", "本次推荐共");
                    JSONObject contentJson2 = new JSONObject();
                    contentJson2.put("color", fontColor2);
                    contentJson2.put("content", totalgoods);
                    JSONObject contentJson3 = new JSONObject();
                    contentJson3.put("color", fontColor1);
                    contentJson3.put("content", "个商品");
                    array.add(contentJson1);
                    array.add(contentJson2);
                    array.add(contentJson3);
                    result.put("totalwords", array);
                    String params = "";
                    JumpDetailV2 jumpDetail = null;
                    if (totalgoods == 1) {
                        params = JumpDetailParamsFactory.createGoodsParams(commonGoods.getGoodsId(),
                                commonGoods.getGoodsType());
                        // 单个商品跳转商品详情
                        jumpDetail = jumpDetailV2Service.getByTypeCache("goodsdetail",
                                Constant.getPlatformCode(acceptData.getPlatform()),
                    params = JumpDetailParamsFactory.createGoodsParams(goods.getGoodsId(), goods.getGoodsType());
                    jumpDetail = jumpDetailV2Service.getByTypeCache("goodsdetail",Constant.getPlatformCode(acceptData.getPlatform()),
                                Integer.parseInt(acceptData.getVersion()));
                    } else {
                        String url = configService.get(ConfigKeyEnum.pushGoodsDetails.getKey());
                        if (url == null) {
                            url = "";
                        }
                        url = url + "?id=" + pushId;
                    url = url + "?id=" + id;
                        params = JumpDetailParamsFactory.createWEBParams(url);
                        // 跳转推荐详情
                        jumpDetail = jumpDetailV2Service.getByTypeCache("web",
                                Constant.getPlatformCode(acceptData.getPlatform()),
                    jumpDetail = jumpDetailV2Service.getByTypeCache("web",Constant.getPlatformCode(acceptData.getPlatform()),
                                Integer.parseInt(acceptData.getVersion()));
                    }
                    result.put("params", params);
                    result.put("jumpDetail", jumpDetail);
                    resultList.add(result);
                totalwords.add(new ClientTextStyleVO("本次推荐共", "#666666"));
                totalwords.add(new ClientTextStyleVO(totalgoods + "", "#E5005C"));
                totalwords.add(new ClientTextStyleVO("个商品", "#666666"));
            } else if (type == PushGoods.TYPE_ACTIVITY) {
                GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(pushGoods.getOtherId());
                if (goodsEvaluate != null) {
                    ActivityUser user = goodsEvaluate.getUser();
                    if (user != null) {
                        nickName = user.getNickName();
                }
            }
                String url = configService.get(ConfigKeyEnum.pushActivityLink.getKey());
                if (url == null) {
                    url = "";
                }
                url = url + "?id=" + id + "&otherId=" + pushGoods.getOtherId();
                params = JumpDetailParamsFactory.createWEBParams(url);
                jumpDetail = jumpDetailV2Service.getByTypeCache("web",
                        Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()));
            } else {
                continue;
            }
            vo.setNickName(nickName);
            vo.setParams(params);
            vo.setJumpDetail(jumpDetail);
            vo.setTotalwords(totalwords);
            resultList.add(vo);
        }
        JSONObject resultJson = new JSONObject();
        resultJson.put("count", count);
        resultJson.put("result_list", resultList);
        out.print(JsonUtil.loadTrueResult(resultJson));
        // 列表参数、设备参数信息不为空
        if (list != null && list.size() > 0 && deviceActive != null) {
        if (list != null && list.size() > 0 && deviceActive != null) {
            final List<PushGoods> listPush = list;
            // 记录访问信息
            executor.execute(new Runnable() {
@@ -327,7 +338,6 @@
                public void run() {
                    try {
                        Long deviceId = deviceActive.getId();
                        for (PushGoods pushGoods : listPush) {
                            List<PushGoodsRecord> listRecord = pushGoodsRecordService
                                    .listByPushIdAndDeviceId(pushGoods.getId(), deviceId);
@@ -342,11 +352,9 @@
                            pushGoodsRecord.setDeviceActive(deviceActive);
                            pushGoodsRecordService.insert(pushGoodsRecord);
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            });
        }
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -2198,6 +2198,10 @@
                inviteLevel.put("link", level.getLink());
                data.put("inviteLevel", inviteLevel);
            }
            if (VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) {
                data.put("fansCountLink", configService.get(ConfigKeyEnum.teamStatisticsLink.getKey()));
            }
            out.print(JsonUtil.loadTrueResult(data));
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -12,6 +12,7 @@
import javax.annotation.Resource;
import org.apache.commons.beanutils.PropertyUtils;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -29,6 +30,7 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.entity.bus.homemodule.SpecialLabel;
import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
@@ -54,6 +56,7 @@
import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
import com.yeshi.fanli.service.inter.goods.ShareGoodsService;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
import com.yeshi.fanli.service.inter.homemodule.SpecialExtraService;
import com.yeshi.fanli.service.inter.homemodule.SpecialService;
import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
@@ -74,6 +77,7 @@
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.vo.dynamic.ArticleVO;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
import net.sf.json.JSONArray;
@@ -138,6 +142,11 @@
    @Resource
    private DailyCountMomentsService dailyCountMomentsService;
    @Resource
    private SpecialExtraService specialExtraService;
    @Resource(name = "taskExecutor")
    private TaskExecutor executor;
@@ -366,29 +375,48 @@
        long time = System.currentTimeMillis();
        // 删除尚未启用的过期的
        List<SpecialVO> listVo = new ArrayList<SpecialVO>();
        for (int i = 0; i < list.size(); i++) {
            Special special = list.get(i);
            if (special.getState() == 1L) {
                list.remove(i--);
            } else {
                continue;
            }
            // 是否活动已过期
                if (special.getStartTime() != null && special.getEndTime() != null) {
                    if (time < special.getStartTime().getTime() || time > special.getEndTime().getTime()) {
                        list.remove(i--);
                    } else// 设置倒计时
                    {
                    continue;
                } else {
                        special.setCountDownTime((special.getEndTime().getTime() - time) / 1000);
                    }
                }
                List<SpecialLabel> listLabels = special.getListLabels();
            SpecialVO specialVO = new SpecialVO();
            try {
                PropertyUtils.copyProperties(specialVO, special);
            } catch (Exception e) {
                e.printStackTrace();
                continue;
            }
            // 设置标签
            List<SpecialLabel> listLabels = specialVO.getListLabels();
                if (listLabels != null && !listLabels.isEmpty()) {
                    List<ClientTextStyleVO> labels = new ArrayList<>();
                    for (SpecialLabel specialLabel : listLabels) {
                        labels.add(new ClientTextStyleVO(specialLabel.getName(), specialLabel.getBgColor()));
                    }
                    special.setLabels(labels);
                specialVO.setLabels(labels);
            }
            // 评论信息
            if (VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) {
                SpecialExtra extra = specialExtraService.selectByPrimaryKey(specialVO.getId());
                if (extra != null && !StringUtil.isNullOrEmpty(extra.getComment())) {
                    specialVO.setComment(extra.getComment());
                }
            }
            listVo.add(specialVO);
        }
        long count = specialService.countByPlaceKeyList(listKey, platformCode,
@@ -398,7 +426,7 @@
        Gson gson = gsonBuilder.create();
        JSONObject data = new JSONObject();
        data.put("count", count);
        data.put("list", gson.toJson(list));
        data.put("list", gson.toJson(listVo));
        out.print(JsonUtil.loadTrueResult(data));
    }
@@ -1042,4 +1070,69 @@
        });
    }
    /**
     * 评论复制-专题
     *
     * @param acceptData
     * @param id
     * @param out
     */
    @RequestMapping(value = "copySpecialComment", method = RequestMethod.POST)
    public void copySpecialComment(AcceptData acceptData, Long uid, Long id, PrintWriter out) {
        if (uid == null || id == null) {
            out.print(JsonUtil.loadFalseResult("参数不能为空"));
            return;
        }
        SpecialExtra extra = specialExtraService.selectByPrimaryKey(id);
        if (extra == null ||  StringUtil.isNullOrEmpty(extra.getComment())) {
            out.print(JsonUtil.loadFalseResult("该内容已不存在"));
            return;
        }
        UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
        if (user == null) {
            out.print(JsonUtil.loadFalseResult("用户未登录"));
            return;
        }
        if (user != null && user.getState() != UserInfo.STATE_NORMAL) {
            out.print(JsonUtil.loadFalseResult(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC));
            return;
        }
        UserExtraTaoBaoInfo taoBaoInfo = userExtraTaoBaoInfoService.getByUid(uid);
        String relationId = null;
        if (taoBaoInfo != null && taoBaoInfo.getRelationId() != null && taoBaoInfo.getRelationValid() != null
                && taoBaoInfo.getRelationValid() == true)
            relationId = taoBaoInfo.getRelationId();
        if (StringUtil.isNullOrEmpty(relationId)) {
            out.print(JsonUtil.loadFalseResult(2, "淘宝未授权,请前往\"我的\"绑定淘宝账号"));
            return;
        }
        String text = extra.getComment();
        String newText = text;
        if (extra.getNeedSpin() != null && extra.getNeedSpin()) {
            try {
                newText = convertLinkManager.convertLinkFromText(text, uid, true);
            } catch (ConvertLinkExceptionException e) {
                if (e.getCode() != ConvertLinkExceptionException.CODE_NONE) {
                    out.print(JsonUtil.loadFalseResult("评论生成失败"));
                    return;
                }
            } catch (Exception e) {
                LogHelper.errorDetailInfo(e);
                out.print(JsonUtil.loadFalseResult("评论生成失败"));
                return;
            }
        }
        JSONObject data = new JSONObject();
        data.put("text", newText);
        out.print(JsonUtil.loadTrueResult(data));
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -892,6 +892,11 @@
        result.put("secondTeam", countSecond);
        result.put("count", count);
        result.put("list", array);
        // 统计H5链接
        if (page == 1) {
            result.put("link", configService.get(ConfigKeyEnum.teamStatisticsLink.getKey()));
        }
        out.print(JsonUtil.loadTrueResult(result));
    }
    
@@ -917,8 +922,8 @@
     * @param id
     * @param out
     */
    @RequestMapping(value = "countMyTeamV2", method = RequestMethod.POST)
    public void countMyTeamV2(AcceptData acceptData, Long uid, PrintWriter out) {
    @RequestMapping(value = "countMyTeamV2")
    public void countMyTeamV2(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            JSONObject bossObject = new JSONObject();
            ThreeSale threeSale = threeSaleSerivce.getByWorkerId(uid);
@@ -976,8 +981,7 @@
                tearcherObject.put("phone", tearcherInfo.getPhone());
                tearcherObject.put("weixin", tearcherInfo.getWxID());
                tearcherObject.put("level", UserLevelEnum.tearcher);
                json.put("tearcher", tearcherInfo);
                json.put("tearcher", tearcherObject);
            }
            JSONObject daren = new JSONObject();
@@ -1041,9 +1045,9 @@
            json.put("daren", daren);
            json.put("highVIP", highVIP);
            json.put("superVIP", superVIP);
            out.print(JsonUtil.loadTrueResult(json));
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(json));
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("统计失败"));
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("统计失败"));
            e.printStackTrace();
        }
@@ -1117,8 +1121,13 @@
            weixin = userInfoExtra.getWeiXin();
            activeTime = userInfoExtra.getActiveTime();
        }
        if (activeTime == null) {
            activeTime = new Date(user.getCreatetime());
        }
        data.put("weixin", StringUtil.isNullOrEmpty(weixin) ? "" : weixin);
        data.put("loginTime", TimeUtil.formatDate(activeTime == null ? userInfoExtra.getCreateTime() : activeTime));
        data.put("loginTime", TimeUtil.formatDate(activeTime));
        UserExtraTaoBaoInfo userExtraTaoBaoInfo = userExtraTaoBaoInfoService.getByUid(workerId);
        if (userExtraTaoBaoInfo != null && !StringUtil.isNullOrEmpty(userExtraTaoBaoInfo.getRelationId())
@@ -1156,21 +1165,19 @@
        }
        data.put("level", levelName);
        // 粉丝统计
        long indirectNum = 0;
        long directNum = threeSaleSerivce.countFirstTeam(workerId);
        if (directNum > 0) {
            indirectNum = threeSaleSerivce.countSecondTeam(workerId);
        }
        data.put("directNum", directNum);
        data.put("indirectNum", indirectNum);
        // 订单统计
        long countTB = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_TAOBAO, 60);
        long countJD = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_JD, 60);
        long countPDD = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_PDD, 60);
        data.put("orderTB", countTB);
        data.put("orderJD", countJD);
        data.put("orderPDD", countPDD);
        data.put("fansNum", "直接粉丝: "+directNum+"人\n" + "间接粉丝: "+indirectNum+"人");
        data.put("orderInfo", "淘宝 ("+countTB+"笔)\n" + "京东 ("+countJD+"笔)\n" + "拼多多 ("+countPDD+"笔)");
        out.print(JsonUtil.loadTrueResult(data));
    }
@@ -1225,8 +1232,8 @@
     * @param id
     * @param out
     */
    @RequestMapping(value = "countTeamH5", method = RequestMethod.POST)
    public void countTeamH5(AcceptData acceptData, Long uid, PrintWriter out) {
    @RequestMapping(value = "countTeamH5")
    public void countTeamH5(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
        try {
            Date now = new Date();
            SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM");
@@ -1294,9 +1301,9 @@
            json.put("yesterday", yesterday);
            json.put("month", month);
            json.put("totality", totality);
            out.print(JsonUtil.loadTrueResult(json));
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(json));
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("统计失败"));
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("统计失败"));
            e.printStackTrace();
        }
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserMoneyControllerV2.java
New file
@@ -0,0 +1,405 @@
package com.yeshi.fanli.controller.client.v2;
import java.io.PrintWriter;
import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.yeshi.utils.JsonUtil;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.user.Extract;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
import com.yeshi.fanli.entity.order.OrderMoneyDailyCount;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.money.UserMoneyDetailService;
import com.yeshi.fanli.service.inter.money.extract.ExtractService;
import com.yeshi.fanli.service.inter.order.HongBaoV2Service;
import com.yeshi.fanli.service.inter.order.OrderMoneyDailyCountService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.vo.money.IncomeDetailVO;
import com.yeshi.fanli.vo.money.MoneyPredictVO;
import com.yeshi.fanli.vo.money.MoneyStatisticVO;
import net.sf.json.JSONObject;
/**
 * 账户系统
 *
 * @author Administrator
 *
 */
@Controller
@RequestMapping("api/v2/usermoney")
public class UserMoneyControllerV2 {
    @Resource
    private UserMoneyDetailService userMoneyDetailService;
    @Resource
    private UserInfoService userInfoService;
    @Resource
    private HongBaoV2Service hongBaoV2Service;
    @Resource
    private ExtractService extractService;
    @Resource
    private UserInfoExtraService userInfoExtraService;
    @Resource
    private ConfigService configService;
    @Resource
    private HongBaoV2CountService hongBaoV2CountService;
    @Resource
    private OrderMoneyDailyCountService orderMoneyDailyCountService;
    /**
     * 用户资金统计
     *
     * @param acceptData
     * @param uid
     * @param out
     */
    @RequestMapping(value = "getMoneyStatistic")
    public void getMoneyStatistic(AcceptData acceptData, Long uid, PrintWriter out) {
        if (uid == null || uid == 0) {
            out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
            return;
        }
        UserInfo user = userInfoService.getUserById(uid);
        MoneyStatisticVO vo = new MoneyStatisticVO();
        vo.setLink(configService.get(ConfigKeyEnum.autoExtractHelpUrl.getKey()));
        vo.setBalanceMoney(user.getMyHongBao());
        vo.setExtractDesc("提现金额就是已成功转账到提现支付宝的资金。");
        vo.setMoneyArrivalDesc("资金已到账后提现时间不受限制、金额受限制。");
        // 获取提现中的信息
        BigDecimal extractingMoney = extractService.sumVerifyingMoney(uid);
        if (extractingMoney.compareTo(new BigDecimal(0)) > 0)
            vo.setExtractingMoneyInfo("提现中:¥" + extractingMoney.setScale(2, RoundingMode.HALF_UP));
        Date minDate = null;
        Date maxDate = null;
        long timeStamp = System.currentTimeMillis();
        List<UserMoneyDetailTypeEnum> typeList = new ArrayList<>();
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(timeStamp);
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.extract);
        typeList.add(UserMoneyDetailTypeEnum.extractNew);
        typeList.add(UserMoneyDetailTypeEnum.extractVerify);
        typeList.add(UserMoneyDetailTypeEnum.extractVerifyNew);
        typeList.add(UserMoneyDetailTypeEnum.extractReject);
        typeList.add(UserMoneyDetailTypeEnum.extractAutoWX);
        // 本月提现
        maxDate = new Date(timeStamp);
        calendar = Calendar.getInstance();
        minDate = new Date(TimeUtil.convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        vo.setMonthExtractMoney(userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
        // 上月提现
        maxDate = new Date(TimeUtil.convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        minDate = new Date(TimeUtil.convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        vo.setLastMonthExtractMoney(userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
        minDate = new Date(0L);
        maxDate = new Date(timeStamp);
        // 累计成功提现
        vo.setTotalExtractMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
        // 累计自购返利
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.fanli);
        typeList.add(UserMoneyDetailTypeEnum.fanliNew);
        typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan);
        typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuanNew);
        typeList.add(UserMoneyDetailTypeEnum.orderReward);
        typeList.add(UserMoneyDetailTypeEnum.orderRewardNew);
        vo.setTotalFanLiMoney(
                userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
        // 累计分享赚
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.share);
        typeList.add(UserMoneyDetailTypeEnum.shareNew);
        typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan);
        vo.setTotalShareMoney(userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
        // 累计邀请赚
        typeList.clear();
        typeList.add(UserMoneyDetailTypeEnum.invite);
        typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan);
        typeList.add(UserMoneyDetailTypeEnum.inviteAndShare);
        typeList.add(UserMoneyDetailTypeEnum.subsidy);
        typeList.add(UserMoneyDetailTypeEnum.teamReward);
        vo.setTotalInviteMoney(userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
        // 本月收货
        maxDate = new Date(timeStamp);
        calendar = Calendar.getInstance();
        minDate = new Date(TimeUtil.convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        vo.setMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
        // 上月收货
        maxDate = new Date(TimeUtil.convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        minDate = new Date(TimeUtil.convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        vo.setLastMonthSettleMoney(hongBaoV2CountService.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate));
        // 待确认收货(180天内)
        vo.setNotSettleMoney(hongBaoV2CountService.sumMoneyByANotSettleAndUid(uid));
        // 今日预估
        calendar.add(Calendar.DAY_OF_YEAR, -1);
        minDate = new Date(TimeUtil.convertDateToTemp(TimeUtil.getGernalTime(timeStamp)));
        vo.setTodayPredict(cratePredictVO(orderMoneyDailyCountService.query(uid, minDate, null)));
        // 本月预估
        maxDate = new Date(timeStamp);
        calendar = Calendar.getInstance();
        minDate = new Date(TimeUtil.convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
        calendar.add(Calendar.MONTH, -1);
        vo.setMonthPredict(cratePredictVO(orderMoneyDailyCountService.query(uid, minDate, maxDate)));
        GsonBuilder builder = new GsonBuilder();
        builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
            @Override
            public JsonElement serialize(BigDecimal value, Type theType, JsonSerializationContext context) {
                if (value == null) {
                    return new JsonPrimitive("");
                } else {
                    // 保留2位小数
                    value = value.setScale(2);
                    return new JsonPrimitive(value.toString());
                }
            }
        });
        out.print(JsonUtil.loadTrueResult(builder.create().toJson(vo)));
    }
    private MoneyPredictVO cratePredictVO(List<OrderMoneyDailyCount> list) {
        MoneyPredictVO predictVO = new MoneyPredictVO();
        predictVO.setMineNum(0);
        predictVO.setTeamNum(0);
        predictVO.setMineMoney(BigDecimal.valueOf(0));
        predictVO.setTeamMoney(BigDecimal.valueOf(0));
        if (list != null && list.size() > 0) {
            for (OrderMoneyDailyCount dailyCount: list) {
                if (dailyCount.getOrderNum() != null) {
                    predictVO.setMineNum(predictVO.getMineNum() + dailyCount.getOrderNum());
                }
                if (dailyCount.getOrderNumTeam() != null) {
                    predictVO.setTeamNum(predictVO.getTeamNum() + dailyCount.getOrderNumTeam());
                }
                if (dailyCount.getIncome() != null) {
                    predictVO.setMineMoney(predictVO.getMineMoney().add(dailyCount.getIncome()));
                }
                if (dailyCount.getIncomeTeam() != null) {
                    predictVO.setTeamMoney(predictVO.getTeamMoney().add(dailyCount.getIncomeTeam()));
                }
            }
        }
        predictVO.setTotalNum(predictVO.getTeamNum() + predictVO.getMineNum());
        predictVO.setTotalMoney(predictVO.getMineMoney().add(predictVO.getTeamMoney()));
        return predictVO;
    }
     /**
      * 历史详情
      * @param acceptData
      * @param uid
      * @param datetype 1-天 - 2月
      * @param out
      */
    @RequestMapping(value = "getHistoryDetail")
    public void getHistoryDetail(AcceptData acceptData, Long uid, Integer datetype, PrintWriter out) {
        if (uid == null || uid == 0) {
            out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
            return;
        }
        if (datetype == null) {
            datetype = 1;
        }
        MoneyPredictVO predictVO = new MoneyPredictVO();
        predictVO.setMineNum(0);
        predictVO.setTeamNum(0);
        predictVO.setMineMoney(BigDecimal.valueOf(0));
        predictVO.setTeamMoney(BigDecimal.valueOf(0));
        predictVO.setTotalNum(predictVO.getTeamNum() + predictVO.getMineNum());
        predictVO.setTotalMoney(predictVO.getMineMoney().add(predictVO.getTeamMoney()));
        predictVO.setCountDate("2020年05月09日");
        MoneyPredictVO predictVO2 = new MoneyPredictVO();
        predictVO2.setMineNum(0);
        predictVO2.setTeamNum(0);
        predictVO2.setMineMoney(BigDecimal.valueOf(0));
        predictVO2.setTeamMoney(BigDecimal.valueOf(0));
        predictVO2.setTotalNum(predictVO.getTeamNum() + predictVO.getMineNum());
        predictVO2.setTotalMoney(predictVO.getMineMoney().add(predictVO.getTeamMoney()));
        predictVO2.setCountDate("2020年05月08日");
        List<MoneyPredictVO> list = new ArrayList<>();
        list.add(predictVO);
        list.add(predictVO2);
        GsonBuilder builder = new GsonBuilder();
        builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
            @Override
            public JsonElement serialize(BigDecimal value, Type theType, JsonSerializationContext context) {
                if (value == null) {
                    return new JsonPrimitive("");
                } else {
                    // 保留2位小数
                    value = value.setScale(2);
                    return new JsonPrimitive(value.toString());
                }
            }
        });
        JSONObject object = new JSONObject();
        object.put("count", list.size());
        object.put("list", builder.create().toJson(list));
        out.print(JsonUtil.loadTrueResult(object));
    }
     /**
      * 收益详情
      * @param acceptData
      * @param uid
      * @param datetype
      * @param type
      * @param out
      */
    @RequestMapping(value = "getIncomeDetail")
    public void getIncomeDetail(AcceptData acceptData, Long uid, Integer datetype, int type, PrintWriter out) {
        if (uid == null || uid == 0) {
            out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
            return;
        }
        IncomeDetailVO detailVO = new IncomeDetailVO();
        detailVO.setIcon("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E5%9B%BE%E6%A0%87&hs=2&pn=4&spn=0&di=140910&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=1127089551%2C1776911506&os=1048215048%2C2112739689&simid=3430760525%2C458613076&adpicid=0&lpn=0&ln=30&fr=ala&fm=&sme=&cg=&bdtype=0&oriquery=%E5%9B%BE%E6%A0%87&objurl=http%3A%2F%2Fbpic.588ku.com%2Felement_origin_min_pic%2F16%2F08%2F20%2F2357b8781a8b798.jpg!%2Ffwfh%2F804x804%2Fquality%2F90%2Funsharp%2Ftrue%2Fcompress%2Ftrue&fromurl=ippr_z2C%24qAzdH3FAzdH3Flafij3t_z%26e3Bv54AzdH3Ff7vwtAzdH3F8clm90md_z%26e3Bip4s&gsm=5&islist=&querylist=");
        detailVO.setNum(0);
        detailVO.setMoney(BigDecimal.valueOf(0));
        IncomeDetailVO detailVO2 = new IncomeDetailVO();
        detailVO2.setIcon("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E5%9B%BE%E6%A0%87&hs=2&pn=5&spn=0&di=63690&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2705540191%2C3386342097&os=1154083183%2C368350028&simid=3434290922%2C367349849&adpicid=0&lpn=0&ln=30&fr=ala&fm=&sme=&cg=&bdtype=0&oriquery=%E5%9B%BE%E6%A0%87&objurl=http%3A%2F%2Fhbimg.b0.upaiyun.com%2Ffe2a5be541f3c011972f74d3b50b96578116a92c2f63-tK5HwY_fw658&fromurl=ippr_z2C%24qAzdH3FAzdH3Fi7wkwg_z%26e3Bv54AzdH3FrtgfAzdH3F8ca0l0acmdAzdH3F&gsm=5&islist=&querylist=");
        detailVO2.setNum(0);
        detailVO2.setMoney(BigDecimal.valueOf(0));
        List<IncomeDetailVO> list = new ArrayList<>();
        list.add(detailVO);
        list.add(detailVO2);
        GsonBuilder builder = new GsonBuilder();
        builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
            @Override
            public JsonElement serialize(BigDecimal value, Type theType, JsonSerializationContext context) {
                if (value == null) {
                    return new JsonPrimitive("");
                } else {
                    // 保留2位小数
                    value = value.setScale(2);
                    return new JsonPrimitive(value.toString());
                }
            }
        });
        JSONObject object = new JSONObject();
        object.put("count", list.size());
        object.put("list", builder.create().toJson(list));
        out.print(JsonUtil.loadTrueResult(object));
    }
    @RequestMapping(value = "getExtractRecord")
    public void getExtractRecord(AcceptData acceptData, Integer page, Long uid, PrintWriter out) {
        if (uid == null || uid == 0) {
            out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
            return;
        }
        List<Extract> list = extractService.getExtractSucceedRecord(page, Constant.PAGE_SIZE, uid);
        if (list == null) {
            list = new ArrayList<>();
        }
        for (Extract extract: list) {
        }
        GsonBuilder builder = new GsonBuilder();
        builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
            @Override
            public JsonElement serialize(BigDecimal value, Type theType, JsonSerializationContext context) {
                if (value == null) {
                    return new JsonPrimitive("");
                } else {
                    // 保留2位小数
                    value = value.setScale(2);
                    return new JsonPrimitive(value.toString());
                }
            }
        });
        JSONObject object = new JSONObject();
        object.put("count", list.size());
        object.put("list", builder.create().toJson(list));
        out.print(JsonUtil.loadTrueResult(object));
    }
}
fanli/src/main/java/com/yeshi/fanli/dao/dynamic/GoodsEvaluateDao.java
@@ -1,5 +1,6 @@
package com.yeshi.fanli.dao.dynamic;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
@@ -96,31 +97,57 @@
     * 
     * @return
     */
    public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType) {
    public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, String typeEnum) {
        Query query = new Query();
        query.addCriteria(Criteria.where("dynamicType").is(dynamicType));
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("dynamicType").is(dynamicType));
        if (state != null) {
            query.addCriteria(Criteria.where("state").is(state));
            list.add(Criteria.where("state").is(state));
        }
        if (!StringUtil.isNullOrEmpty(typeEnum))
            list.add(Criteria.where("type").is(typeEnum));
        if (!StringUtil.isNullOrEmpty(key))
            query.addCriteria(new Criteria().orOperator(
            list.add(new Criteria().orOperator(
                           Criteria.where("title").regex(Pattern.compile("^.*" + key + ".*$", Pattern.CASE_INSENSITIVE))));
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
     
        query.skip(start).limit(count);
        query.with(new Sort(Sort.Direction.DESC,"weight")).with(new Sort(Sort.Direction.DESC,"createTime"));
        return mongoTemplate.find(query, GoodsEvaluate.class);
    }
    public long count(String key, Integer state, int dynamicType) {
    public long count(String key, Integer state, int dynamicType, String typeEnum) {
        Query query = new Query();
        query.addCriteria(Criteria.where("dynamicType").is(dynamicType));
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("dynamicType").is(dynamicType));
        if (state != null) {
            query.addCriteria(Criteria.where("state").is(state));
            list.add(Criteria.where("state").is(state));
        }
        if (!StringUtil.isNullOrEmpty(typeEnum))
            list.add(Criteria.where("type").is(typeEnum));
        if (!StringUtil.isNullOrEmpty(key))
            query.addCriteria(new Criteria().orOperator(
            list.add(new Criteria().orOperator(
                           Criteria.where("title").regex(Pattern.compile("^.*" + key + ".*$", Pattern.CASE_INSENSITIVE))));
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        return mongoTemplate.count(query, GoodsEvaluate.class);
    }
@@ -134,10 +161,20 @@
    public List<GoodsEvaluate> queryValid(int start, int count, int dynamicType) {
        Date now = new Date();
        Query query = new Query();
        query.addCriteria(Criteria.where("dynamicType").is(dynamicType));
        query.addCriteria(Criteria.where("state").is(1));
        query.addCriteria(Criteria.where("startTime").lte(now));
        query.addCriteria(Criteria.where("endTime").gte(now));
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("dynamicType").is(dynamicType));
        list.add(Criteria.where("state").is(1));
        list.add(Criteria.where("startTime").lte(now));
        list.add(Criteria.where("endTime").gte(now));
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        query.skip(start).limit(count);
        query.with(new Sort(Sort.Direction.DESC,"weight")).with(new Sort(Sort.Direction.DESC,"startTime"));
        return mongoTemplate.find(query, GoodsEvaluate.class);
@@ -151,10 +188,19 @@
    public long countValid(int dynamicType) {
        Date now = new Date();
        Query query = new Query();
        query.addCriteria(Criteria.where("dynamicType").is(dynamicType));
        query.addCriteria(Criteria.where("state").is(1));
        query.addCriteria(Criteria.where("startTime").lte(now));
        query.addCriteria(Criteria.where("endTime").gte(now));
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("dynamicType").is(dynamicType));
        list.add(Criteria.where("state").is(1));
        list.add(Criteria.where("startTime").lte(now));
        list.add(Criteria.where("endTime").gte(now));
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        return mongoTemplate.count(query, GoodsEvaluate.class);
    }
    
@@ -168,9 +214,18 @@
     */
    public List<GoodsEvaluate> querySingleExist() {
        Query query = new Query();
        query.addCriteria(Criteria.where("dynamicType").is(1));
        query.addCriteria(Criteria.where("state").is(1));
        query.addCriteria(Criteria.where("goods.goodsType").is(1));
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("dynamicType").is(1));
        list.add(Criteria.where("state").is(1));
        list.add(Criteria.where("goods.goodsType").is(1));
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        return mongoTemplate.find(query, GoodsEvaluate.class);
    }
    
@@ -184,10 +239,19 @@
     */
    public List<GoodsEvaluate> queryExist(int goodsType, Long goodsId) {
        Query query = new Query();
        query.addCriteria(Criteria.where("dynamicType").is(1));
        query.addCriteria(Criteria.where("state").is(1));
        query.addCriteria(Criteria.where("imgList.goods.goodsId").is(goodsId));
        query.addCriteria(Criteria.where("imgList.goods.goodsType").is(goodsType));
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("dynamicType").is(1));
        list.add(Criteria.where("state").is(1));
        list.add(Criteria.where("imgList.goods.goodsId").is(goodsId));
        list.add(Criteria.where("imgList.goods.goodsType").is(goodsType));
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        return mongoTemplate.find(query, GoodsEvaluate.class);
    }
@@ -217,8 +281,17 @@
     */
    public List<GoodsEvaluate> removeDownGoods() {
        Query query = new Query();
        query.addCriteria(Criteria.where("type").is("single"));
        query.addCriteria(Criteria.where("goods.state").is(1));
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("type").is("single"));
        list.add(Criteria.where("goods.state").is(1));
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        return mongoTemplate.find(query, GoodsEvaluate.class);
    }
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ExtractMapper.java
@@ -124,4 +124,18 @@
     * @return
     */
    BigDecimal sumMoneyByUidAndState(@Param("uid") Long uid,@Param("stateList")List<Integer> stateList);
    /**
     * 查询提现成功记录
     * @param start
     * @param count
     * @param uid
     * @return
     */
    List<Extract> getExtractSucceedRecord(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid);
    Long countExtractSucceedRecord(@Param("uid") Long uid);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/HongBaoV2CountMapper.java
@@ -173,4 +173,22 @@
     */
    BigDecimal sumMoneyArrivalByUidAndNearDay(@Param("uid") Long uid, @Param("day") int day);
    /**
     * 统计结算金额
     * @param uid
     * @param minDate
     * @param maxDate
     * @return
     */
    BigDecimal sumMoneyBySettleTimeAndUid(@Param("uid") Long uid, @Param("minDate") Date minDate, @Param("maxDate") Date maxDate);
    /**
     * 180内未收货的金额
     * @param uid
     * @return
     */
    BigDecimal sumMoneyByANotSettleAndUid(@Param("uid") Long uid);
}
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/SpecialExtraMapper.java
New file
@@ -0,0 +1,8 @@
package com.yeshi.fanli.dao.mybatis.homemodule;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
public interface SpecialExtraMapper extends BaseMapper<SpecialExtra> {
}
fanli/src/main/java/com/yeshi/fanli/dao/order/DateTypeEnum.java
New file
@@ -0,0 +1,32 @@
package com.yeshi.fanli.dao.order;
public enum DateTypeEnum {
    DATE("1", "%Y-%m-%d"),
    MONTH("2", "%Y-%m"),
    YEAR("3", "%Y");
    private String name;
    private String value;
    private DateTypeEnum(String name, String value) {
        this.name = name;
        this.value = value;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
}
fanli/src/main/java/com/yeshi/fanli/dao/order/OrderMoneyDailyCountDao.java
New file
@@ -0,0 +1,150 @@
package com.yeshi.fanli.dao.order;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Repository;
import com.mongodb.BasicDBList;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBObject;
import com.mongodb.GroupCommand;
import com.yeshi.fanli.entity.order.OrderMoneyDailyCount;
@Repository
public class OrderMoneyDailyCountDao {
    @Resource
    private MongoTemplate mongoTemplate;
    /**
     * 新增
     *
     * @param record
     */
    public void save(OrderMoneyDailyCount record) {
        if (record == null) {
            return;
        }
        mongoTemplate.save(record);
    }
    /**
     * 查询ID
     *
     * @param id
     * @return
     */
    public OrderMoneyDailyCount getById(String id) {
        Query query = new Query();
        query.addCriteria(Criteria.where("id").is(id));
        return mongoTemplate.findOne(query, OrderMoneyDailyCount.class);
    }
    /**
     * 选择更新
     *
     * @param info
     */
    public void updateSelective(OrderMoneyDailyCount info) {
        Query query = new Query();
        query.addCriteria(Criteria.where("id").is(info.getId()));
        Update update = new Update();
        if (info.getIncome() != null)
            update.set("income", info.getIncome());
        if (info.getIncomeTeam() != null)
            update.set("incomeTeam", info.getIncomeTeam());
        if (info.getOrderNum() != null)
            update.set("orderNum", info.getOrderNum());
        if (info.getOrderNumTeam() != null)
            update.set("orderNumTeam", info.getOrderNumTeam());
        update.set("updateTime", new Date());
        mongoTemplate.updateMulti(query, update, OrderMoneyDailyCount.class);
    }
    // 查询
    public List<OrderMoneyDailyCount> query(Long uid, Date minDay, Date maxDay) {
        Query query = new Query();
        List<Criteria> list = new ArrayList<Criteria>();
        list.add(Criteria.where("uid").is(uid));
        if (minDay != null) {
            list.add(Criteria.where("bossSuperId").lte(uid));
        }
        if (maxDay != null) {
            list.add(Criteria.where("bossSuperId").gte(uid));
        }
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        query.with(new Sort(Sort.Direction.ASC, "countDay"));
        return mongoTemplate.find(query, OrderMoneyDailyCount.class);
    }
//
//    public List<PlaybackEntity> queryPlaybackRecord(FunctionUseQueryEntity queryEntity) {
//        Criteria criteria = Criteria.where("createTime").gte(queryEntity.getStartTime()).lte(queryEntity.getEndTime())
//                .and("status").is(1);
//        Query query = Query.query(criteria);
//
//        BasicDBObject initial = new BasicDBObject();
//        initial.put("playbackNum", 0);
//
//        String reduce = getReduce();
//        // 进行按天、周、月分组
//        String keyf = getKeyf(queryEntity);
//
//        DBCollection collection = mongoTemplate.getCollection(COLLNAME);
//
//        GroupCommand xx = new GroupCommand(collection, keyf, query.getQueryObject(), initial, reduce, null);
//
//        BasicDBList objects = (BasicDBList) collection.group(xx);
//
//        List<PlaybackEntity> results = new ArrayList<PlaybackEntity>();
//        if (objects != null) {
//            for (int i = 0; i < objects.size(); i++) {
//                PlaybackEntity play = new PlaybackEntity();
//                DBObject obj = (DBObject) objects.get(i);
//                play.setFormateTime((String) obj.get("strData"));
//                play.setPlaybackNum((Double) obj.get("playbackNum"));
//                results.add(play);
//            }
//        }
//        return results;
//    }
//
//    private String getKeyf(FunctionUseQueryEntity queryEntity) {
//        StringBuilder keyfBuilder = new StringBuilder();
//        keyfBuilder.append("function(doc){ ").append("    var date = new Date(doc.createTime); ");
//        if (DateTypeEnum.DATE.getValue().equals(queryEntity.getType())) {
//            keyfBuilder.append(
//                    "    var dateKey = '' + date.getFullYear()+ '-' + (date.getMonth()+1) + '-' + date.getDate();");
//        } else if (DateTypeEnum.MONTH.getValue().equals(queryEntity.getType())) {
//            keyfBuilder.append("    var dateKey = '' + date.getFullYear()+ '-' + (date.getMonth()+1);");
//        }
//        keyfBuilder.append("    return {'strData':dateKey};  ").append(" }");
//        return keyfBuilder.toString();
//    }
//
//    private String getReduce() {
//        StringBuilder reduceBuilder = new StringBuilder();
//        reduceBuilder.append("function Reduce(doc, out) { ").append("    out.playbackNum += 1; ").append(" }");
//        return reduceBuilder.toString();
//    }
}
fanli/src/main/java/com/yeshi/fanli/dao/user/ThreeSaleFocusInfoDao.java
@@ -1,6 +1,7 @@
package com.yeshi.fanli.dao.user;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;
@@ -35,7 +36,6 @@
        }
        mongoTemplate.save(record);
    }
    
    /**
     * 更新标签
@@ -83,6 +83,7 @@
    
    /**
     * 更新昵称
     *
     * @param workerId
     * @param nickName
     */
@@ -97,9 +98,9 @@
        mongoTemplate.updateFirst(query, update, ThreeSaleFocusInfo.class);
    }
    
    /**
     * 更新是否有效粉丝
     *
     * @param workerId
     * @param stateValid
     */
@@ -112,6 +113,7 @@
    
    /**
     * 更新淘宝绑定
     *
     * @param workerId
     * @param taobaoBind
     */
@@ -124,6 +126,7 @@
    
    /**
     * 更新微信绑定
     *
     * @param workerId
     * @param weixinBind
     */
@@ -136,6 +139,7 @@
    /**
     * 更新活跃时间
     *
     * @param workerId
     * @param activeTime
     */
@@ -148,6 +152,7 @@
    /**
     * 更新粉丝数量
     *
     * @param workerId
     * @param fansNum
     */
@@ -158,9 +163,9 @@
        mongoTemplate.updateFirst(query, update, ThreeSaleFocusInfo.class);
    }
    /**
     * 更新收入
     *
     * @param workerId
     * @param income
     */
@@ -171,9 +176,9 @@
        mongoTemplate.updateMulti(query, update, ThreeSaleFocusInfo.class);
    }
    
    /**
     * 统计
     *
     * @return
     */
    public ThreeSaleFocusInfo getbyWorkerId(Long workerId) {
@@ -196,6 +201,7 @@
    /**
     * 统计
     *
     * @return
     */
    public long count(int type, Long uid, ThreeSaleFocusDTO focusDTO) {
@@ -203,65 +209,85 @@
        return mongoTemplate.count(query, ThreeSaleFocusInfo.class);
    }
    private Query createQuery(int type, Long uid, ThreeSaleFocusDTO focusDTO) {
        Query query = new Query();
        List<Criteria> list = new ArrayList<Criteria>();
        if (type == 1) {
            query.addCriteria(Criteria.where("bossId").is(uid));
            list.add(Criteria.where("bossId").is(uid));
        } else {
            query.addCriteria(Criteria.where("bossSuperId").is(uid));
            list.add(Criteria.where("bossSuperId").is(uid));
        }
        
        if (focusDTO == null) {
            return query;
        }
        if (focusDTO != null) {
        if (focusDTO.getStateValid() != null)
            query.addCriteria(Criteria.where("stateValid").is(focusDTO.getStateValid()));
                list.add(Criteria.where("stateValid").is(focusDTO.getStateValid()));
    
        if (focusDTO.getTaobaoBind() != null)
            query.addCriteria(Criteria.where("taobaoBind").is(focusDTO.getTaobaoBind()));
                list.add(Criteria.where("taobaoBind").is(focusDTO.getTaobaoBind()));
    
        if (focusDTO.getWeixinBind() != null)
            query.addCriteria(Criteria.where("weixinBind").is(focusDTO.getWeixinBind()));
                list.add(Criteria.where("weixinBind").is(focusDTO.getWeixinBind()));
            if (!StringUtil.isNullOrEmpty(focusDTO.getLevel()))
                list.add(Criteria.where("level").is(focusDTO.getLevel()));
    
        if (focusDTO.getMinFansNum() != null)
            query.addCriteria(Criteria.where("fansNum").lte(focusDTO.getMinFansNum()));
                list.add(Criteria.where("fansNum").lte(focusDTO.getMinFansNum()));
    
        if (focusDTO.getMinFansNum() != null)
            query.addCriteria(Criteria.where("fansNum").gte(focusDTO.getMinFansNum()));
            if (focusDTO.getMaxFansNum() != null)
                list.add(Criteria.where("fansNum").gte(focusDTO.getMaxFansNum()));
    
        if (focusDTO.getMinActiveTime() != null)
            query.addCriteria(Criteria.where("activeTime").lte(focusDTO.getMinActiveTime()));
            if (!StringUtil.isNullOrEmpty(focusDTO.getMinJoinTime()))
                list.add(Criteria.where("joinTime").lte(focusDTO.getMinJoinTime()));
    
        if (focusDTO.getMaxActiveTime() != null)
            query.addCriteria(Criteria.where("activeTime").gte(focusDTO.getMaxActiveTime()));
            if (!StringUtil.isNullOrEmpty(focusDTO.getMaxJoinTime()))
                list.add(Criteria.where("joinTime").gte(focusDTO.getMaxJoinTime()));
            if (!StringUtil.isNullOrEmpty(focusDTO.getMinActiveTime()))
                list.add(Criteria.where("activeTime").lte(focusDTO.getMinActiveTime()));
            if (!StringUtil.isNullOrEmpty(focusDTO.getMaxActiveTime()))
                list.add(Criteria.where("activeTime").gte(focusDTO.getMaxActiveTime()));
        
        if (focusDTO.getMinIncome() != null)
            query.addCriteria(Criteria.where("income").lte(focusDTO.getMinIncome()));
                list.add(Criteria.where("income").lte(focusDTO.getMinIncome()));
    
        if (focusDTO.getMaxIncome() != null)
            query.addCriteria(Criteria.where("income").gte(focusDTO.getMaxIncome()));
                list.add(Criteria.where("income").gte(focusDTO.getMaxIncome()));
        
        if (!StringUtil.isNullOrEmpty(focusDTO.getKey())) {
            if (type == 1) {
                query.addCriteria(new Criteria().orOperator(
                       Criteria.where("nickName").regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE)),
                               new Criteria().andOperator(Criteria.where("memoName").regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE))),
                               new Criteria().andOperator(Criteria.where("tags").regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE)))
                    ));
                    list.add(new Criteria().orOperator(    Criteria.where("nickName")
                                            .regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$",
                                                    Pattern.CASE_INSENSITIVE)),
                                    new Criteria().andOperator(Criteria.where("memoName")
                                            .regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$",
                                                    Pattern.CASE_INSENSITIVE))),
                                    new Criteria().andOperator(Criteria.where("tags").regex(Pattern
                                            .compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE)))));
            } else {
                query.addCriteria(new Criteria().orOperator(
                           Criteria.where("nickName").regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE)),
                                   new Criteria().andOperator(Criteria.where("memoNameSup").regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE))),
                                   new Criteria().andOperator(Criteria.where("tagsSup").regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE)))
                        ));
                    list.add(new Criteria().orOperator(Criteria.where("nickName")
                                            .regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$",
                                                    Pattern.CASE_INSENSITIVE)),
                                    new Criteria().andOperator(Criteria.where("memoNameSup")
                                            .regex(Pattern.compile("^.*" + focusDTO.getKey() + ".*$",
                                                    Pattern.CASE_INSENSITIVE))),
                                    new Criteria().andOperator(Criteria.where("tagsSup").regex(Pattern
                                            .compile("^.*" + focusDTO.getKey() + ".*$", Pattern.CASE_INSENSITIVE)))));
            }
        }
        }
        if (list.size() > 0) {
            Criteria[] cas = new Criteria[list.size()];
            for (int i = 0; i < list.size(); i++)
                cas[i] = list.get(i);
            query.addCriteria(new Criteria().andOperator(cas));
        }
        return query;
    }
    
}
fanli/src/main/java/com/yeshi/fanli/dto/user/ThreeSaleFocusDTO.java
@@ -1,17 +1,19 @@
package com.yeshi.fanli.dto.user;
import java.math.BigDecimal;
import java.util.Date;
public class ThreeSaleFocusDTO {
    private String key;
    private String level;
    private Boolean stateValid;
    private Boolean taobaoBind;
    private Boolean weixinBind;
    private Integer minFansNum;
    private Integer maxFansNum;
    private Date minActiveTime;
    private Date maxActiveTime;
    private String minJoinTime;
    private String maxJoinTime;
    private String minActiveTime;
    private String maxActiveTime;
    private BigDecimal minIncome;
    private BigDecimal maxIncome;
@@ -64,19 +66,19 @@
        this.maxFansNum = maxFansNum;
    }
    public Date getMinActiveTime() {
    public String getMinActiveTime() {
        return minActiveTime;
    }
    public void setMinActiveTime(Date minActiveTime) {
    public void setMinActiveTime(String minActiveTime) {
        this.minActiveTime = minActiveTime;
    }
    public Date getMaxActiveTime() {
    public String getMaxActiveTime() {
        return maxActiveTime;
    }
    public void setMaxActiveTime(Date maxActiveTime) {
    public void setMaxActiveTime(String maxActiveTime) {
        this.maxActiveTime = maxActiveTime;
    }
@@ -96,4 +98,29 @@
        this.maxIncome = maxIncome;
    }
    public String getMinJoinTime() {
        return minJoinTime;
    }
    public void setMinJoinTime(String minJoinTime) {
        this.minJoinTime = minJoinTime;
    }
    public String getMaxJoinTime() {
        return maxJoinTime;
    }
    public void setMaxJoinTime(String maxJoinTime) {
        this.maxJoinTime = maxJoinTime;
    }
    public String getLevel() {
        return level;
    }
    public void setLevel(String level) {
        this.level = level;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SpecialExtra.java
New file
@@ -0,0 +1,75 @@
package com.yeshi.fanli.entity.bus.homemodule;
import java.util.Date;
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
/**
 * 专题管理
 *
 */
@Table("yeshi_ec_special_extra")
public class SpecialExtra {
    //专题id
    @Column(name = "se_id")
    private Long id;
    // 是否转链
    @Column(name = "se_need_spin")
    private Boolean needSpin;
    // 评论语
    @Column(name = "se_comment")
    private String comment;
    // 创建时间
    @Column(name = "se_createtime")
    private Date createtime;
    // 更新时间
    @Column(name = "se_updatetime")
    private Date updatetime;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Boolean getNeedSpin() {
        return needSpin;
    }
    public void setNeedSpin(Boolean needSpin) {
        this.needSpin = needSpin;
    }
    public String getComment() {
        return comment;
    }
    public void setComment(String comment) {
        this.comment = comment;
    }
    public Date getCreatetime() {
        return createtime;
    }
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    public Date getUpdatetime() {
        return updatetime;
    }
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/ThreeSaleFocusInfo.java
@@ -7,6 +7,8 @@
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
@Document(collection = "three_sale_focus_info")
public class ThreeSaleFocusInfo {
@@ -25,6 +27,9 @@
    @Field("nickName")
    private String nickName; // 昵称
    @Field("level")
    private UserLevelEnum level; // 当前等级
    @Field("stateValid")
    private Boolean stateValid; // 有效粉丝
@@ -58,6 +63,8 @@
    @Field("memoNameSup")
    private String memoNameSup; // 间接上级备注名
    @Field("tagsSup")
    private String tagsSup; // 间接上级标签
@@ -209,4 +216,12 @@
        this.tagsSup = tagsSup;
    }
    public UserLevelEnum getLevel() {
        return level;
    }
    public void setLevel(UserLevelEnum level) {
        this.level = level;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/dynamic/GoodsEvaluate.java
@@ -108,7 +108,6 @@
    @Field("endTime")
    private Date endTime; // 结束时间
    
    @Field("createTime")
    private Date createTime; // 创建时间
@@ -120,6 +119,10 @@
    
    @Field("dynamicType")
    private Integer dynamicType; // 1发圈 2素材
    @Expose
    @Field("jumpLink")
    private String jumpLink;
    
    
    private String startTimeChar;
@@ -304,4 +307,13 @@
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    public String getJumpLink() {
        return jumpLink;
    }
    public void setJumpLink(String jumpLink) {
        this.jumpLink = jumpLink;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/order/OrderMoneyDailyCount.java
New file
@@ -0,0 +1,118 @@
package com.yeshi.fanli.entity.order;
import java.math.BigDecimal;
import java.util.Date;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
/**
 * 订单相关资金统计
 * @author Administrator
 *
 */
@Document(collection = "order_money_daily_count")
public class OrderMoneyDailyCount {
    @Id
    @Field("id")
    private String id;
    @Field("uid")
    private Long uid; // 上级id
    @Field("sourceType")
    private String sourceType; // 来源类型
    @Field("countDay")
    private Date countDay; // 统计日期
    @Field("income")
    private BigDecimal income; // 收入-我的
    @Field("incomeTeam")
    private BigDecimal incomeTeam; // 收入-团队-
    @Field("orderNum")
    private Integer orderNum; // 订单数量-我的
    @Field("orderNumTeam")
    private Integer orderNumTeam; // 订单数量-团队
    @Field("updateTime")
    private Date updateTime; // 更新时间
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    public BigDecimal getIncome() {
        return income;
    }
    public void setIncome(BigDecimal income) {
        this.income = income;
    }
    public BigDecimal getIncomeTeam() {
        return incomeTeam;
    }
    public void setIncomeTeam(BigDecimal incomeTeam) {
        this.incomeTeam = incomeTeam;
    }
    public Integer getOrderNum() {
        return orderNum;
    }
    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }
    public Integer getOrderNumTeam() {
        return orderNumTeam;
    }
    public void setOrderNumTeam(Integer orderNumTeam) {
        this.orderNumTeam = orderNumTeam;
    }
    public Date getCountDay() {
        return countDay;
    }
    public void setCountDay(Date countDay) {
        this.countDay = countDay;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getSourceType() {
        return sourceType;
    }
    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/push/PushGoods.java
@@ -14,6 +14,10 @@
    public final static int STATE_SUCCESS = 1;
    public final static int STATE_FAIL = 2;
    public final static int TYPE_GOODS = 1;
    public final static int TYPE_ACTIVITY = 2;
    @Column(name = "pg_id")
    private Long id;
@@ -66,8 +70,16 @@
    @Column(name = "pg_updatetime")
    private Date updateTime;
    // 是否定时
    private Boolean timeTask;
    // 类型
    @Column(name = "pg_type")
    private Integer type;
    // 其他参数
    @Column(name = "pg_other_id")
    private String otherId;
    // 浏览次数
    @Column(name = "pg_scan_num")
    private Integer scanNum;
    // 定时时间
    private String controlTime_str;
    
@@ -83,8 +95,6 @@
    public PushGoods(Long id){
        this.id = id;
    }
    
    public Long getId() {
        return id;
@@ -214,13 +224,6 @@
        this.controlTime = controlTime;
    }
    public Boolean isTimeTask() {
        return timeTask;
    }
    public void setTimeTask(Boolean timeTask) {
        this.timeTask = timeTask;
    }
    public String getControlTime_str() {
        return controlTime_str;
@@ -238,4 +241,28 @@
        this.remark = remark;
    }
    
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
    public Integer getScanNum() {
        return scanNum;
    }
    public void setScanNum(Integer scanNum) {
        this.scanNum = scanNum;
    }
    public String getOtherId() {
        return otherId;
    }
    public void setOtherId(String otherId) {
        this.otherId = otherId;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/system/ConfigKeyEnum.java
@@ -162,6 +162,7 @@
    openSpeicalAndRelationApply("open_speical_and_relation_apply", "开启会员运营ID与渠道ID申请"),
    hotFunctionUrl("hot_function_url", "热门功能链接"), // 存在2个相同 存在版本区分
    pushGoodsDetails("push_goods_details", "推送页面"),
    pushActivityLink("push_activity_link", "推送发圈活动页面"),
    brandBackgroundPicture("brand_background_picture", "品牌背景图片"),
    articleHotWords("article_hot_words", "动态-学院文章热搜词"),
    inviteRules("invite_rules", "动态-学院文章热搜词"),
@@ -189,6 +190,8 @@
    orderRebateDescLink("order_rebate_desc_link", "订单返利计算说明链接"),
    teamStatisticsLink("team_statistics_link", "推送发圈活动页面"),
    // 平台规则
    platformRule("platform_rule_link", "平台规则");
fanli/src/main/java/com/yeshi/fanli/mapping/ExtractMapper.xml
@@ -22,8 +22,33 @@
        <association property="system" column="sid"
            select="com.yeshi.fanli.dao.mybatis.BusinessSystemMapper.selectByPrimaryKey">
        </association>
    </resultMap>
    <resultMap id="SimplMap" type="com.yeshi.fanli.entity.bus.user.Extract">
        <id column="id" property="id" jdbcType="BIGINT" />
        <result column="account" property="account" jdbcType="VARCHAR" />
        <result column="extractTime" property="extractTime" jdbcType="BIGINT" />
        <result column="receiveTime" property="receiveTime" jdbcType="TIMESTAMP" />
        <result column="ip" property="ip" jdbcType="VARCHAR" />
        <result column="money" property="money" jdbcType="DECIMAL" />
        <result column="name" property="name" jdbcType="VARCHAR" />
        <result column="reason" property="reason" jdbcType="VARCHAR" />
        <result column="state" property="state" jdbcType="INTEGER" />
        <result column="type" property="type" jdbcType="INTEGER" />
        <result column="adminId" property="adminId" jdbcType="BIGINT" />
        <association column="uid" property="userInfo" javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
            <id column="uid" property="id" jdbcType="BIGINT" />
        </association>
        <association column=""sid"" property="system" javaType="com.yeshi.fanli.entity.system.BusinessSystem">
            <id column="sid" property="id" jdbcType="BIGINT" />
        </association>
    </resultMap>
    <sql id="Base_Column_List">
        id,account,extractTime,ip,money,name,reason,state,type,uid,sid,adminId,receiveTime
    </sql>
@@ -428,4 +453,17 @@
    </select>
    
    
    <select id="getExtractSucceedRecord" resultMap="SimplMap">
         SELECT * FROM yeshi_ec_extract t
         WHERE t.`uid` = #{uid} AND t.`state` = 1
         ORDER BY t.`id` DESC
         LIMIT #{start},#{count}
    </select>
    <select id="countExtractSucceedRecord" resultType="Long">
        SELECT COUNT(t.`id`) FROM yeshi_ec_extract t
        WHERE t.`uid` = 389677 AND t.`state` = 1
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SpecialExtraMapper.xml
New file
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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.homemodule.SpecialExtraMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.SpecialExtra">
    <id column="se_id" property="id" jdbcType="BIGINT"/>
    <result column="se_need_spin" property="needSpin" jdbcType="BOOLEAN"/>
    <result column="se_comment" property="comment" jdbcType="VARCHAR"/>
    <result column="se_createtime" property="createtime" jdbcType="TIMESTAMP"/>
    <result column="se_updatetime" property="updatetime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">se_id,se_need_spin,se_comment,se_createtime,se_updatetime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_special_extra where se_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_special_extra where se_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialExtra" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special_extra (se_id,se_need_spin,se_comment,se_createtime,se_updatetime) values (#{id,jdbcType=BIGINT},#{needSpin,jdbcType=BOOLEAN},#{comment,jdbcType=VARCHAR},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialExtra" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_special_extra
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">se_id,</if>
      <if test="needSpin != null">se_need_spin,</if>
      <if test="comment != null">se_comment,</if>
      <if test="createtime != null">se_createtime,</if>
      <if test="updatetime != null">se_updatetime,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="needSpin != null">#{needSpin,jdbcType=BOOLEAN},</if>
      <if test="comment != null">#{comment,jdbcType=VARCHAR},</if>
      <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if>
      <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialExtra">update yeshi_ec_special_extra set se_need_spin = #{needSpin,jdbcType=BOOLEAN},se_comment = #{comment,jdbcType=VARCHAR},se_createtime = #{createtime,jdbcType=TIMESTAMP},se_updatetime = #{updatetime,jdbcType=TIMESTAMP} where se_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SpecialExtra">update yeshi_ec_special_extra
    <set>
      <if test="needSpin != null">se_need_spin=#{needSpin,jdbcType=BOOLEAN},</if>
      <if test="comment != null">se_comment=#{comment,jdbcType=VARCHAR},</if>
      <if test="createtime != null">se_createtime=#{createtime,jdbcType=TIMESTAMP},</if>
      <if test="updatetime != null">se_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if>
    </set> where se_id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/hongbao/HongBaoV2CountMapper.xml
@@ -417,4 +417,20 @@
            AND  DATE_SUB(CURDATE(), INTERVAL #{day} DAY) <![CDATA[<=]]> DATE(v2.`hb_get_time`) 
    </select>
    
    <select id="sumMoneyBySettleTimeAndUid" resultType="BigDecimal">
        SELECT SUM(v2.hb_money) FROM  `yeshi_ec_hongbao_order` h
        LEFT JOIN (SELECT * FROM `yeshi_ec_hongbao_v2` v WHERE v.`hb_uid` = #{uid}) v2 ON IFNULL(v2.`hb_pid`,v2.`hb_id`) = h.`ho_hongbao_id`
        LEFT JOIN `yeshi_ec_common_order` co ON h.`ho_order_id` = co.`co_id`
        WHERE v2.`hb_id` IS NOT NULL AND  co.`co_settle_time`&gt;=#{minDate} AND co.`co_settle_time`<![CDATA[<]]>#{maxDate}
    </select>
    <select id="sumMoneyByANotSettleAndUid" resultType="BigDecimal">
        SELECT SUM(v2.hb_money) FROM  `yeshi_ec_hongbao_order` h
        LEFT JOIN (SELECT * FROM `yeshi_ec_hongbao_v2` v WHERE v.`hb_uid` = #{uid}) v2 ON IFNULL(v2.`hb_pid`,v2.`hb_id`) = h.`ho_hongbao_id`
        LEFT JOIN `yeshi_ec_common_order` co ON h.`ho_order_id` = co.`co_id`
        WHERE v2.`hb_id` IS NOT NULL AND co.co_state = 1
            AND DATE_SUB(CURDATE(), INTERVAL 180 DAY) <![CDATA[<=]]> DATE(co.`co_third_create_time`)
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/order/CommonOrderCountMapper.xml
@@ -359,4 +359,7 @@
                AND DATE_SUB(CURDATE(), INTERVAL #{day} DAY) <![CDATA[<=]]> DATE(d.`co_third_create_time`) 
        GROUP BY d.`co_order_no`,d.`co_source_type`)A
    </select>
</mapper>
fanli/src/main/java/com/yeshi/fanli/mapping/push/PushGoodsMapper.xml
@@ -17,13 +17,16 @@
    <result column="pg_push_time" property="pushTime" jdbcType="TIMESTAMP"/>
    <result column="pg_createtime" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="pg_updatetime" property="updateTime" jdbcType="TIMESTAMP"/>
    <result column="pg_type" property="type" jdbcType="INTEGER"/>
    <result column="pg_other_id" property="otherId" jdbcType="VARCHAR"/>
    <result column="pg_scan_num" property="scanNum" jdbcType="INTEGER"/>
  </resultMap>
  <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime</sql>
  <sql id="Base_Column_List">pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_push_goods where pg_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{versions,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{isPush,jdbcType=INTEGER},#{controlTime,jdbcType=TIMESTAMP},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods (pg_id,pg_alert_title,pg_alert_content,pg_title,pg_content,pg_picture,pg_uid,pg_versions,pg_remark,pg_is_push,pg_control_time,pg_push_time,pg_createtime,pg_updatetime,pg_type,pg_other_id,pg_scan_num) values (#{id,jdbcType=BIGINT},#{alertTitle,jdbcType=VARCHAR},#{alertContent,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{uid,jdbcType=BIGINT},#{versions,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{isPush,jdbcType=INTEGER},#{controlTime,jdbcType=TIMESTAMP},#{pushTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{type,jdbcType=INTEGER},#{otherId,jdbcType=VARCHAR},#{scanNum,jdbcType=INTEGER})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.push.PushGoods" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_push_goods
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">pg_id,</if>
@@ -40,6 +43,9 @@
      <if test="pushTime != null">pg_push_time,</if>
      <if test="createTime != null">pg_createtime,</if>
      <if test="updateTime != null">pg_updatetime,</if>
      <if test="type != null">pg_type,</if>
      <if test="otherId != null">pg_other_id,</if>
      <if test="scanNum != null">pg_scan_num,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
@@ -56,9 +62,12 @@
      <if test="pushTime != null">#{pushTime,jdbcType=TIMESTAMP},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
      <if test="type != null">#{type,jdbcType=INTEGER},</if>
      <if test="otherId != null">#{otherId,jdbcType=VARCHAR},</if>
      <if test="scanNum != null">#{scanNum,jdbcType=INTEGER},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_uid = #{uid,jdbcType=BIGINT},pg_versions = #{versions,jdbcType=VARCHAR},pg_remark = #{remark,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=INTEGER},pg_control_time = #{controlTime,jdbcType=TIMESTAMP},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP} where pg_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods set pg_alert_title = #{alertTitle,jdbcType=VARCHAR},pg_alert_content = #{alertContent,jdbcType=VARCHAR},pg_title = #{title,jdbcType=VARCHAR},pg_content = #{content,jdbcType=VARCHAR},pg_picture = #{picture,jdbcType=VARCHAR},pg_uid = #{uid,jdbcType=BIGINT},pg_versions = #{versions,jdbcType=VARCHAR},pg_remark = #{remark,jdbcType=VARCHAR},pg_is_push = #{isPush,jdbcType=INTEGER},pg_control_time = #{controlTime,jdbcType=TIMESTAMP},pg_push_time = #{pushTime,jdbcType=TIMESTAMP},pg_createtime = #{createTime,jdbcType=TIMESTAMP},pg_updatetime = #{updateTime,jdbcType=TIMESTAMP},pg_type = #{type,jdbcType=INTEGER},pg_other_id = #{otherId,jdbcType=VARCHAR},pg_scan_num = #{scanNum,jdbcType=INTEGER} where pg_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.push.PushGoods">update yeshi_ec_push_goods
    <set>
      <if test="alertTitle != null">pg_alert_title=#{alertTitle,jdbcType=VARCHAR},</if>
@@ -74,6 +83,9 @@
      <if test="pushTime != null">pg_push_time=#{pushTime,jdbcType=TIMESTAMP},</if>
      <if test="createTime != null">pg_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="updateTime != null">pg_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
      <if test="type != null">pg_type=#{type,jdbcType=INTEGER},</if>
      <if test="otherId != null">pg_other_id=#{otherId,jdbcType=VARCHAR},</if>
      <if test="scanNum != null">pg_scan_num=#{scanNum,jdbcType=INTEGER},</if>
    </set> where pg_id = #{id,jdbcType=BIGINT}
  </update>
  <delete id="deleteBatchByPrimaryKey"  parameterType="java.util.List">
fanli/src/main/java/com/yeshi/fanli/service/impl/count/HongBaoV2CountServiceImpl.java
@@ -174,4 +174,26 @@
    public BigDecimal sumMoneyArrivalByUidAndNearDay(Long uid, int day) {
        return hongBaoV2CountMapper.sumMoneyArrivalByUidAndNearDay(uid, day);
    }
    @Override
    public BigDecimal sumMoneyBySettleTimeAndUid(Long uid, Date minDate, Date maxDate) {
         BigDecimal money = hongBaoV2CountMapper.sumMoneyBySettleTimeAndUid(uid, minDate, maxDate);
         if (money == null) {
             money = new BigDecimal(0);
         }
         return money;
    }
    @Override
    public BigDecimal sumMoneyByANotSettleAndUid(Long uid) {
         BigDecimal money = hongBaoV2CountMapper.sumMoneyByANotSettleAndUid(uid);
         if (money == null) {
             money = new BigDecimal(0);
         }
         return money;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -1001,7 +1001,7 @@
    }
    @Override
    public void saveActivityPic(String pid, ImgInfo imgInfo, MultipartHttpServletRequest fileRequest)
    public void saveActivityPic(String pid, ImgInfo imgInfo, String picUrls, MultipartHttpServletRequest fileRequest)
            throws GoodsEvaluateException, Exception {
        if (StringUtil.isNullOrEmpty(pid)) {
            throw new GoodsEvaluateException(1, "请保存第一部分信息");
@@ -1011,106 +1011,121 @@
        if (resultObj == null)
            throw new GoodsEvaluateException(1, "第一部分信息缺失");
        String videoPic = null;
        String activityPic = null;
        if (imgInfo == null || StringUtil.isNullOrEmpty(imgInfo.getActivityUrl())) {
            throw new GoodsEvaluateException(1, "活动链接不能为空");
        }
        ImgInfo imgVideo = null;
        ImgInfo imgactivity = null;
        List<String> listDel = new ArrayList<String>();
        List<ImgInfo> listOld = new ArrayList<ImgInfo>();
        List<ImgInfo> resultList = resultObj.getImgList();
        if (resultList != null && resultList.size() > 0) {
            for (ImgInfo info : resultList) {
                if (info.getType() == ImgEnum.activity) {
                    activityPic = info.getActivityPic();
                    imgactivity = info;
                } else {
                if (info.getType() == ImgEnum.video) {
                    imgVideo = info;
                    videoPic = info.getUrl();
                } else {
                    listOld.add(info);
                }
            }
        }
        int width = 0;
        int height = 0;
        int width2 = 0;
        int height2 = 0;
        List<ImgInfo> listImg = new ArrayList<ImgInfo>();
        // 视频部分
        if (fileRequest != null) {
            MultipartFile filevideo = fileRequest.getFile("filevideo");
            if (filevideo != null) {
                removePicture(videoPic);
                if (StringUtil.isNullOrEmpty(imgInfo.getVideoUrl())) {
                    throw new GoodsEvaluateException(1, "视频链接不能为空");
                }
                ImgInfo info = uploadVideoPicture(filevideo);
                if (info == null)
                    throw new GoodsEvaluateException(2, "视频图片上传失败");
                videoPic = info.getUrl();
                width = info.getW();
                height = info.getH();
            }
            MultipartFile activityfile = fileRequest.getFile("activityfile");
            if (activityfile != null) {
                removePicture(activityPic);
                InputStream inputStream = activityfile.getInputStream();
                BufferedImage sourceImg = ImageIO.read(inputStream);
                width2 = sourceImg.getWidth();
                height2 = sourceImg.getHeight();
                String picLink = uploadPicture(activityfile);
                activityPic = picLink;
            }
        }
        if (!StringUtil.isNullOrEmpty(videoPic) || !StringUtil.isNullOrEmpty(imgInfo.getVideoUrl())) {
            if (imgVideo != null) {
                imgVideo.setUrl(videoPic);
                imgVideo.setUrlHD(videoPic);
                imgVideo.setVideoUrl(imgInfo.getVideoUrl());
                    String url = imgVideo.getUrl();
                    if (!StringUtil.isNullOrEmpty(url)) {
                        listDel.add(url);
                    }
                    imgVideo.setUrl(info.getUrl());
                    imgVideo.setUrlHD(info.getUrl());
            } else {
                imgVideo = new ImgInfo();
                imgVideo.setId(UUID.randomUUID().toString().replace("-", ""));
                imgVideo.setLarge(true);
                imgVideo.setPid(pid);
                imgVideo.setUrl(videoPic);
                imgVideo.setUrlHD(videoPic);
                    imgVideo.setUrl(info.getUrl());
                    imgVideo.setUrlHD(info.getUrl());
                imgVideo.setVideoUrl(imgInfo.getVideoUrl());
                imgVideo.setType(ImgEnum.video);
            }
            if (width > 0) {
                imgVideo.setW(width);
                imgVideo.setH(height);
            } else {
                imgVideo.setW(imgVideo.getW());
                imgVideo.setH(imgVideo.getH());
                imgVideo.setW(info.getW());
                imgVideo.setH(info.getH());
            }
            listImg.add(imgVideo);
        }
        int totalImg = 0;
        if (!StringUtil.isNullOrEmpty(activityPic) || !StringUtil.isNullOrEmpty(imgInfo.getActivityUrl())) {
            if (imgactivity != null) {
                imgactivity.setUrl(activityPic);
                imgactivity.setUrlHD(activityPic);
                imgactivity.setActivityUrl(imgInfo.getActivityUrl());
            } else {
                imgactivity = new ImgInfo();
                imgactivity.setId(UUID.randomUUID().toString().replace("-", ""));
                imgactivity.setLarge(true);
                imgactivity.setPid(pid);
                imgactivity.setUrl(activityPic);
                imgactivity.setUrlHD(activityPic);
                imgactivity.setActivityUrl(imgInfo.getActivityUrl());
                imgactivity.setType(ImgEnum.activity);
        List<ImgInfo> listImg = new ArrayList<ImgInfo>();
        if (imgVideo != null) {
            if (!StringUtil.isNullOrEmpty(imgInfo.getVideoUrl())) {
                if (imgVideo != null && StringUtil.isNullOrEmpty(imgVideo.getUrl())) {
                    throw new GoodsEvaluateException(1, "视频封面图不能为空");
            }
            if (width2 > 0) {
                imgactivity.setW(width2);
                imgactivity.setH(height2);
                imgVideo.setVideoUrl(imgInfo.getVideoUrl());
                listImg.add(imgVideo);
            } else {
                imgactivity.setW(imgactivity.getW());
                imgactivity.setH(imgactivity.getH());
                String url = imgVideo.getUrl();
                if (!StringUtil.isNullOrEmpty(url)) {
                    listDel.add(url);
            }
            listImg.add(imgactivity);
            totalImg++;
            }
        }
        // 编辑图片
        List<ImgInfo> tempList = new ArrayList<ImgInfo>();
        if (!StringUtil.isNullOrEmpty(picUrls)) {
            String[] pics = picUrls.split(",");
            if (pics != null) {
                for (int i = 0; i < pics.length; i++) {
                    String picLink = pics[i];
                    if (picLink.startsWith("http")) {
                        if (listOld != null) {
                            for (ImgInfo info: listOld) {
                                if (info.getUrl().equals(picLink)) {
                                    tempList.add(info);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
        // 上传文件替换
        if (fileRequest != null) {
            for (int i = 0; i < 9; i++) {
                MultipartFile file = fileRequest.getFile("file" + i);
                if (file != null) {
                    ImgInfo info = uploadVideoPicture(file);
                    ImgInfo imgInfo0 = new ImgInfo();
                    imgInfo0.setId(UUID.randomUUID().toString().replace("-", ""));
                    imgInfo0.setLarge(false);
                    imgInfo0.setPid(pid);
                    imgInfo0.setUrl(info.getUrl());
                    imgInfo0.setUrlHD(info.getUrl());
                    imgInfo0.setType(ImgEnum.img);
                    imgInfo0.setW(info.getW());
                    imgInfo0.setH(info.getH());
                    if (i < tempList.size()) {
                        tempList.set(i, imgInfo0);
                    } else {
                        tempList.add(imgInfo0);
                    }
                }
            }
        }
        int lineNum = 0;
        int totalImg = tempList.size();
        if (totalImg > 0) {
            if (totalImg == 1) {
                lineNum = 1;
@@ -1123,9 +1138,38 @@
            }
        }
        if (tempList.size() > 0) {
            listImg.addAll(tempList);
        }
        // 清理老图片
        if (listOld != null && listOld.size() > 0) {
            for (ImgInfo infoOld: listOld) {
                boolean del = true;
                String oldPic = infoOld.getUrl();
                for (ImgInfo info : listImg) {
                    if (info.getUrl().equals(oldPic)) {
                        del = false;
                    }
                }
                if (del)
                    listDel.add(infoOld.getUrl());
            }
        }
        resultObj.setJumpLink(imgInfo.getActivityUrl());
        resultObj.setLineNum(lineNum);
        resultObj.setImgList(listImg);
        goodsEvaluateDao.save(resultObj);
        // 删除图片
        if (listDel.size() > 0) {
            for (String url : listDel) {
                if (url.contains(FilePathEnum.goodsEvaluate.getPath())) {
                    removePicture(url);
                }
            }
        }
    }
    @Override
@@ -1458,13 +1502,13 @@
    }
    @Override
    public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType) {
        return goodsEvaluateDao.query(start, count, key, state, dynamicType);
    public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, String typeEnum) {
        return goodsEvaluateDao.query(start, count, key, state, dynamicType, typeEnum);
    }
    @Override
    public long count(String key, Integer state, int dynamicType) {
        return goodsEvaluateDao.count(key, state, dynamicType);
    public long count(String key, Integer state, int dynamicType, String typeEnum) {
        return goodsEvaluateDao.count(key, state, dynamicType, typeEnum);
    }
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialExtraServiceImpl.java
New file
@@ -0,0 +1,60 @@
package com.yeshi.fanli.service.impl.homemodule;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.homemodule.SpecialExtraMapper;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException;
import com.yeshi.fanli.exception.homemodule.SpecialException;
import com.yeshi.fanli.service.inter.homemodule.SpecialExtraService;
import com.yeshi.fanli.service.manger.goods.ConvertLinkManager;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
@Service
public class SpecialExtraServiceImpl implements SpecialExtraService {
    @Resource
    private SpecialExtraMapper specialExtraMapper;
    @Resource
    private ConvertLinkManager convertLinkManager;
    @Override
    public void saveExtraInfo(SpecialExtra record) throws SpecialException {
        if (record == null || record.getId() == null)
            return;
        if (!StringUtil.isNullOrEmpty(record.getComment())) {
            if (record.getNeedSpin() == null)
                record.setNeedSpin(false);
            if (record.getNeedSpin()) {
                try {
                    convertLinkManager.convertLinkFromText(record.getComment(), Constant.LINK_TOKEN_VERIFY_UID, true);
                } catch (ConvertLinkExceptionException e) {
                    if (ConvertLinkExceptionException.CODE_NONE != e.getCode()) {
                        throw new SpecialException(1, "包含不可转链的口令与链接");
                    }
                } catch (Exception e) {
                    throw new SpecialException(1, "包含不可转链的口令与链接");
                }
            }
        }
        SpecialExtra extra = specialExtraMapper.selectByPrimaryKey(record.getId());
        if (extra == null) {
            specialExtraMapper.insertSelective(record);
        } else {
            specialExtraMapper.updateByPrimaryKeySelective(record);
        }
    }
    @Override
    public SpecialExtra selectByPrimaryKey(Long id) {
        return specialExtraMapper.selectByPrimaryKey(id);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java
@@ -12,6 +12,7 @@
import javax.annotation.Resource;
import org.apache.commons.beanutils.PropertyUtils;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -26,6 +27,7 @@
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl;
import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.exception.banner.SwiperPictureException;
@@ -35,12 +37,14 @@
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.homemodule.AdActivityVersionControlService;
import com.yeshi.fanli.service.inter.homemodule.SpecialCardService;
import com.yeshi.fanli.service.inter.homemodule.SpecialExtraService;
import com.yeshi.fanli.service.inter.homemodule.SpecialPlaceService;
import com.yeshi.fanli.service.inter.homemodule.SpecialService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.FilePathEnum;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import net.sf.json.JSONObject;
@@ -55,6 +59,9 @@
    @Resource
    private SpecialCardService specialCardService;
    @Resource
    private SpecialExtraService specialExtraService;
    @Resource
    private JumpDetailV2Service jumpDetailV2Service;
@@ -75,7 +82,7 @@
    @Override
    public void saveObject(MultipartFile file, MultipartFile file2, MultipartFile file3, Special record,
            String jumpType) throws SpecialException, Exception {
            String jumpType, SpecialExtra extra) throws SpecialException, Exception {
        Long cardId = record.getCardId();
        if (cardId == null) {
@@ -149,6 +156,8 @@
            record.setUpdatetime(new Date());
            specialMapper.insert(record);
            extra.setId(record.getId());
            Special s = new Special();
            s.setId(record.getId());
            s.setOrderby(Integer.parseInt(s.getId() + ""));
@@ -213,7 +222,12 @@
            record.setUpdatetime(new Date());
            specialMapper.updateByPrimaryKey(record);
            extra.setId(record.getId());
        }
        // 添加补充信息
        specialExtraService.saveExtraInfo(extra);
    }
    /**
@@ -374,61 +388,84 @@
    }
    @Override
    public List<Special> listQueryByCard(long start, int count, Long card, String key, Integer sex) {
    public List<SpecialVO> listQueryByCard(long start, int count, Long card, String key, Integer sex) {
        List<Special> list = specialMapper.listQueryByCard(start, count, card, key, sex);
        if (list == null || list.size() == 0) {
            return list;
        if (list == null) {
            return null;
        }
        // 跳转链接
        List<SpecialVO> listvo = new ArrayList<SpecialVO>();
        for (Special special : list) {
            if (special.getState() != null && special.getState().longValue() == 0) {
                special.setState(1L);
            } else {
                special.setState(0L);
            SpecialVO specialVO = new SpecialVO();
            try {
                PropertyUtils.copyProperties(specialVO, special);
            } catch (Exception e) {
                e.printStackTrace();
                continue;
            }
            
            Date startTime = special.getStartTime();
            Date endTime = special.getEndTime();
            if (specialVO.getState() != null && specialVO.getState().longValue() == 0) {
                specialVO.setState(1L);
            } else {
                specialVO.setState(0L);
            }
            Date startTime = specialVO.getStartTime();
            Date endTime = specialVO.getEndTime();
            if (startTime == null && endTime == null) {
                special.setStartTime_str("");
                special.setEndTime_str("");
                specialVO.setStartTime_str("");
                specialVO.setEndTime_str("");
            } else {
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm");
                if (startTime == null) {
                    special.setStartTime_str("");
                    specialVO.setStartTime_str("");
                } else {
                    special.setStartTime_str(sdf.format(startTime));
                    specialVO.setStartTime_str(sdf.format(startTime));
                }
                if (endTime == null) {
                    special.setEndTime_str("");
                    specialVO.setEndTime_str("");
                } else {
                    special.setEndTime_str(sdf.format(endTime));
                    specialVO.setEndTime_str(sdf.format(endTime));
                }
            }
            String params = special.getParams();
            String params = specialVO.getParams();
            if (StringUtil.isNullOrEmpty(params)) {
                special.setParams("");
                specialVO.setParams("");
            }
            String remark = special.getRemark();
            String remark = specialVO.getRemark();
            if (StringUtil.isNullOrEmpty(remark)) {
                special.setRemark("");
                specialVO.setRemark("");
            }
            JumpDetailV2 jumpDetail = special.getJumpDetail();
            JumpDetailV2 jumpDetail = specialVO.getJumpDetail();
            if (jumpDetail == null) {
                // 默认未选择
                JumpDetailV2 jumpDetailV2 = new JumpDetailV2();
                jumpDetailV2.setName("-未选择-");
                jumpDetailV2.setType("default");
                special.setJumpDetail(jumpDetailV2);
                specialVO.setJumpDetail(jumpDetailV2);
            }
            // 补充信息
            SpecialExtra extra = specialExtraService.selectByPrimaryKey(specialVO.getId());
            if (extra == null) {
                specialVO.setNeedSpin(false);
                specialVO.setComment("");
            } else {
                specialVO.setNeedSpin(extra.getNeedSpin());
                if (StringUtil.isNullOrEmpty(extra.getComment())) {
                    specialVO.setComment("");
                } else {
                    specialVO.setComment(extra.getComment());
            }
        }
        return list;
            listvo.add(specialVO);
        }
        return listvo;
    }
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java
@@ -1350,4 +1350,15 @@
        }
    }
    @Override
    public List<Extract> getExtractSucceedRecord(int page, int pageSize, Long uid) {
        return extractMapper.getExtractSucceedRecord((page-1)*pageSize, pageSize, uid);
    }
    @Override
    public long countExtractSucceedRecord(Long uid) {
       Long count = extractMapper.countExtractSucceedRecord(uid);
       return count== null? 0 : count;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderMoneyDailyCountServiceImpl.java
New file
@@ -0,0 +1,53 @@
package com.yeshi.fanli.service.impl.order;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.order.OrderMoneyDailyCountDao;
import com.yeshi.fanli.entity.order.OrderMoneyDailyCount;
import com.yeshi.fanli.service.inter.order.OrderMoneyDailyCountService;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
@Service
public class OrderMoneyDailyCountServiceImpl implements OrderMoneyDailyCountService {
    @Resource
    private OrderMoneyDailyCountDao orderMoneyDailyCountDao;
    @Override
    @RequestSerializableByKeyService(key = "#record.uid")
    public void saveDailyCount(OrderMoneyDailyCount record) {
        if (record.getUid() == null || record.getCountDay() == null || StringUtil.isNullOrEmpty(record.getSourceType())) {
            return; // 参数不全
        }
        String gernalTime = TimeUtil.getGernalTime(record.getCountDay().getTime());
        String id = StringUtil.Md5(record.getUid() + record.getSourceType() + gernalTime);
        // id
        record.setId(id);
        // 统计日期-年月日
        record.setCountDay(new Date(TimeUtil.convertDateToTemp(gernalTime)));
        OrderMoneyDailyCount dailyCount = orderMoneyDailyCountDao.getById(id);
        if (dailyCount == null) {
            // 选择性更新
            orderMoneyDailyCountDao.save(record);
        } else {
            // 选择性插入
            orderMoneyDailyCountDao.updateSelective(record);
        }
    }
    @Override
    public List<OrderMoneyDailyCount> query(Long uid, Date minDay, Date maxDay) {
        return orderMoneyDailyCountDao.query(uid, minDay, maxDay);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushGoodsServiceImpl.java
@@ -12,6 +12,10 @@
import org.springframework.transaction.annotation.Transactional;
import com.yeshi.fanli.dao.mybatis.push.PushGoodsMapper;
import com.yeshi.fanli.entity.dynamic.GoodsEvaluate;
import com.yeshi.fanli.entity.dynamic.GoodsEvaluate.EvaluateEnum;
import com.yeshi.fanli.entity.dynamic.ImgInfo;
import com.yeshi.fanli.entity.dynamic.ImgInfo.ImgEnum;
import com.yeshi.fanli.entity.goods.CommonGoods;
import com.yeshi.fanli.entity.push.PushGoods;
import com.yeshi.fanli.entity.push.PushGoodsGroup;
@@ -20,6 +24,7 @@
import com.yeshi.fanli.exception.push.PushException;
import com.yeshi.fanli.exception.push.PushGoodsException;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
import com.yeshi.fanli.service.inter.push.PushGoodsGroupService;
import com.yeshi.fanli.service.inter.push.PushGoodsService;
@@ -47,6 +52,11 @@
    @Resource
    private PushGoodsGroupService pushGoodsGroupService;
    @Resource
    private GoodsEvaluateService goodsEvaluateService;
    @Override
    public int deleteByPrimaryKey(Long id) throws PushGoodsException {
@@ -81,23 +91,14 @@
    @Override
    @Transactional(rollbackFor=Exception.class)
    public void save(PushGoods record, List<Long> goodsIds) throws PushGoodsException, Exception {
        // 定时时间
        Boolean timeTask = record.isTimeTask();
        if (timeTask != null && timeTask) {
            String controlTime_str = record.getControlTime_str();
            if (controlTime_str == null || controlTime_str.trim().length() == 0) {
                throw new PushGoodsException(1, "预设时间不能为空");
            }
        if (StringUtil.isNullOrEmpty(record.getControlTime_str())) {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
            controlTime_str = controlTime_str.replaceAll("T", " ");
            record.setControlTime(format.parse(controlTime_str));
        } else {
            record.setControlTime(null);
            record.setControlTime(format.parse(record.getControlTime_str().replaceAll("T", " ")));
        }
        record.setIsPush(PushGoods.STATE_INIT);
        record.setType(PushGoods.TYPE_GOODS);
        
        boolean isAdd = false;
        // 推送id
@@ -130,7 +131,6 @@
    @Transactional(rollbackFor=Exception.class)
    public void saveGoodsInfo(boolean isAdd, Long pushId, List<Long> goodsIds) throws Exception {
        if (goodsIds == null || goodsIds.size() == 0) {
            if (!isAdd) {
                pushGoodsGroupService.deleteByPushId(pushId);
@@ -156,16 +156,12 @@
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        /* 修改时删除 部分 */
        if (!isAdd) {
            List<Long> listdelete = new ArrayList<Long>();
            List<PushGoodsGroup> listGroup = pushGoodsGroupService.selectByPushId(pushId);
            if (listGroup != null && listGroup.size() > 0) {
                for (PushGoodsGroup group : listGroup) {
                    Long groupId = group.getId();
@@ -199,11 +195,86 @@
                pushGoodsGroup.setCommonGoods(new CommonGoods(cid));
                listAdd.add(pushGoodsGroup);
            }
            pushGoodsGroupService.insertBatch(listAdd);
        }
    }
    @Override
    @Transactional(rollbackFor=Exception.class)
    public void saveInfo(PushGoods record) throws PushGoodsException, Exception {
        if (StringUtil.isNullOrEmpty(record.getOtherId())) {
            throw new PushGoodsException(1, "相关内容ID不能为空");
        }
        if (StringUtil.isNullOrEmpty(record.getTitle())) {
            throw new PushGoodsException(1, "标题不能为空");
        }
        if (StringUtil.isNullOrEmpty(record.getContent())) {
            throw new PushGoodsException(1, "内容不能为空");
        }
        if (record.getType() == null) {
            throw new PushGoodsException(1, "推送类型不能为空");
        }
        if (record.getType() == PushGoods.TYPE_ACTIVITY) {
            GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(record.getOtherId());
            if (goodsEvaluate == null) {
                throw new PushGoodsException(1, "发圈活动信息不存在");
            }
            if (goodsEvaluate.getType() != EvaluateEnum.activity) {
                throw new PushGoodsException(1, "该内容非发圈活动信息");
            }
            String picUrl = null;
            List<ImgInfo> imgList = goodsEvaluate.getImgList();
            if (imgList != null && imgList.size() > 0) {
                for (ImgInfo imgInfo: imgList) {
                    if (imgInfo.getType() == ImgEnum.img && !StringUtil.isNullOrEmpty(imgInfo.getUrl())) {
                        picUrl = imgInfo.getUrl();
                    }
                }
            }
            if (StringUtil.isNullOrEmpty(picUrl)) {
                throw new PushGoodsException(1, "该非发圈活动无图片信息");
            }
            record.setPicture(picUrl);
        }
        // 定时时间
        if (StringUtil.isNullOrEmpty(record.getControlTime_str())) {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
            record.setControlTime(format.parse(record.getControlTime_str().replaceAll("T", " ")));
        }
        // 浏览数量随机
        if (record.getScanNum() == null || record.getScanNum()  <= 0)
            record.setScanNum((int) (Math.random() * 5000) + 1000);
        record.setIsPush(PushGoods.STATE_INIT);
        record.setAlertTitle(record.getTitle());
        record.setAlertContent(record.getContent());
        Long id = record.getId();
        if (id == null) {
            record.setCreateTime(new Date());
            pushGoodsMapper.insert(record);
        } else {
            PushGoods current = pushGoodsMapper.selectByPrimaryKey(id);
            if (current == null) {
                throw new PushGoodsException(1, "该记录已不存在");
            }
            record.setCreateTime(current.getCreateTime());
            record.setScanNum(current.getScanNum());
            record.setUpdateTime(new Date());
            pushGoodsMapper.updateByPrimaryKey(record);
        }
    }
    @Override
    @Transactional(rollbackFor=Exception.class)
@@ -292,15 +363,102 @@
    
    @Override
    public void executePush(PushGoods pushGoods) throws Exception, PushGoodsException, PushException {
        Long id = pushGoods.getId();
        String alertTitle = pushGoods.getAlertTitle();
        String alertContent = pushGoods.getAlertContent();
        if (StringUtil.isNullOrEmpty(alertTitle) || StringUtil.isNullOrEmpty(alertContent)) {
        if (StringUtil.isNullOrEmpty(pushGoods.getTitle()) || StringUtil.isNullOrEmpty(pushGoods.getContent())) {
            throw new PushGoodsException(1, "推送标题及内容不能为空");
        }
        if (StringUtil.isNullOrEmpty(pushGoods.getVersions())) {
            throw new PushGoodsException(1, "推送版本不能为空");
        }
        if (pushGoods.getType() == null || pushGoods.getType() == PushGoods.TYPE_GOODS) {
            executePushGoods(pushGoods); // 推送商品
        } else if (pushGoods.getType() == PushGoods.TYPE_ACTIVITY) {
            executePushActivity(pushGoods); // 推送活动
        }
    }
    /**
     * 推送活动
     * @param pushGoods
     * @throws Exception
     * @throws PushGoodsException
     * @throws PushException
     */
    private void executePushActivity(PushGoods pushGoods) throws Exception, PushGoodsException, PushException {
        String otherId = pushGoods.getOtherId();
        if (StringUtil.isNullOrEmpty(otherId)) {
            throw new PushGoodsException(1, "活动id不能为空");
        }
        GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(otherId);
        if (goodsEvaluate == null) {
            throw new PushGoodsException(1, "发圈活动信息不存在");
        }
        if (goodsEvaluate.getType() != EvaluateEnum.activity) {
            throw new PushGoodsException(1, "该内容非发圈活动信息");
        }
        String picUrl = null;
        List<ImgInfo> imgList = goodsEvaluate.getImgList();
        if (imgList != null && imgList.size() > 0) {
            for (ImgInfo imgInfo: imgList) {
                if (imgInfo.getType() == ImgEnum.img && !StringUtil.isNullOrEmpty(imgInfo.getUrl())) {
                    picUrl = imgInfo.getUrl();
                }
            }
        }
        if (StringUtil.isNullOrEmpty(picUrl)) {
            throw new PushGoodsException(1, "该非发圈活动无图片信息");
        }
        String versions = pushGoods.getVersions();
        JSONObject json = JSONObject.fromObject(versions);
        String versionsIOS = json.getString("IOS");
        List<String> listIOS = new ArrayList<String>();
        if (versionsIOS != null && versionsIOS.trim().length() > 0) {
            if (versionsIOS.contains("全推")) {
                listIOS = null;
            } else {
                listIOS = Arrays.asList(versionsIOS.split(","));
            }
        }
        List<String> listAndroid = new ArrayList<String>();
        String versionsAndroid  = json.getString("Android");
        if (versionsAndroid != null && versionsAndroid.trim().length() > 0) {
            if (versionsAndroid.contains("全推")) {
                listAndroid = null;
            } else {
                listAndroid = Arrays.asList(versionsAndroid.split(","));
            }
        }
        String url = configService.get(ConfigKeyEnum.pushActivityLink.getKey());
        if (StringUtil.isNullOrEmpty(url)) {
            throw new PushGoodsException(1, "推送页面链接不存在");
        }
        url = url + "?id=" + pushGoods.getId() + "&otherId=" + pushGoods.getOtherId();
        // h活动全推
        pushService.pushUrl(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url, listIOS, listAndroid);
    }
    /**
     * 推送商品
     * @param pushGoods
     * @throws Exception
     * @throws PushGoodsException
     * @throws PushException
     */
    private void executePushGoods(PushGoods pushGoods) throws Exception, PushGoodsException, PushException {
        Long id = pushGoods.getId();
        List<PushGoodsGroup> goodsList = pushGoodsGroupService.getAllInfoByPushId(id);
        if (goodsList == null || goodsList.size() == 0) {
            throw new PushGoodsException(1, "推送无商品,请完善数据");
@@ -342,9 +500,7 @@
            Long goodsId = commonGoods.getGoodsId();
            String url = "https://item.taobao.com/item.htm?id=" + goodsId;
            pushService.pushGoods(pushGoods.getUid(), alertTitle, alertContent, url,listIOS, listAndroid);
            pushService.pushGoods(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url,listIOS, listAndroid);
        } else {
            /*   多个商品推送    */
            String url = configService.get(ConfigKeyEnum.pushGoodsDetails.getKey());
@@ -353,9 +509,9 @@
            }
            // 生成链接
            url = url + "?id=" + id;
            pushService.pushUrl(pushGoods.getUid(), pushGoods.getTitle(), pushGoods.getContent(), url, listIOS, listAndroid);
        }
    }
            pushService.pushUrl(pushGoods.getUid(), alertTitle, alertContent, url, listIOS, listAndroid);
        }
    }
    
}
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserCustomSettingsServiceImpl.java
@@ -6,6 +6,7 @@
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.yeshi.fanli.dao.mybatis.user.UserCustomSettingsMapper;
import com.yeshi.fanli.entity.bus.user.UserCustomSettings;
@@ -22,6 +23,7 @@
    private UserCustomSettingsMapper userCustomSettingsMapper;
    @Override
    @Transactional
    public void saveModuleState(Long uid, String type, Integer state) throws UserCustomSettingsException {
        if (uid == null || type == null || state == null || state > 1 || state < 0) {
            throw new UserCustomSettingsException(1, "传递参数不正确");
@@ -64,7 +66,6 @@
            settings.setCreateTime(new Date());
            userCustomSettingsMapper.insertSelective(settings);
        }
    }
    @Override
@@ -72,13 +73,11 @@
        if (uid == null) {
            throw new UserCustomSettingsException(1, "uid不能为空");
        }
        return userCustomSettingsMapper.getSettingsByUid(uid);
    }
    @Override
    public UserCustomSettings getSettingsByUidAndType(Long uid, String type) throws UserCustomSettingsException {
        if (uid == null || type == null || type.trim().length() == 0) {
            throw new UserCustomSettingsException(1, "传递的参数不能为空");
        }
@@ -117,7 +116,7 @@
                } else if (typeEnum.equals(UserSettingTypeEnum.openSpreadHongBao)) {
                    userSettingsVO.setOpenSpreadHongBao(state);
                } else if (typeEnum.equals(UserSettingTypeEnum.noDisplayPhoneNum)) {
                    userSettingsVO.setOpenSpreadHongBao(state);
                    userSettingsVO.setNoDisplayPhoneNum(state);
                }
            }
        }
fanli/src/main/java/com/yeshi/fanli/service/inter/count/HongBaoV2CountService.java
@@ -208,5 +208,22 @@
     * @return
     */
    public BigDecimal sumMoneyArrivalByUidAndNearDay(Long uid, int day);
    /**
     * 统计收货金额
     * @param uid
     * @param minDate
     * @param maxDate
     * @return
     */
    public BigDecimal sumMoneyBySettleTimeAndUid(Long uid, Date minDate, Date maxDate);
    /**
     * 180天内未收货的金额
     * @param uid
     * @return
     */
    public BigDecimal sumMoneyByANotSettleAndUid(Long uid);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/dynamic/GoodsEvaluateService.java
@@ -43,9 +43,9 @@
     * @param state
     * @return
     */
    public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType);
    public List<GoodsEvaluate> query(int start, int count, String key, Integer state, int dynamicType, String typeEnum);
    public long count(String key, Integer state,int dynamicType);
    public long count(String key, Integer state,int dynamicType, String typeEnum);
    
    /**
@@ -92,7 +92,7 @@
    public void saveCurrencyCoupon(String pid, int kind, CommentInfo commentInfo) throws GoodsEvaluateException, Exception;
    public void saveActivityPic(String pid, ImgInfo imgInfo, MultipartHttpServletRequest fileRequest)
    public void saveActivityPic(String pid, ImgInfo imgInfo, String picUrls, MultipartHttpServletRequest fileRequest)
            throws GoodsEvaluateException, Exception;
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialExtraService.java
New file
@@ -0,0 +1,27 @@
package com.yeshi.fanli.service.inter.homemodule;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.exception.homemodule.SpecialException;
/**
 *  专题额外
 *
 * @author Administrator
 *
 */
public interface SpecialExtraService{
    /**
     * 保存信息
     * @param record
     */
    public void saveExtraInfo(SpecialExtra record) throws SpecialException;
    /**
     * 查询
     * @param id
     * @return
     */
    public SpecialExtra selectByPrimaryKey(Long id);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/SpecialService.java
@@ -6,7 +6,9 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.homemodule.Special;
import com.yeshi.fanli.entity.bus.homemodule.SpecialExtra;
import com.yeshi.fanli.exception.homemodule.SpecialException;
import com.yeshi.fanli.vo.homemodule.SpecialVO;
import net.sf.json.JSONObject;
@@ -22,7 +24,7 @@
    public Special selectByPrimaryKey(Long id);
    public List<Special> listQueryByCard(long start, int count, Long card, String key, Integer sex);
    public List<SpecialVO> listQueryByCard(long start, int count, Long card, String key, Integer sex);
    public long countlistQueryByCard(Long card, String key, Integer sex);
@@ -70,7 +72,7 @@
     * @throws SpecialException
     * @throws Exception
     */
    public void saveObject(MultipartFile file, MultipartFile file2, MultipartFile file3, Special record, String jumpType) throws SpecialException, Exception;
    public void saveObject(MultipartFile file, MultipartFile file2, MultipartFile file3, Special record, String jumpType, SpecialExtra extra) throws SpecialException, Exception;
    /**
     * 更换顺序
fanli/src/main/java/com/yeshi/fanli/service/inter/money/extract/ExtractService.java
@@ -138,5 +138,21 @@
    public List<String> getAutoExtractOpenIdsTo1212() throws Exception;
    public List<UserInfo> preAutoUserTo1212() throws Exception;
    /**
     * 获取提现成功记录
     * @param page
     * @param pageSize
     * @param uid
     * @return
     */
    public List<Extract> getExtractSucceedRecord(int page, int pageSize, Long uid);
    /**
     * 统计提现成功记录
     * @param uid
     * @return
     */
    public long countExtractSucceedRecord(Long uid);
    
}
fanli/src/main/java/com/yeshi/fanli/service/inter/order/OrderMoneyDailyCountService.java
New file
@@ -0,0 +1,25 @@
package com.yeshi.fanli.service.inter.order;
import java.util.Date;
import java.util.List;
import com.yeshi.fanli.entity.order.OrderMoneyDailyCount;
public interface OrderMoneyDailyCountService {
    /**
     * 查询
     * @param uid
     * @param minDay 可为空
     * @param maxDay 可为空
     * @return
     */
    public List<OrderMoneyDailyCount> query(Long uid, Date minDay, Date maxDay);
    /**
     * 保存-更新信息
     * @param record
     */
    public void saveDailyCount(OrderMoneyDailyCount record);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/push/PushGoodsService.java
@@ -83,5 +83,13 @@
     * @throws PushException
     */
    public void handPush(Long id) throws Exception, PushGoodsException, PushException;
    /**
     * 保存信息
     * @param record
     * @throws PushGoodsException
     * @throws Exception
     */
    public void saveInfo(PushGoods record) throws PushGoodsException, Exception;
    
}
fanli/src/main/java/com/yeshi/fanli/vo/homemodule/SpecialVO.java
New file
@@ -0,0 +1,32 @@
package com.yeshi.fanli.vo.homemodule;
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.bus.homemodule.Special;
public class SpecialVO extends Special{
    private static final long serialVersionUID = 1L;
    private Boolean needSpin;
    @Expose
    private String comment;
    public String getComment() {
        return comment;
    }
    public void setComment(String comment) {
        this.comment = comment;
    }
    public Boolean getNeedSpin() {
        return needSpin;
    }
    public void setNeedSpin(Boolean needSpin) {
        this.needSpin = needSpin;
    }
}
fanli/src/main/java/com/yeshi/fanli/vo/money/IncomeDetailVO.java
New file
@@ -0,0 +1,34 @@
package com.yeshi.fanli.vo.money;
import java.math.BigDecimal;
public class IncomeDetailVO {
    private String icon;// 渠道图标
    private Integer num; // 订单数量
    private BigDecimal money;// 金额
    public String getIcon() {
        return icon;
    }
    public void setIcon(String icon) {
        this.icon = icon;
    }
    public Integer getNum() {
        return num;
    }
    public void setNum(Integer num) {
        this.num = num;
    }
    public BigDecimal getMoney() {
        return money;
    }
    public void setMoney(BigDecimal money) {
        this.money = money;
    }
}
fanli/src/main/java/com/yeshi/fanli/vo/money/MoneyPredictVO.java
New file
@@ -0,0 +1,75 @@
package com.yeshi.fanli.vo.money;
import java.math.BigDecimal;
public class MoneyPredictVO {
    // 总的
    private BigDecimal totalMoney; // 总预估收益
    private Integer totalNum; // 总付款订单数(笔)
    // 我的
    private BigDecimal mineMoney;// 预估我的收益
    private Integer mineNum;// 付款订单数(笔)
    // 团队
    private BigDecimal teamMoney;// 累计提现
    private Integer teamNum;// 累计提现
    private String  countDate; // 统计日期
    public BigDecimal getTotalMoney() {
        return totalMoney;
    }
    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }
    public Integer getTotalNum() {
        return totalNum;
    }
    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }
    public BigDecimal getMineMoney() {
        return mineMoney;
    }
    public void setMineMoney(BigDecimal mineMoney) {
        this.mineMoney = mineMoney;
    }
    public Integer getMineNum() {
        return mineNum;
    }
    public void setMineNum(Integer mineNum) {
        this.mineNum = mineNum;
    }
    public BigDecimal getTeamMoney() {
        return teamMoney;
    }
    public void setTeamMoney(BigDecimal teamMoney) {
        this.teamMoney = teamMoney;
    }
    public Integer getTeamNum() {
        return teamNum;
    }
    public void setTeamNum(Integer teamNum) {
        this.teamNum = teamNum;
    }
    public String getCountDate() {
        return countDate;
    }
    public void setCountDate(String countDate) {
        this.countDate = countDate;
    }
}
fanli/src/main/java/com/yeshi/fanli/vo/money/MoneyStatisticVO.java
New file
@@ -0,0 +1,159 @@
package com.yeshi.fanli.vo.money;
import java.math.BigDecimal;
public class MoneyStatisticVO {
    private String link;// 链接
    private BigDecimal balanceMoney;// 账户余额
    private String extractingMoneyInfo;// 提现中的资金信息
    private String extractDesc; // 提现说明文字
    private String moneyArrivalDesc; // 资金到账说明文字
    // 提现
    private BigDecimal monthExtractMoney;// 本月提现
    private BigDecimal lastMonthExtractMoney;// 上月提现
    private BigDecimal totalExtractMoney;// 累计提现
    // 累计
    private BigDecimal totalFanLiMoney;// 累计自购返利
    private BigDecimal totalShareMoney;// 累计分享奖金
    private BigDecimal totalInviteMoney;// 累计邀请奖金
    // 收货详情
    private BigDecimal monthSettleMoney;// 本月已收货
    private BigDecimal lastMonthSettleMoney;// 上月已收货
    private BigDecimal notSettleMoney;// 待确认收货
    private MoneyPredictVO  todayPredict;// 今日预估
    private MoneyPredictVO  monthPredict;// 本月预估
    public BigDecimal getBalanceMoney() {
        return balanceMoney;
    }
    public void setBalanceMoney(BigDecimal balanceMoney) {
        this.balanceMoney = balanceMoney;
    }
    public String getExtractingMoneyInfo() {
        return extractingMoneyInfo;
    }
    public void setExtractingMoneyInfo(String extractingMoneyInfo) {
        this.extractingMoneyInfo = extractingMoneyInfo;
    }
    public BigDecimal getMonthExtractMoney() {
        return monthExtractMoney;
    }
    public void setMonthExtractMoney(BigDecimal monthExtractMoney) {
        this.monthExtractMoney = monthExtractMoney;
    }
    public BigDecimal getLastMonthExtractMoney() {
        return lastMonthExtractMoney;
    }
    public void setLastMonthExtractMoney(BigDecimal lastMonthExtractMoney) {
        this.lastMonthExtractMoney = lastMonthExtractMoney;
    }
    public BigDecimal getTotalExtractMoney() {
        return totalExtractMoney;
    }
    public void setTotalExtractMoney(BigDecimal totalExtractMoney) {
        this.totalExtractMoney = totalExtractMoney;
    }
    public BigDecimal getTotalFanLiMoney() {
        return totalFanLiMoney;
    }
    public void setTotalFanLiMoney(BigDecimal totalFanLiMoney) {
        this.totalFanLiMoney = totalFanLiMoney;
    }
    public BigDecimal getTotalShareMoney() {
        return totalShareMoney;
    }
    public void setTotalShareMoney(BigDecimal totalShareMoney) {
        this.totalShareMoney = totalShareMoney;
    }
    public BigDecimal getTotalInviteMoney() {
        return totalInviteMoney;
    }
    public void setTotalInviteMoney(BigDecimal totalInviteMoney) {
        this.totalInviteMoney = totalInviteMoney;
    }
    public BigDecimal getMonthSettleMoney() {
        return monthSettleMoney;
    }
    public void setMonthSettleMoney(BigDecimal monthSettleMoney) {
        this.monthSettleMoney = monthSettleMoney;
    }
    public BigDecimal getLastMonthSettleMoney() {
        return lastMonthSettleMoney;
    }
    public void setLastMonthSettleMoney(BigDecimal lastMonthSettleMoney) {
        this.lastMonthSettleMoney = lastMonthSettleMoney;
    }
    public BigDecimal getNotSettleMoney() {
        return notSettleMoney;
    }
    public void setNotSettleMoney(BigDecimal notSettleMoney) {
        this.notSettleMoney = notSettleMoney;
    }
    public String getExtractDesc() {
        return extractDesc;
    }
    public void setExtractDesc(String extractDesc) {
        this.extractDesc = extractDesc;
    }
    public String getMoneyArrivalDesc() {
        return moneyArrivalDesc;
    }
    public void setMoneyArrivalDesc(String moneyArrivalDesc) {
        this.moneyArrivalDesc = moneyArrivalDesc;
    }
    public MoneyPredictVO getTodayPredict() {
        return todayPredict;
    }
    public void setTodayPredict(MoneyPredictVO todayPredict) {
        this.todayPredict = todayPredict;
    }
    public MoneyPredictVO getMonthPredict() {
        return monthPredict;
    }
    public void setMonthPredict(MoneyPredictVO monthPredict) {
        this.monthPredict = monthPredict;
    }
    public String getLink() {
        return link;
    }
    public void setLink(String link) {
        this.link = link;
    }
}
fanli/src/main/java/com/yeshi/fanli/vo/push/PushRecommendVO.java
New file
@@ -0,0 +1,110 @@
package com.yeshi.fanli.vo.push;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
public class PushRecommendVO {
    // 推送时间
    @Expose
    private Long pushtime;
    // 标题
    @Expose
    private String title;
    // 内容
    @Expose
    private String content;
    // 图片
    @Expose
    private String picture;
    // 名称
    @Expose
    private String nickName;
    // 浏览数量
    @Expose
    private String scanNum;
    // 参数
    @Expose
    private String params;
    // 跳转
    @Expose
    private JumpDetailV2 jumpDetail;
    @Expose
    private List<ClientTextStyleVO> totalwords;
    public Long getPushtime() {
        return pushtime;
    }
    public void setPushtime(Long pushtime) {
        this.pushtime = pushtime;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getPicture() {
        return picture;
    }
    public void setPicture(String picture) {
        this.picture = picture;
    }
    public String getNickName() {
        return nickName;
    }
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    public String getScanNum() {
        return scanNum;
    }
    public void setScanNum(String scanNum) {
        this.scanNum = scanNum;
    }
    public String getParams() {
        return params;
    }
    public void setParams(String params) {
        this.params = params;
    }
    public JumpDetailV2 getJumpDetail() {
        return jumpDetail;
    }
    public void setJumpDetail(JumpDetailV2 jumpDetail) {
        this.jumpDetail = jumpDetail;
    }
    public List<ClientTextStyleVO> getTotalwords() {
        return totalwords;
    }
    public void setTotalwords(List<ClientTextStyleVO> totalwords) {
        this.totalwords = totalwords;
    }
}
fanli/src/test/java/org/fanli/MyBatisProduce2.java
New file
@@ -0,0 +1,17 @@
package org.fanli;
import org.junit.Test;
import org.yeshi.utils.mybatis.MyBatisMapperUtil;
import com.yeshi.fanli.entity.push.PushGoods;
//@Ignore
public class MyBatisProduce2 {
    @Test
    public void test3() {
        MyBatisMapperUtil.createMapper(PushGoods.class);
    }
}