admin
2021-09-13 8ce7c720e4e7a604b0ff770349b5556f39d37759
好省呗应用兼容
40个文件已修改
3个文件已添加
1681 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/aspect/H5SignValidateAspect.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/TestController.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/order/TaoBaoOrderController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/lijin/GoodsControllerLijin.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserMoneyControllerV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/HomeNavbarUserMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/vipshop/VipShopOrderMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/taobao/TaoBaoOrderBackUpDao.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/SystemEnum.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/SystemPIDInfo.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/config/SystemConfigKeyEnum.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/taobao/TaoBaoOrderBackUp.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/DynamicInfoJob.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/order/taobao/TaoBaoOrderBackUpJob.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/order/taobao/UpdateOrderJob.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/order/taobao/UpdateTBRelationAndSpecialOrderJob.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/order/vipshop/UpdateVipShopOrderJob.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/lijin/manager/GoodsLijinMnager.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/lijin/manager/UserLijinMnager.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/log/vo/UserGoodsScanLog.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarUserServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderHongBaoMoneyComputeServiceImpl.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderMoneySettleServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/msg/UserOrderMsgNotificationServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/HomeNavbarUserService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeOrderApiUtil.java 179 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeScApiUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/vipshop/DingDanXiaApiUtil.java 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/vipshop/VipShopSCApiUtil.java 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/homemodule/HomeNavbarUserMapper.xml 260 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/push/PushInfoMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/mapping/vipshop/VipShopOrderMapper.xml 317 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/aspect/H5SignValidateAspect.java
@@ -189,7 +189,7 @@
        }
        String md5 = StringUtil.Md5(sb.toString() + KEY);
        if (system != null && system == SystemEnum.yhqjx) {
        if (system != null && (system == SystemEnum.yhqjx||system == SystemEnum.hsb)) {
            md5 = StringUtil.Md5(sb.toString() + KEY_TEJIA);
        }
fanli/src/main/java/com/yeshi/fanli/controller/TestController.java
@@ -4,14 +4,19 @@
import com.google.gson.GsonBuilder;
import com.yeshi.fanli.dao.dynamic.DynamicInfoDao;
import com.yeshi.fanli.dao.mybatis.help.HelpCenterMapper;
import com.yeshi.fanli.dto.push.PushContentDTO;
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.entity.bus.activity.ActivityShareResult;
import com.yeshi.fanli.entity.bus.activity.RecommendActivity;
import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.config.push.PushMsgFactory;
import com.yeshi.fanli.entity.dynamic.InviteMaterial;
import com.yeshi.fanli.exception.ActivityException;
import com.yeshi.fanli.exception.push.PushException;
import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.exception.user.UserInfoException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.log.LogManager;
import com.yeshi.fanli.log.LogType;
@@ -21,6 +26,9 @@
import com.yeshi.fanli.service.inter.dynamic.InviteMaterialService;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.service.inter.order.msg.MsgOrderDetailService;
import com.yeshi.fanli.service.inter.push.PushService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
@@ -327,30 +335,51 @@
        out.println(array.toString());
    }
    @Resource
    private MsgOrderDetailService msgOrderDetailService;
    @Resource
    private PushService pushService;
    @Resource
    private UserInfoService userInfoService;
    @RequestMapping(value = "pushOrderMsg")
    public void pushOrderMsg(String id, PrintWriter out) throws UserInfoException, PushException {
        MsgOrderDetail msgOrderDetail = msgOrderDetailService.selectByPrimaryKey(Long.parseLong(id));
        if (msgOrderDetail == null) {
            out.print("ID不存在");
            return;
        }
        UserInfo userInfo = userInfoService.getUserInfo(msgOrderDetail.getUser().getId());
        PushContentDTO dto = PushMsgFactory.createFanLiOrderStatisticed(msgOrderDetail.getOrderType(), msgOrderDetail.getOrderId(), msgOrderDetail.getHongBaoMoney());
        pushService.pushZNX(userInfo.getId(), dto.getTitle(), dto.getContent(), null, null, userInfo.getSystem());
    }
    @RequestMapping(value = "pushOppo")
    public void pushOppo(String registerId, PrintWriter out) {
        List<String> registerIds = new ArrayList<>();
        registerIds.add(registerId);
        String androidBaseActivity="";
        String androidBaseActivity = "";
        try {
            OPPOPushUtil.pushUrl(registerIds, "测试网页推送", "测试网页推送内容", "http://www.baidu.com",androidBaseActivity);
            OPPOPushUtil.pushUrl(registerIds, "测试网页推送", "测试网页推送内容", "http://www.baidu.com", androidBaseActivity);
        } catch (PushException e) {
            e.printStackTrace();
        }
        try {
            OPPOPushUtil.pushGoods(registerIds, "测试商品网页推送", "测试商品推送内容", 1, 577628549116L,androidBaseActivity);
            OPPOPushUtil.pushGoods(registerIds, "测试商品网页推送", "测试商品推送内容", 1, 577628549116L, androidBaseActivity);
        } catch (PushException e) {
            e.printStackTrace();
        }
        try {
            OPPOPushUtil.pushUserSignInNotification(registerIds, "测试签到推送", "测试签到推送",androidBaseActivity);
            OPPOPushUtil.pushUserSignInNotification(registerIds, "测试签到推送", "测试签到推送", androidBaseActivity);
        } catch (PushException e) {
            e.printStackTrace();
        }
        try {
            OPPOPushUtil.pushWelfareCenter(registerIds, "测试福利中心推送", "测试福利中心推送",androidBaseActivity);
            OPPOPushUtil.pushWelfareCenter(registerIds, "测试福利中心推送", "测试福利中心推送", androidBaseActivity);
        } catch (PushException e) {
            e.printStackTrace();
        }
fanli/src/main/java/com/yeshi/fanli/controller/admin/order/TaoBaoOrderController.java
@@ -2,8 +2,10 @@
import com.google.gson.*;
import com.yeshi.common.entity.PageEntity;
import com.yeshi.fanli.dao.taobao.TaoBaoOrderBackUpDao;
import com.yeshi.fanli.entity.accept.AdminAcceptData;
import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
import com.yeshi.fanli.entity.taobao.TaoBaoOrderBackUp;
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
import com.yeshi.fanli.job.order.taobao.UpdateOrderJob;
import com.yeshi.fanli.job.order.taobao.UpdateTBRelationAndSpecialOrderJob;
@@ -14,6 +16,7 @@
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
import com.yeshi.fanli.util.taobao.TaoKeOrderApiUtil;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -48,6 +51,9 @@
    @Resource
    private OrderProcessService orderProcessService;
    @Resource
    private TaoBaoOrderBackUpDao taoBaoOrderBackUpDao;
    /**
     * 查询列表 - 新后台
@@ -106,7 +112,6 @@
    }
    @RequestMapping(value = "listTaoBaoOrderNoUpdate")
    public void listTaoBaoOrderUnUpdate(AdminAcceptData acceptData, String callback, String key, Integer pageIndex, PrintWriter out) {
@@ -155,7 +160,6 @@
    }
    @RequestMapping(value = "updateTaoBaoOrder")
    public void updateTaoBaoOrder(AdminAcceptData acceptData, String callback, String ids, PrintWriter out) {
        try {
@@ -171,24 +175,37 @@
                orderIds.add(idsArray.optString(i));
            }
            Long[] startTimes = new Long[orderIds.size()];
            Long[] endTimes = new Long[orderIds.size()];
            int p = 0;
            for (Iterator<String> its = orderIds.iterator(); its.hasNext(); ) {
                String orderId = its.next();
                List<TaoBaoOrder> list = taoBaoOrderService.getTaoBaoOrderByOrderId(orderId);
                startTimes[p] = TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") - 1000L;
                endTimes[p] = TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") + 1000L;
                p++;
                try {
                    //如果创建时间超过了90天的抛出异常
                    if (list.size() == 0 || TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") < System.currentTimeMillis() - 1000 * 60 * 60L * 24 * 90)
                        throw new Exception("需要本地更新");
                    long startTime = TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") - 1000L;
                    long endTime = TimeUtil.convertToTimeTemp(list.get(0).getCreateTime(), "yyyy-MM-dd HH:mm:ss") + 1000L;
                    updateRelationAndSpecialOrderJob.updateRelationAndSpecialOrder(startTime, endTime);
                    updateOrderJob.updateOrder(startTime, endTime);
                } catch (Exception e) {
                    //从本地备份拿出订单
                    List<String> tradeIds = new ArrayList<>();
                    for (TaoBaoOrder order : list) {
                        tradeIds.add(order.getTradeId());
                    }
                    List<TaoBaoOrderBackUp> orderBackUps = taoBaoOrderBackUpDao.listByIds(tradeIds);
                    List<TaoBaoOrder> orderList = new ArrayList<>();
                    for (TaoBaoOrderBackUp backUp : orderBackUps) {
                        orderList.add(TaoKeOrderApiUtil.parseTaoBaoOrderNew(JSONObject.fromObject(backUp.getContent())));
                    }
                    updateOrderJob.addOrder(orderList);
                }
            }
            for (int i = 0; i < idsArray.size(); i++) {
                updateRelationAndSpecialOrderJob.updateRelationAndSpecialOrder(startTimes[i], endTimes[i]);
                updateOrderJob.updateOrder(startTimes[i], endTimes[i]);
            }
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("更新成功"));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("更新失败"));
            e.printStackTrace();
        }
fanli/src/main/java/com/yeshi/fanli/controller/client/lijin/GoodsControllerLijin.java
@@ -291,7 +291,7 @@
        extraVO.setBuyValid(true);
        extraVO.setListCouponUser(listCouponUser);
        goodsDetailVO.setExtra(extraVO);
        loadLijinInfo(uid, goodsDetailVO);
        loadLijinInfo(uid, acceptData.getSystem(), goodsDetailVO);
        //清除临时信息
        goodsDetailVO.getGoods().setTempCoupon(null);
        if (goodsDetailVO.getGoods().getLabels() == null)
@@ -366,14 +366,14 @@
     *
     * @param goodsDetailVO
     */
    private void loadLijinInfo(Long uid, GoodsDetailVO goodsDetailVO) {
    private void loadLijinInfo(Long uid, SystemEnum system, GoodsDetailVO goodsDetailVO) {
        VIPEnum vipRank = userLijinMnager.getVIPRank(uid);
        GoodsDetailVO.GoodsHongBaoListVO.UserLevelVO userLevelVO = goodsLijinMnager.getUserLevel(vipRank, true);
        GoodsDetailVO.GoodsHongBaoListVO.UserLevelVO userLevelVO = goodsLijinMnager.getUserLevel(system, vipRank, true);
        //返利UserLevel
        if (goodsDetailVO.getGoods().getPriceList() != null && goodsDetailVO.getGoods().getPriceList().size() > 0)
            goodsDetailVO.getGoods().getPriceList().get(0).setUserLevel(userLevelVO);
        //礼金UserLevel
        userLevelVO = goodsLijinMnager.getUserLevel(vipRank, false);
        userLevelVO = goodsLijinMnager.getUserLevel(system, vipRank, false);
        goodsLijinMnager.loadLijinInfo(vipRank, goodsDetailVO, userLevelVO);
    }
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -720,7 +720,7 @@
                        for (ImgInfo imgInfo : goodsEvaluate.getImgList()) {
                            if (acceptData.getSystem() == SystemEnum.yhqjx) {
                            if (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb) {
                                imgInfo.setGoods(null);
                                imgInfo.setGoodsVO(null);
                            }
@@ -1264,7 +1264,7 @@
        String newText = text; // 非通用券需要验证
        //特价只需要复制文字,不需要转链
        if (acceptData.getSystem() == SystemEnum.yhqjx) {
        if (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb) {
            newText = GoodsTextUtil.decodeAppHtmlText(newText);
            //只复制文字
            JSONObject data = new JSONObject();
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HomeNavbarControllerV2.java
@@ -124,7 +124,7 @@
            int nonCount = 0;
            // 查询用户自定义导航
            List<HomeNavbarUser> listUser = homeNavbarUserService.listUserNavbar(uid, acceptData.getDevice());
            List<HomeNavbarUser> listUser = homeNavbarUserService.listUserNavbar(uid, acceptData.getDevice(),acceptData.getSystem());
            if (listUser == null || listUser.size() == 0) {
                for (int i = 0; i < listItems.size(); i++) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
@@ -695,7 +695,7 @@
            JSONArray array = new JSONArray();
            for (GoodsDetailVO vo : voList) {
                if (acceptData.getSystem() == SystemEnum.yhqjx) {
                if (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb) {
                    if (!StringUtil.isNullOrEmpty(vo.getMoneyInfo().getHongBaoMoney())) {
                        array.add(gson.toJson(vo));
                    }
@@ -786,7 +786,7 @@
        JSONArray array = new JSONArray();
        for (GoodsDetailVO vo : finalVOList) {
            if (acceptData.getSystem() == SystemEnum.yhqjx) {
            if (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb) {
                if (!StringUtil.isNullOrEmpty(vo.getMoneyInfo().getHongBaoMoney())) {
                    array.add(gson.toJson(vo));
                }
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -171,7 +171,7 @@
        // 去除前后空格
        text = text.trim();
        String originalText = text;
        if (acceptData.getSystem() == SystemEnum.yhqjx) {
        if (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb) {
            Integer sourceType = clipboardAnalysisManager.tejiaParseSourceType(text);
            JSONObject root = new JSONObject();
            root.put("type", 2);
@@ -188,7 +188,7 @@
                        @Override
                        public void onResult(GoodsDocParseResultVO result) {
                            if (uid == null || acceptData.getSystem() == SystemEnum.yhqjx) {
                            if (uid == null || (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb)) {
                                out.print(JsonUtil.loadFalseResult("无推荐"));
                                return;
                            }
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -1,7 +1,9 @@
package com.yeshi.fanli.controller.client.v2;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
@@ -250,8 +252,25 @@
    }
    public static String getERCodeContentNew(String template, TaoBaoGoodsBrief goods, String token) {
        String tempToken = "";
        String[] sts = token.split(" ");
        if (sts.length > 1) {
            for (int i = 0; i < sts.length - 1; i++) {
                tempToken += sts[i] + " ";
            }
        } else {
            tempToken = token;
        }
        tempToken = tempToken.trim();
        try {
            tempToken= URLEncoder.encode(tempToken,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        String commentText = template.replace("[原价]", goods.getZkPrice().toString());
        commentText = commentText.replace("[淘口令]", token);
        commentText = commentText.replace("[淘口令]", tempToken);
        if (StringUtil.isNullOrEmpty(goods.getCouponInfo())) {
            commentText = commentText.replace("领券抢购", "抢购");
            commentText = commentText.replace("【券后价】[券后价]元", "");
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserMoneyControllerV2.java
@@ -280,7 +280,7 @@
            vo.setMonthUnRecievedMoney(monthUnRecievedMoney);
            // 全部未到账
            minDate = new Date(0);
            minDate = new Date(timeStamp - 1000 * 60 * 60L * 24 * 365L);
            maxDate = new Date(timeStamp);
            vo.setTotalUnRecievedMoney(hongBaoV2Service.getUnRecievedMoneyWithCreateTime(uid, minDate, maxDate));
        } else {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java
@@ -319,7 +319,7 @@
            long count = 0L;
            List<CommonOrderVO> list = null;
            if (acceptData.getSystem() == SystemEnum.yhqjx) {
            if (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb) {
                list = commonOrderService.getOrderList(acceptData, page, uid, state, orderType, orderState, orderNo,
                        startTime, endTime, dateType, listSource);
                count = commonOrderService.countOrderList(uid, state, orderType, orderState, orderNo, startTime,
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/homemodule/HomeNavbarUserMapper.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.yeshi.fanli.entity.SystemEnum;
import org.apache.ibatis.annotations.Param;
import com.yeshi.fanli.dao.BaseMapper;
@@ -42,7 +43,7 @@
    /**
     *  删除设备自定义
     * 
     * @param list
     * @param device
     * @return
     */
    void deleteByDevice(@Param("device")String device);
@@ -51,7 +52,7 @@
    /**
     * 查询自定义有效的导航栏
     */
    List<HomeNavbarUser> listEffectiveNavbars(@Param("uid")Long uid, @Param("device")String device);
    List<HomeNavbarUser> listEffectiveNavbars(@Param("uid")Long uid, @Param("device")String device,@Param("system") SystemEnum system);
    
    
    /**
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/vipshop/VipShopOrderMapper.java
@@ -1,9 +1,25 @@
package com.yeshi.fanli.dao.mybatis.vipshop;
import com.ks.lijin.query.BaseDaoQuery;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.vipshop.VipShopOrder;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface VipShopOrderMapper extends BaseMapper<VipShopOrder> {
    VipShopOrder selectByOrderSn(String orderSn);
    VipShopOrder selectByOrderSn(String orderSn);
    List<VipShopOrder> list(@Param("query") DaoQuery query);
    long count(@Param("query") DaoQuery query);
    public class DaoQuery extends BaseDaoQuery {
        public String orderSubStatusName;
    }
}
fanli/src/main/java/com/yeshi/fanli/dao/taobao/TaoBaoOrderBackUpDao.java
@@ -13,5 +13,15 @@
@Repository
public class TaoBaoOrderBackUpDao extends MongodbBaseDao<TaoBaoOrderBackUp> {
    public List<TaoBaoOrderBackUp> listByIds(List<String> ids) {
        Query query = new Query();
        Criteria[] ors = new Criteria[ids.size()];
        for (int i = 0; i < ors.length; i++) {
            ors[i] = Criteria.where("_id").is(ids.get(i));
        }
        query.addCriteria(new Criteria().orOperator(ors));
        return findList(query);
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/SystemEnum.java
@@ -11,7 +11,10 @@
            SystemFunction.bindPhone, SystemFunction.threeSale, SystemFunction.cloudOrder, SystemFunction.godenCorn, SystemFunction.redPack, SystemFunction.faQuan, SystemFunction.fanli, SystemFunction.vip, SystemFunction.inviteCode
    }, 1, "板栗快省", "板栗快省", false),
    flq("com.fanliunion.android", "com.xyj.ec.flq-ios", new String[]{}, new SystemFunction[]{SystemFunction.share, SystemFunction.faQuan, SystemFunction.fanli}, 11, "返利联盟", "淘拼团", false),
    yhqjx("com.youhuiquan.android", "com.youhuiquanjx.ios", new String[]{}, new SystemFunction[]{SystemFunction.fanli, SystemFunction.lijinSub, SystemFunction.bindPhone}, 12, "特价", "特价App", true);
    yhqjx("com.youhuiquan.android", "com.youhuiquanjx.ios", new String[]{}, new SystemFunction[]{SystemFunction.fanli, SystemFunction.lijinSub, SystemFunction.bindPhone}, 12, "特价", "特价App", true),
    hsb("com.haoshenbei.android", "com.haoshenbei.ios", new String[]{}, new SystemFunction[]{SystemFunction.fanli, SystemFunction.lijinSub, SystemFunction.bindPhone}, 12, "好省呗", "好省呗App", true),
    ;
    private String packageName;
    private String bundleId;
    private int systemId;
fanli/src/main/java/com/yeshi/fanli/entity/SystemPIDInfo.java
@@ -4,13 +4,14 @@
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.io.Serializable;
import java.util.Date;
/**
 * 系统推广位信息
 */
@Document(collection = "systemPIDInfo")
public class SystemPIDInfo {
public class SystemPIDInfo implements Serializable {
    public enum PidType {
        fanli("返利"), fanliChannel("渠道返利"), coupon("领券"), share("分享");
fanli/src/main/java/com/yeshi/fanli/entity/config/SystemConfigKeyEnum.java
@@ -12,7 +12,8 @@
    wxGZAppId("微信公众平台的appId"),
    wxGZAppSecret("微信公众平台的appSecret"),
    defaultNickNamePrefix("默认昵称前缀"),
    defaultPortrait("默认头像");
    defaultPortrait("默认头像"),
    thirdAppUidPrefix("第三方应用的用户ID前缀");
    private String name;
fanli/src/main/java/com/yeshi/fanli/entity/taobao/TaoBaoOrderBackUp.java
@@ -5,6 +5,7 @@
import org.springframework.data.mongodb.core.mapping.Document;
import java.io.Serializable;
import java.util.Date;
@Document(collection = "taoBaoOrderBackUp")
public class TaoBaoOrderBackUp implements Serializable {
@@ -12,7 +13,15 @@
    private String tradeId;
    private String orderId;
    private String content;//订单内容
    private Date updateTime;
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getOrderId() {
        return orderId;
fanli/src/main/java/com/yeshi/fanli/job/DynamicInfoJob.java
@@ -538,6 +538,7 @@
    @XxlJob("dynamic-tejia-updateBetterGoods")
    public ReturnT<String> updateTejiaBetterGoods(String param) throws Exception {
        addDTKTipOffList(SystemEnum.yhqjx);
        addDTKTipOffList(SystemEnum.hsb);
        return ReturnT.SUCCESS;
    }
fanli/src/main/java/com/yeshi/fanli/job/order/taobao/TaoBaoOrderBackUpJob.java
@@ -39,6 +39,7 @@
        long endTime = startTime + 1000 * 60 * 60 * 24L;
        List<TaoBaoOrderBackUp> backUpList = TaoKeOrderApiUtil.getTaoBaoOrderBackUpList(startTime, endTime, status, queryType, orderSence);
        for (TaoBaoOrderBackUp backUp : backUpList) {
            backUp.setUpdateTime(new Date());
            taoBaoOrderBackUpDao.save(backUp);
        }
    }
fanli/src/main/java/com/yeshi/fanli/job/order/taobao/UpdateOrderJob.java
@@ -376,7 +376,7 @@
    // 淘宝推广订单 每隔1分执行一次
    private void pullLatestCommonOrder() {
        LogHelper.job("pullLatestCommonOrder");
        Date systemDate = TaoKeApiUtil.getTaoBaoSystemTime();
        Date systemDate =new Date(); //TaoKeApiUtil.getTaoBaoSystemTime();
        long endTime = systemDate != null ? systemDate.getTime() : System.currentTimeMillis();
        updateOrder(endTime - 1000 * 60 * 20L, endTime);
    }
@@ -384,7 +384,7 @@
    // 爬取最近一天的常规订单(30分钟一次)
    private void pullLatestDayCommonOrder() {
        LogHelper.job("pullLatestCommonOrder");
        Date systemDate = TaoKeApiUtil.getTaoBaoSystemTime();
        Date systemDate = new Date();//TaoKeApiUtil.getTaoBaoSystemTime();
        long endTime = systemDate != null ? systemDate.getTime() : System.currentTimeMillis();
        updateOrder(endTime - 1000 * 60 * 60 * 24L, endTime);
    }
@@ -392,7 +392,7 @@
    // 爬取最近三天的常规订单(6个小时一次)
    private void pullLatest3DayCommonOrder() {
        LogHelper.job("pullLatestCommonOrder");
        Date systemDate = TaoKeApiUtil.getTaoBaoSystemTime();
        Date systemDate = new Date();//TaoKeApiUtil.getTaoBaoSystemTime();
        long endTime = systemDate != null ? systemDate.getTime() : System.currentTimeMillis();
        updateOrder(endTime - 1000 * 60 * 60 * 24 * 3L, endTime);
    }
fanli/src/main/java/com/yeshi/fanli/job/order/taobao/UpdateTBRelationAndSpecialOrderJob.java
@@ -152,7 +152,7 @@
    // 每30s爬取一次
    public void doJob1() {
        LogHelper.job("爬单:30s爬取一次单");
        Date systemDate = TaoKeApiUtil.getTaoBaoSystemTime();
        Date systemDate = new Date();//TaoKeApiUtil.getTaoBaoSystemTime();
        long endTime = systemDate != null ? systemDate.getTime() : System.currentTimeMillis();
        updateRelationAndSpecialOrder(endTime - 1000 * 60 * 20L, endTime);
        updateRelationAndSpecialPaidOrder(endTime - 1000 * 60 * 20L, endTime);
@@ -162,7 +162,7 @@
    // 每5分钟更新(近1天数据)
    public void doJob2() {
        LogHelper.job("爬单:5min爬取一次单");
        Date systemDate = TaoKeApiUtil.getTaoBaoSystemTime();
        Date systemDate = new Date();//TaoKeApiUtil.getTaoBaoSystemTime();
        long endTime = systemDate != null ? systemDate.getTime() : System.currentTimeMillis();
        updateRelationAndSpecialOrder(endTime - 1000 * 60 * 60 * 24L, endTime);
        updateRelationAndSpecialSettleOrder(endTime - 1000 * 60 * 60 * 24L, endTime);
fanli/src/main/java/com/yeshi/fanli/job/order/vipshop/UpdateVipShopOrderJob.java
@@ -1,10 +1,12 @@
package com.yeshi.fanli.job.order.vipshop;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import com.yeshi.fanli.dao.mybatis.vipshop.VipShopOrderMapper;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.vipshop.DingDanXiaApiUtil;
import org.springframework.stereotype.Component;
@@ -32,6 +34,8 @@
    @Resource
    private RedisManager redisManager;
    @Resource
    private VipShopOrderMapper vipShopOrderMapper;
    /**
     * 保存订单
@@ -97,9 +101,44 @@
        if (orders == null || orders.size() == 0)
            throw new Exception("订单不存在");
        VipShopQueryOrderResultDTO result = VipShopApiUtil
                .getOrderList(VipShopOrderQueryModel.createOrderTime(orders.get(0).getOrderTime(), orders.get(0).getOrderTime() + 1000, null, 1));
        saveVipShopOrders(result.getOrderList());
        VipShopOrder vipShopOrder = DingDanXiaApiUtil.getOrderDetail(param);
        if (vipShopOrder != null) {
            List<VipShopOrder> vipShopOrderList = new ArrayList<>();
            vipShopOrderList.add(vipShopOrder);
            saveVipShopOrders(vipShopOrderList);
        }
        return ReturnT.SUCCESS;
    }
    /**
     * 更新长时间未更新的订单号
     *
     * @param param
     * @return
     * @throws Exception
     */
    @XxlJob("order-vip-updateByLongTimeNoUpdate")
    public ReturnT<String> updateByLongTimeNoUpdate(String param) throws Exception {
        Date maxCreateTime = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * 30);
        Date minCreateTime = new Date(maxCreateTime.getTime() - 1000 * 60 * 60 * 24L * 60L);
        VipShopOrderMapper.DaoQuery daoQuery = new VipShopOrderMapper.DaoQuery();
        daoQuery.orderSubStatusName = "已付款";
        daoQuery.minCreateTime = minCreateTime;
        daoQuery.maxCreateTime = maxCreateTime;
        long count = vipShopOrderMapper.count(daoQuery);
        if (count > 0) {
            daoQuery.start = 0;
            daoQuery.count = (int) count;
            List<VipShopOrder> orderList = vipShopOrderMapper.list(daoQuery);
            for (VipShopOrder order : orderList) {
                try {
                    updateByOrderSn(order.getOrderSn());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
        return ReturnT.SUCCESS;
    }
fanli/src/main/java/com/yeshi/fanli/lijin/manager/GoodsLijinMnager.java
@@ -136,7 +136,7 @@
    }
    public GoodsDetailVO loadTBMoneyInfo(SystemEnum system, Long uid, TaoBaoGoodsBrief goodsBrief, GoodsDetailVO detailVO,boolean detail) {
    public GoodsDetailVO loadTBMoneyInfo(SystemEnum system, Long uid, TaoBaoGoodsBrief goodsBrief, GoodsDetailVO detailVO, boolean detail) {
        List<TaoBaoGoodsBrief> goodsBriefs = new ArrayList<>();
        goodsBriefs.add(goodsBrief);
        Map<String, MoneyInfo> lijinMap = null;
@@ -146,7 +146,7 @@
        }
        for (TaoBaoGoodsBrief goods : goodsBriefs) {
            try {
                loadTBMoneyInfo(system, lijinMap, goods, detailVO,detail);
                loadTBMoneyInfo(system, lijinMap, goods, detailVO, detail);
            } catch (Exception e) {
                e.printStackTrace();
            }
@@ -155,7 +155,7 @@
    }
    public List<GoodsDetailVO> loadTBMoneyInfo(SystemEnum system, Long uid, List<TaoBaoGoodsBrief> goodsBriefList, GoodsMoneyConfigParamsDTO paramsDTO,boolean detail) {
    public List<GoodsDetailVO> loadTBMoneyInfo(SystemEnum system, Long uid, List<TaoBaoGoodsBrief> goodsBriefList, GoodsMoneyConfigParamsDTO paramsDTO, boolean detail) {
        Map<String, MoneyInfo> lijinMap = null;
        if (SystemInfoUtil.hasFunctions(system, SystemFunction.lijinSub)) {
            loadMaterialLibsType(goodsBriefList);
@@ -165,7 +165,7 @@
        for (TaoBaoGoodsBrief goods : goodsBriefList) {
            try {
                GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
                loadTBMoneyInfo(system, lijinMap, goods, detailVO,detail);
                loadTBMoneyInfo(system, lijinMap, goods, detailVO, detail);
                voList.add(detailVO);
            } catch (Exception e) {
                e.printStackTrace();
@@ -181,7 +181,7 @@
    }
    private List<GoodsDetailVOWithKey> loadTBMoneyInfo(SystemEnum system, Long uid, List<TaoBaoGoodsBrief> goodsBriefList, List<String> goodsKeyList, GoodsMoneyConfigParamsDTO paramsDTO,boolean detail) {
    private List<GoodsDetailVOWithKey> loadTBMoneyInfo(SystemEnum system, Long uid, List<TaoBaoGoodsBrief> goodsBriefList, List<String> goodsKeyList, GoodsMoneyConfigParamsDTO paramsDTO, boolean detail) {
        Map<String, MoneyInfo> lijinMap = null;
        boolean hasCreateTime = false;
        if (SystemInfoUtil.hasFunctions(system, SystemFunction.lijinSub) && goodsBriefList.size() > 0) {
@@ -193,7 +193,7 @@
        for (int i = 0; i < goodsBriefList.size(); i++) {
            try {
                GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(goodsBriefList.get(i), paramsDTO);
                loadTBMoneyInfo(system, lijinMap, goodsBriefList.get(i), detailVO,detail);
                loadTBMoneyInfo(system, lijinMap, goodsBriefList.get(i), detailVO, detail);
                voList.add(new GoodsDetailVOWithKey(detailVO, goodsKeyList.get(i)));
            } catch (Exception e) {
                e.printStackTrace();
@@ -210,7 +210,7 @@
        boolean hasCreateTime = false;
        BigDecimal fanliRate = null;
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx || system == SystemEnum.hsb) {
            fanliRate = getFanLiRate(uid);
            hasCreateTime = true;
        }
@@ -268,7 +268,7 @@
            return null;
        BigDecimal fanliRate = null;
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx || system == SystemEnum.hsb) {
            fanliRate = getFanLiRate(uid);
        }
@@ -312,7 +312,7 @@
            }
        }
        GoodsDetailVO[] vos = new GoodsDetailVO[positionMap.size()];
        List<GoodsDetailVOWithKey> tbVOList = loadTBMoneyInfo(system, uid, taoBaoGoodsBriefList, tbKeyList, paramsDTO,false);
        List<GoodsDetailVOWithKey> tbVOList = loadTBMoneyInfo(system, uid, taoBaoGoodsBriefList, tbKeyList, paramsDTO, false);
        List<GoodsDetailVO> otherVOList = loadOtherMoneyInfo(system, uid, otherGoodsList, paramsDTO);
        for (GoodsDetailVOWithKey vo : tbVOList) {
@@ -423,7 +423,7 @@
    }
    public GoodsHongBaoListVO.UserLevelVO getUserLevel(VIPEnum vipRank, boolean fanli) {
    public GoodsHongBaoListVO.UserLevelVO getUserLevel(SystemEnum system, VIPEnum vipRank, boolean fanli) {
        GoodsHongBaoListVO.UserLevelVO userLevelVO = new GoodsHongBaoListVO.UserLevelVO();
        userLevelVO.setVipRank(vipRank.name());
        if (vipRank == VIPEnum.silver) {
@@ -432,7 +432,7 @@
            } else {
                userLevelVO.setDesc("铂金会员免广告,礼金红包提高216%");
            }
            userLevelVO.setLink(configService.getValue(ConfigKeyEnum.lijinVIPLink, SystemEnum.yhqjx));
            userLevelVO.setLink(configService.getValue(ConfigKeyEnum.lijinVIPLink, system));
        }
        return userLevelVO;
    }
fanli/src/main/java/com/yeshi/fanli/lijin/manager/UserLijinMnager.java
@@ -13,10 +13,14 @@
import com.ks.vip.pojo.Enums.VIPEnum;
import com.ks.vip.service.*;
import com.yeshi.fanli.entity.SystemEnum;
import com.yeshi.fanli.entity.config.SystemConfigKeyEnum;
import com.yeshi.fanli.entity.system.ConfigKeyEnum;
import com.yeshi.fanli.lijin.dto.TodayLijinCreatedInfo;
import com.yeshi.fanli.lijin.vo.UserLijinLevelInfoVO;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.config.SystemConfigService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.account.UserUtil;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;
import org.yeshi.utils.TimeUtil;
@@ -81,11 +85,21 @@
    @Resource
    private ConfigService configService;
    @Resource
    private SystemConfigService systemConfigService;
    @Resource
    private UserInfoService userInfoService;
    private String getUid(Long uid) {
        if (uid == null)
            return null;
        return "tejia-" + uid;
        SystemEnum system = userInfoService.getUserSystem(uid);
        if (system == null)
            return null;
        return systemConfigService.getValueCache(SystemConfigKeyEnum.thirdAppUidPrefix, system) + uid;
    }
    public VIPEnum getVIPRank(Long uid) {
@@ -166,7 +180,7 @@
     * @return
     */
    public UserLijinLevelInfoVO getUserLevelInfo(Long uid, SystemEnum system) {
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx || system == SystemEnum.hsb) {
            VIPEnum rank = getVIPRank(uid);
            UserLijinLevelInfoVO vo = new UserLijinLevelInfoVO();
            vo.setUserLevel(getVIPRank(uid).name());
fanli/src/main/java/com/yeshi/fanli/log/vo/UserGoodsScanLog.java
New file
@@ -0,0 +1,87 @@
package com.yeshi.fanli.log.vo;
import com.yeshi.fanli.lijin.vo.GoodsDetailVO;
import com.yeshi.fanli.util.StringUtil;
import java.math.BigDecimal;
import java.util.Date;
public class UserGoodsScanLog {
    private Long uid;
    private String device;
    private String goodsId;
    private int goodsType;
    private String goodsTitle;
    private String zkPrice;
    private Date createTime;
    public Long getUid() {
        return uid;
    }
    public void setUid(Long uid) {
        this.uid = uid;
    }
    public String getDevice() {
        return device;
    }
    public void setDevice(String device) {
        this.device = device;
    }
    public String getGoodsId() {
        return goodsId;
    }
    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }
    public int getGoodsType() {
        return goodsType;
    }
    public void setGoodsType(int goodsType) {
        this.goodsType = goodsType;
    }
    public String getGoodsTitle() {
        return goodsTitle;
    }
    public void setGoodsTitle(String goodsTitle) {
        this.goodsTitle = goodsTitle;
    }
    public String getZkPrice() {
        return zkPrice;
    }
    public void setZkPrice(String zkPrice) {
        this.zkPrice = zkPrice;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public static class UserGoodsScanLogFactory {
        public static UserGoodsScanLog create(GoodsDetailVO.GoodsInfoVO goodsInfoVO, Long uid, String utdId, String deviceId) {
            UserGoodsScanLog log = new UserGoodsScanLog();
            log.setDevice(StringUtil.isNullOrEmpty(utdId) ? deviceId : utdId);
            log.setGoodsId(goodsInfoVO.getGoodsId());
            log.setGoodsTitle(goodsInfoVO.getTitle());
            log.setGoodsType(goodsInfoVO.getGoodsType());
            log.setUid(uid);
            log.setZkPrice(goodsInfoVO.getZkPrice());
            log.setCreateTime(new Date());
            return log;
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -1721,7 +1721,7 @@
                                for (String st : activityIdList)
                                    content = content.replace(st, "");
                                content = content.replace("{relationId}", "");
                                if (system == SystemEnum.yhqjx) {
                                if (system == SystemEnum.yhqjx || system == SystemEnum.hsb) {
                                    content = content.replace("\n", "<br>");
                                }
                                commentInfoNew.setContent(content);
@@ -1813,7 +1813,7 @@
                                    simpleGoods.setState(1);
                                    simpleGoods.setRemarks("评论验证下架");
                                }
                                if (system == SystemEnum.yhqjx) {
                                if (system == SystemEnum.yhqjx || system == SystemEnum.hsb) {
                                    imgInfo.setGoods(null);
                                }
                            }
@@ -2327,7 +2327,7 @@
                        if (goodsBrief != null && goodsBrief.getImgList() != null) {
                            GoodsMoneyConfigParamsDTO params = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55", system);
                            goods = GoodsDetailVOFactory.convertTaoBao(goodsBrief, params);
                            goods = goodsLijinMnager.loadTBMoneyInfo(system, null, goodsBrief, goods,false);
                            goods = goodsLijinMnager.loadTBMoneyInfo(system, null, goodsBrief, goods, false);
                            for (String img : goodsBrief.getImgList()) {
                                if (!imgSet.contains(img) && imgs.size() < 9) {
                                    imgSet.add(img);
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/HomeNavbarUserServiceImpl.java
@@ -43,7 +43,7 @@
                    device = null;
                }
                // 自定义导航
                List<HomeNavbarUser> listUserNavbar = homeNavbarUserMapper.listEffectiveNavbars(uid, device);
                List<HomeNavbarUser> listUserNavbar = homeNavbarUserMapper.listEffectiveNavbars(uid, device,system);
                if (listUserNavbar != null && listUserNavbar.size() > 0) {
                    // 固定导航
@@ -97,7 +97,7 @@
    }
    @Override
    public List<HomeNavbarUser> listUserNavbar(Long uid, String device) throws HomeNavbarUserException {
    public List<HomeNavbarUser> listUserNavbar(Long uid, String device,SystemEnum system) throws HomeNavbarUserException {
        if (uid == null && StringUtil.isNullOrEmpty(device)) {
            throw new HomeNavbarUserException(1, "参数不正确");
        }
@@ -106,7 +106,7 @@
            device = null;
        }
        return homeNavbarUserMapper.listEffectiveNavbars(uid, device);
        return homeNavbarUserMapper.listEffectiveNavbars(uid, device,system);
    }
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/money/extract/ExtractServiceImpl.java
@@ -349,7 +349,6 @@
     * @param extract
     * @param session
     */
    @Transactional
    private void transfer(Extract extract, AdminUser adminUser) {
        Integer type = extract.getType();
        if (Constant.ZHIFUBAO == type) {
@@ -406,6 +405,15 @@
        return 0;
    }
    private String getOrderPrefix(SystemEnum system) {
        if (system == SystemEnum.yhqjx) {
            return "TJ";
        } else if (system == SystemEnum.hsb) {
            return "HSB";
        }
        return "";
    }
    /**
     * 提现到支付宝
     *
@@ -413,7 +421,6 @@
     * @param session
     */
    // TODO 转账逻辑需要改变,固定IP
    @Transactional
    private void extractByZhiFuBao(Extract extract, AdminUser adminUser) {
        LogHelper.userErrorInfo("提现:开始通过提现-" + extract.getId());
        //获取用户的系统
@@ -422,7 +429,7 @@
        //备注
        String remark = appName + "APP渠道提现";
        //理由
        String reason = String.format("用户ID【%s】发起的提现", user.getSystem() == SystemEnum.yhqjx ? "TJ" + user.getId() : user.getId() + "");
        String reason = String.format("用户ID【%s】发起的提现", getOrderPrefix(user.getSystem()) + user.getId());
        AlipayFundTransUniTransferResponse response = null;
        try {
@@ -452,7 +459,7 @@
        UserInfo user = extract.getUserInfo();
        // MoneyRecord moneyRecord = new MoneyRecord(user, null, extract
        // .getMoney(), "提现", "提现失败", new Date().getTime(), 3);
        if ("PAYER_BALANCE_NOT_ENOUGH".equals(subCode)) {
        if ("PAYER_BALANCE_NOT_ENOUGH".equals(subCode) || "BALANCE_IS_NOT_ENOUGH".equals(subCode)) {
            Extract updateExtract = new Extract();
            updateExtract.setId(extract.getId());
            updateExtract.setState(Constant.EXTRACT_DEFUALT);
@@ -506,7 +513,6 @@
     * @param extract
     * @param session
     */
    @Transactional
    private void extractSuccess(Extract extract, String alipayNo) {
        // 老版本功能
        // List<MoneyRecord> list = moneyRecordDao.list("from MoneyRecord mr
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -368,7 +368,7 @@
                    CommonOrderGoodsVO commonGoodsVO = new CommonOrderGoodsVO();
                    PropertyUtils.copyProperties(commonGoodsVO, goods);
                    commonGoodsVO.setGoodsType(sourceType);
                    commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(order.getThirdCreateTime().getTime(),"yyyy.MM.dd HH:mm"));
                    commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(order.getThirdCreateTime().getTime(), "yyyy.MM.dd HH:mm"));
                    // 淘宝商品图片处理
@@ -386,7 +386,7 @@
                    if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0) {
                        totalSettlement = commonOrder.getTotalPayment();
                    }
                    if (totalSettlement== null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
                    if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
                        commonGoodsVO.setPayState("未付款/已退款");
                    else
                        commonGoodsVO.setPayState("已付款");
@@ -728,7 +728,7 @@
            Map<String, Object> jump = new HashMap<String, Object>();
            jump.put("type", 1); // 页面跳转
            jump.put("params", jumpLink);
            jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("freeCouponDetail",acceptData.getSystem()));
            jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("freeCouponDetail", acceptData.getSystem()));
            Map<String, Object> rewardMap = new HashMap<String, Object>();
            rewardMap.put("text", rewardStyleVO);
@@ -757,7 +757,7 @@
            Map<String, Object> jump = new HashMap<String, Object>();
            jump.put("type", 1); // 1 常规跳转页面
            jump.put("params", jumpLink);
            jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail",acceptData.getSystem()));
            jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail", acceptData.getSystem()));
            rewardMap.put("jump", jump);
            order.setRewardDetail(rewardMap);
        }
@@ -782,7 +782,7 @@
            long limitDate = TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME);
            if (downOrderTime > limitDate) {
                // 2.1 开始新版
                rewardCounponLimitTime(order, accountTime,acceptData.getSystem());
                rewardCounponLimitTime(order, accountTime, acceptData.getSystem());
            } else if (hasRewardCoupon) {
                // 在2.1新版上线之前订单-存在则显示奖励券可使用
                ClientTextStyleVO rewardStyleVO = new ClientTextStyleVO();
@@ -797,7 +797,7 @@
                Map<String, Object> jump = new HashMap<String, Object>();
                jump.put("type", 2); // 弹框
                jump.put("params", jumpLink);
                jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail",acceptData.getSystem()));
                jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail", acceptData.getSystem()));
                Map<String, Object> rewardMap = new HashMap<String, Object>();
                rewardMap.put("text", rewardStyleVO);
@@ -807,7 +807,7 @@
        }
    }
    private void rewardCounponLimitTime(CommonOrderVO order, Date accountTime,SystemEnum system) throws Exception {
    private void rewardCounponLimitTime(CommonOrderVO order, Date accountTime, SystemEnum system) throws Exception {
        // 倒计时验证
        Date endDay = DateUtil.plusDayDate(Constant.COUPON_REWARD_LIMIT_DAY, accountTime);
        long currentTime = java.lang.System.currentTimeMillis();
@@ -882,7 +882,7 @@
        Map<String, Object> jump = new HashMap<String, Object>();
        jump.put("type", 2); // 弹出框使用券
        jump.put("params", jumpLink);
        jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail",system));
        jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail", system));
        rewardMap.put("jump", jump);
        order.setRewardDetail(rewardMap);
    }
@@ -961,7 +961,7 @@
        // 判断所有的订单状态
        int invalidCount = 0;
        for (TaoBaoOrder tb : taoBaoOrders) {
            if ("订单失效".equalsIgnoreCase(tb.getOrderState())) {
            if ("订单失效" .equalsIgnoreCase(tb.getOrderState())) {
                invalidCount++;
            }
        }
@@ -979,7 +979,7 @@
            CommonOrder newCommonOrder = CommonOrderFactory.create(taoBaoOrder);
            CommonOrderGoods cog = new CommonOrderGoods();
            if ("饿了么".equalsIgnoreCase(taoBaoOrder.getOrderType())) {
            if ("饿了么" .equalsIgnoreCase(taoBaoOrder.getOrderType())) {
                cog.setGoodsId(taoBaoOrder.getTradeId() + "");
                cog.setGoodsType(Constant.SOURCE_TYPE_ELME);
                TaoBaoOrderGoods goods = taoBaoOrderGoodsMapper.selectByTradeId(taoBaoOrder.getTradeId());
@@ -1272,8 +1272,8 @@
        // 判断所有的订单状态
        int invalidCount = 0;
        for (SuningOrderInfo order : suningOrderList) {
            if ("退款".equalsIgnoreCase(order.getOrderLineStatusDesc())
                    || "订单已取消".equalsIgnoreCase(order.getOrderLineStatusDesc())) {
            if ("退款" .equalsIgnoreCase(order.getOrderLineStatusDesc())
                    || "订单已取消" .equalsIgnoreCase(order.getOrderLineStatusDesc())) {
                invalidCount++;
            }
        }
@@ -1300,7 +1300,7 @@
            {
                SuningGoodsInfo pddGoods = null;
                // TODO 需要获取
                pddGoods = SuningApiUtil.getGoodsDetail(suningOrderInfo.getGoodsNum(),"0000000000");
                pddGoods = SuningApiUtil.getGoodsDetail(suningOrderInfo.getGoodsNum(), "0000000000");
                if (pddGoods != null) {
                    cog = CommonOrderGoodsFactory.create(pddGoods);
                }
@@ -1315,6 +1315,30 @@
        }
        addConfirmMQMsg(commonOrderList);
        return commonOrderList;
    }
    private boolean needUpdateCommonOrder(CommonOrder oldCommonOrder, CommonOrder newCommonOrder) {
        // 非京东已经结算,已经失效,状态未改变的订单不处理
        if ((oldCommonOrder.getState() == CommonOrder.STATE_JS
                && oldCommonOrder.getSourceType() != Constant.SOURCE_TYPE_JD)
                || oldCommonOrder.getState() == CommonOrder.STATE_SX
                || oldCommonOrder.getState() == CommonOrder.STATE_WQ) {
            return false;
        }
        //状态相同且付款金额,结算金额一致时才不需要更新
        if (oldCommonOrder.getState().intValue() == newCommonOrder.getState()) {
            if (oldCommonOrder.getPayment().compareTo(newCommonOrder.getPayment()) == 0) {
                if (oldCommonOrder.getSettlement() == null && newCommonOrder.getSettlement() == null) {
                    return false;
                } else if (oldCommonOrder.getSettlement() != null && newCommonOrder.getSettlement() != null && oldCommonOrder.getSettlement().compareTo(newCommonOrder.getSettlement()) == 0) {
                    return false;
                }
            }
        }
        return true;
    }
    /**
@@ -1378,12 +1402,8 @@
                    commonOrder.getTradeId(), new Date(), commonOrder.getSourceType()));
            return new CommonOrderAddResultDTO(commonOrder, CommonOrderAddResultDTO.TYPE_ADD);
        } else {// 修改
            // 非京东已经结算,已经失效,状态未改变的订单不处理
            if ((oldCommonOrder.getState() == CommonOrder.STATE_JS
                    && oldCommonOrder.getSourceType() != Constant.SOURCE_TYPE_JD)
                    || oldCommonOrder.getState() == CommonOrder.STATE_SX
                    || oldCommonOrder.getState() == CommonOrder.STATE_WQ
                    || (oldCommonOrder.getState().intValue() == commonOrder.getState()&&oldCommonOrder.getPayment().compareTo(commonOrder.getPayment())==0)) {
            if (!needUpdateCommonOrder(oldCommonOrder, commonOrder)) {
                return new CommonOrderAddResultDTO(oldCommonOrder, CommonOrderAddResultDTO.TYPE_NOUPDATE);
            }
            // 交易ID一致才修改
@@ -1752,7 +1772,7 @@
                } catch (Exception e) {
                    e.printStackTrace();
                }
                commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(commonOrder.getThirdCreateTime().getTime(),"yyyy.MM.dd HH:mm"));
                commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(commonOrder.getThirdCreateTime().getTime(), "yyyy.MM.dd HH:mm"));
                String picture = commonGoodsVO.getPicture();
                if (!StringUtil.isNullOrEmpty(picture) && !picture.contains("320x320")) {
@@ -1779,7 +1799,7 @@
                if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0) {
                    totalSettlement = commonOrder.getTotalPayment();
                }
                if (totalSettlement== null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
                if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
                    commonGoodsVO.setPayState("未付款/已退款");
                else
                    commonGoodsVO.setPayState("已付款");
@@ -1806,7 +1826,7 @@
    }
    @Override
    public JSONObject getRewardJumpInfo(String orderNo, Integer goodsType,SystemEnum system) {
    public JSONObject getRewardJumpInfo(String orderNo, Integer goodsType, SystemEnum system) {
        JSONObject map = new JSONObject();
        // 订单标识
@@ -1828,7 +1848,7 @@
        Map<String, Object> jump = new HashMap<String, Object>();
        jump.put("type", 1);
        jump.put("params", jumpLink);
        jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail",system));
        jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("rewardCouponDetail", system));
        Map<String, Object> rewardMap = new HashMap<String, Object>();
        rewardMap.put("text", rewardStyleVO);
@@ -2122,7 +2142,7 @@
                    if (commonGoodsVO.getGoodsType() == null) {
                        commonGoodsVO.setGoodsType(sourceType);
                    }
                    commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(order.getThirdCreateTime().getTime(),"yyyy.MM.dd HH:mm"));
                    commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(order.getThirdCreateTime().getTime(), "yyyy.MM.dd HH:mm"));
                    // 淘宝商品图片处理
                    String picture = commonGoodsVO.getPicture();
@@ -2139,7 +2159,7 @@
                    if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0) {
                        totalSettlement = commonOrder.getTotalPayment();
                    }
                    if (totalSettlement== null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
                    if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
                        commonGoodsVO.setPayState("未付款/已退款");
                    else
                        commonGoodsVO.setPayState("已付款");
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderHongBaoMoneyComputeServiceImpl.java
@@ -73,7 +73,7 @@
    public BigDecimal computeFanliMoney(CommonOrder order, UserLevelEnum userLevel) {
        SystemEnum system = userInfoService.getUserSystem(order.getUserInfo().getId());
        BigDecimal rate = null;
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            rate = userLijinMnager.getUserFanliRate(order.getUserInfo().getId(), order.getThirdCreateTime());
        } else {
            rate = hongBaoManageService.getBaseFanliRate(order.getThirdCreateTime().getTime(), system)
@@ -97,7 +97,7 @@
    public BigDecimal computeShareMoney(CommonOrder order, UserLevelEnum userLevel) {
        SystemEnum system = userInfoService.getUserSystem(order.getUserInfo().getId());
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return new BigDecimal(0);
        }
@@ -121,7 +121,7 @@
    public BigDecimal computeFirstInviteMoney(CommonOrder order, UserLevelEnum buyer,
                                              List<UserTeamLevel> bossLevelList) {
        SystemEnum system = userInfoService.getUserSystem(order.getUserInfo().getId());
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return new BigDecimal(0);
        }
        BigDecimal rate = null;
@@ -150,7 +150,7 @@
    public BigDecimal computeSecondInviteMoney(CommonOrder order, UserLevelEnum buyer,
                                               List<UserTeamLevel> bossLevelList) {
        SystemEnum system = userInfoService.getUserSystem(order.getUserInfo().getId());
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return new BigDecimal(0);
        }
        BigDecimal rate = null;
@@ -187,7 +187,7 @@
     * @Description:
     */
    private BigDecimal getOfficialSubsidyRate(Date date, UserLevelEnum userLevel, boolean share, SystemEnum system) {
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return new BigDecimal(0);
        }
        String key = null;
@@ -205,7 +205,7 @@
    }
    private BigDecimal getRateByLevel(UserLevelEnum level, Date date, SystemEnum system) {
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return new BigDecimal(0);
        }
        BigDecimal baseRate = hongBaoManageService.getBaseFanliRateCache(
@@ -219,7 +219,7 @@
    @Override
    public UserTeamRate getTeamRewardRate(UserLevelEnum buyerLevel, List<UserTeamLevel> bossLevelList, Date date,
                                          int deep, SystemEnum system) {
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return null;
        }
        if (deep == 1) {// 直接邀请人奖金
@@ -286,7 +286,7 @@
    @Override
    public List<UserTeamRate> getTeamRewardMoreThan2LevelRates(UserLevelEnum buyerLevel,
                                                               List<UserTeamLevel> bossLevelList, Date date, SystemEnum system) {
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return null;
        }
        if (bossLevelList == null || bossLevelList.size() < 3)
@@ -321,7 +321,7 @@
    @Override
    public List<UserTeamRate> getTeamDividentsRates(UserLevelEnum buyerLevel, List<UserTeamLevel> bossLevelList,
                                                    Date date, SystemEnum system) {
        if (system == SystemEnum.yhqjx) {
        if (system == SystemEnum.yhqjx||system == SystemEnum.hsb) {
            return null;
        }
        List<UserTeamRate> rateList = new ArrayList<>();
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderMoneySettleServiceImpl.java
@@ -13,6 +13,8 @@
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -63,6 +65,8 @@
@Service
public class OrderMoneySettleServiceImpl implements OrderMoneySettleService {
    Logger logger = LoggerFactory.getLogger(OrderMoneySettleService.class);
    @Resource
    private HongBaoV2Mapper hongBaoV2Mapper;
@@ -530,6 +534,7 @@
    private void fanliInvite(List<HongBaoV2> hongBaoList, Long uid, int sourceType, String key, Date maxPreGetTime)
            throws TeamEincomeRecordException, ParamsException, TeamRewardDebtException {
        logger.info("邀请奖金预到账:uid-{} sourceType-{} key-{}", new Object[]{uid, sourceType, key});
        List<Long> hbIdList = new ArrayList<>();
        BigDecimal invitemoney = new BigDecimal(0);
        Set<String> inviteOrders = new HashSet<>();
@@ -541,6 +546,7 @@
                continue;
            hongBao = hongBaoV2Mapper.selectByPrimaryKeyForUpdate(hongBao.getId());
            if (hongBao.getState() == HongBaoV2.STATE_BUKELINGQU || hongBao.getState() == HongBaoV2.STATE_KELINGQU) {
                logger.info("邀请奖金预到账-每个红包-到账开始:hongbaoid-{}", hongBao.getId());
                TeamRewardDebt debt = teamRewardDebtService.selectBySourceId(hongBao.getId());
                BigDecimal money = hongBao.getMoney();
                if (debt != null && debt.getLeftMoney().compareTo(new BigDecimal(0)) > 0
@@ -548,8 +554,9 @@
                    money = money.subtract(debt.getLeftMoney());
                    // 还钱
                    teamRewardDebtService.repayDebt(debt.getId(), debt.getLeftMoney(), null);
                    logger.info("邀请奖金预到账-每个红包-还款:hongbaoid-{} debtId-{} debtMoney-{}", new Object[]{hongBao.getId(), debt.getId(), debt.getLeftMoney()});
                }
                logger.info("邀请奖金预到账-每个红包:hongbaoid-{} money-{}", new Object[]{hongBao.getId(), money});
                invitemoney = invitemoney.add(money);
                HongBaoV2 updateHongBao = new HongBaoV2();
                updateHongBao.setId(hongBao.getId());
@@ -561,6 +568,7 @@
                hbIdList.add(hongBao.getId());
                HongBaoOrder hongBaoOrder = hongBaoOrderMapper.selectByHongBaoId(hongBao.getParent().getId());
                inviteOrders.add(hongBaoOrder.getCommonOrder().getOrderNo());
                logger.info("邀请奖金预到账-每个红包-到账成功:hongbaoid-{}", hongBao.getId());
            }
        }
@@ -568,6 +576,7 @@
        if (invitemoney.compareTo(new BigDecimal(0)) > 0) {
            // 获取当前的月份
            teamRewardManager.addToEincome(uid, maxPreGetTime, invitemoney, sourceType);
            logger.info("邀请奖金预到账-添加到团队收益成功:uid-{} day-{} money-{} sourceType-{}", new Object[]{uid, maxPreGetTime, invitemoney, sourceType});
        }
        hongBaoV2SettleTempService.addTemp(hbIdList, key);
fanli/src/main/java/com/yeshi/fanli/service/impl/order/msg/UserOrderMsgNotificationServiceImpl.java
@@ -43,7 +43,6 @@
        addOrderStatistics(uid, orderId, orderType, Constant.TYPE_REBATE, goodsCount, payMoney, money, downTime, null, needNotify);
        SystemEnum system = userInfoService.getUserSystem(uid);
        if (needNotify) {
            PushContentDTO dto = PushMsgFactory.createFanLiOrderStatisticed(orderType, orderId, money);
            try {
@@ -54,6 +53,7 @@
                e.printStackTrace();
            }
        }
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushServiceImpl.java
@@ -433,7 +433,7 @@
                    versionCodeList = appVersionService.listVersionCodeByVersions("android", listAndroid, system);
            }
            try {
                newPush(system, uidList, versionCodeList, null, title, content, NewPushExtraParamsFactory.createBaichuan(jumpDetailV2Service.getByTypeCache("system_msg", system), url));
                newPush(system, uidList, versionCodeList, null, title, content, NewPushExtraParamsFactory.createBaichuan(jumpDetailV2Service.getByTypeCache("baichuan", system), url));
            } catch (BPushTaskException e) {
                logger.error("推送-百川:{}", url, e);
            }
@@ -707,11 +707,12 @@
        uidSet.add(6857703L);
        uidSet.add(6845887L);
        if (!uidSet.contains(uidList.get(0))) {
            return;
        }
//      取消灰度测试
//        if (!uidSet.contains(uidList.get(0))) {
//            return;
//      }
        logger.debug("新版推送灰度测试开始:title-{} content-{}", new Object[]{title, content});
        logger.debug("新版推送开始:title-{} content-{}", new Object[]{title, content});
        BPushFilter filter = new BPushFilter();
fanli/src/main/java/com/yeshi/fanli/service/inter/homemodule/HomeNavbarUserService.java
@@ -39,7 +39,7 @@
     * @return
     * @throws HomeNavbarUserException
     */
    public List<HomeNavbarUser> listUserNavbar(Long uid, String device) throws HomeNavbarUserException;
    public List<HomeNavbarUser> listUserNavbar(Long uid, String device,SystemEnum system) throws HomeNavbarUserException;
    /**
     * 同步设备上的设置
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeApiUtil.java
@@ -2062,11 +2062,12 @@
    }
    /**
     * 获取淘宝系统时间
     * 获取淘宝系统时间(收费API,谨慎调用)
     *
     * @return
     */
    public static Date getTaoBaoSystemTime() {   Map<String, String> map = new HashMap<>();
    public static Date getTaoBaoSystemTime() {
        Map<String, String> map = new HashMap<>();
        map.put("method", "taobao.time.get");
        try {
            JSONObject json = TaoKeBaseUtil.baseRequest(map, false);
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeOrderApiUtil.java
@@ -123,91 +123,7 @@
                JSONObject item = array.optJSONObject(i);
                try {
                    TaoBaoOrder taoBaoOrder = new TaoBaoOrder();
                    taoBaoOrder.setAdPositionId(item.optString("adzone_id"));
                    taoBaoOrder.setAdPositionName(item.optString("adzone_name"));
                    taoBaoOrder.setAuctionId(item.optLong("item_id"));
                    taoBaoOrder.setClassName(item.optString("item_category_name"));
                    taoBaoOrder.setClickTime(item.optString("click_time"));
                    taoBaoOrder.setPayTime(item.optString("tb_paid_time"));
                    taoBaoOrder.setCount(item.optInt("item_num"));
                    taoBaoOrder.setCreateTime(item.optString("tk_create_time"));
                    if (!StringUtil.isNullOrEmpty(item.optString("total_commission_fee")))
                        taoBaoOrder.seteIncome(new BigDecimal(item.optString("total_commission_fee")));
                    else
                        taoBaoOrder.seteIncome(new BigDecimal(0));
                    if (!StringUtil.isNullOrEmpty(item.optString("pub_share_pre_fee")))
                        taoBaoOrder.setEstimate(new BigDecimal(item.optString("pub_share_pre_fee")));
                    else
                        taoBaoOrder.setEstimate(new BigDecimal(0));
                    taoBaoOrder.setiRatio(new BigDecimal(item.optString("income_rate")));
                    taoBaoOrder.setLatestUpdateTime(null);
                    taoBaoOrder.setManagerWangWang(null);
                    taoBaoOrder.setOrderBy(null);
                    taoBaoOrder.setOrderId(item.optString("trade_parent_id"));
                    if (item.optInt("tk_status") == 12)
                        taoBaoOrder.setOrderState("订单付款");
                    else if (item.optInt("tk_status") == 3)
                        taoBaoOrder.setOrderState("订单结算");
                    else if (item.optInt("tk_status") == 13)
                        taoBaoOrder.setOrderState("订单失效");
                    else if (item.optInt("tk_status") == 14)
                        taoBaoOrder.setOrderState("订单成功");
                    taoBaoOrder.setOrderType(item.optString("order_type"));
                    if (!StringUtil.isNullOrEmpty(item.optString("alipay_total_price")))
                        taoBaoOrder.setPayment(new BigDecimal(item.optString("alipay_total_price")));
                    else
                        taoBaoOrder.setPayment(new BigDecimal(0));
                    if (StringUtil.isNullOrEmpty(item.optString("item_price")))
                        taoBaoOrder.setPrice(new BigDecimal(0));
                    else
                        taoBaoOrder.setPrice(new BigDecimal(item.optString("item_price")));
                    if (!StringUtil.isNullOrEmpty(item.optString("pay_price")))
                        taoBaoOrder.setSettlement(new BigDecimal(item.optString("pay_price")));
                    else
                        taoBaoOrder.setSettlement(taoBaoOrder.getPayment());
                    taoBaoOrder.setSettlementTime(item.optString("tk_earning_time"));
                    taoBaoOrder.setShop(item.optString("seller_shop_title"));
                    taoBaoOrder.setSourceMediaId(item.optString("site_id"));
                    taoBaoOrder.setSourceMediaName(item.optString("site_name"));
                    taoBaoOrder.setsRatio(null);
                    if (!StringUtil.isNullOrEmpty(item.optString("subsidy_fee")))// 补贴金额
                        taoBaoOrder.setSubsidy(new BigDecimal(item.optString("subsidy_fee")));
                    if (!StringUtil.isNullOrEmpty(item.optString("subsidy_rate")))
                        taoBaoOrder.setSubsidyRatio(new BigDecimal(item.optString("subsidy_rate")));
                    taoBaoOrder.setSubsidyType(item.optString("subsidy_type"));
                    taoBaoOrder.setTechnologySupportPercent(null);
                    taoBaoOrder.setThirdService(null);
                    taoBaoOrder.setTitle(item.optString("item_title"));
                    if (!StringUtil.isNullOrEmpty(item.optString("total_commission_fee")))
                        taoBaoOrder.setTkMoney(new BigDecimal(item.optString("total_commission_fee")));
                    else
                        taoBaoOrder.setTkMoney(new BigDecimal(0));
                    if (!StringUtil.isNullOrEmpty(item.optString("commission_rate")))
                        taoBaoOrder.setTkRate(new BigDecimal(item.optString("commission_rate")));
                    else if (!StringUtil.isNullOrEmpty(item.optString("total_commission_rate")))
                        taoBaoOrder.setTkRate(new BigDecimal(item.optString("total_commission_rate")));
                    taoBaoOrder.setTransactionPlatform(item.optString("terminal_type"));
                    taoBaoOrder.setRelationId(item.optString("relation_id"));
                    taoBaoOrder.setSpecialId(item.optString("special_id"));
                    taoBaoOrder.setTradeId(item.optString("trade_id"));
                    // 解析商品信息
                    TaoBaoOrderGoods goods = new TaoBaoOrderGoods();
                    goods.setCategoryName(item.optString("item_category_name"));
                    goods.setCreateTime(new Date());
                    goods.setGoodsId(item.optLong("item_id"));
                    goods.setImg(item.optString("item_img"));
                    goods.setLink(item.optString("item_link"));
                    goods.setPrice(item.optString("item_price"));
                    goods.setTitle(item.optString("item_title"));
                    goods.setTradeId(item.optString("trade_id"));
                    if (goods.getImg() != null && !goods.getImg().startsWith("http")) {
                        goods.setImg("http:" + goods.getImg());
                    }
                    taoBaoOrder.setGoods(goods);
                    TaoBaoOrder taoBaoOrder = parseTaoBaoOrderNew(item);
                    orderList.add(taoBaoOrder);
                } catch (Exception e) {
                    try {
@@ -425,8 +341,8 @@
     *
     * @param startTime
     * @param endTime
     * @param status 12-付款,13-关闭,14-确认收货,3-结算成功;不传
     * @param queryType 1:按照订单淘客创建时间查询,2:按照订单淘客付款时间查询,3:按照订单淘客结算时间查询
     * @param status     12-付款,13-关闭,14-确认收货,3-结算成功;不传
     * @param queryType  1:按照订单淘客创建时间查询,2:按照订单淘客付款时间查询,3:按照订单淘客结算时间查询
     * @param orderScene 1:常规订单,2:渠道订单,3:会员运营订单
     * @return
     */
@@ -515,6 +431,95 @@
    }
    public static TaoBaoOrder parseTaoBaoOrderNew(JSONObject item) {
        TaoBaoOrder taoBaoOrder = new TaoBaoOrder();
        taoBaoOrder.setAdPositionId(item.optString("adzone_id"));
        taoBaoOrder.setAdPositionName(item.optString("adzone_name"));
        taoBaoOrder.setAuctionId(item.optLong("item_id"));
        taoBaoOrder.setClassName(item.optString("item_category_name"));
        taoBaoOrder.setClickTime(item.optString("click_time"));
        taoBaoOrder.setPayTime(item.optString("tb_paid_time"));
        taoBaoOrder.setCount(item.optInt("item_num"));
        taoBaoOrder.setCreateTime(item.optString("tk_create_time"));
        if (!StringUtil.isNullOrEmpty(item.optString("total_commission_fee")))
            taoBaoOrder.seteIncome(new BigDecimal(item.optString("total_commission_fee")));
        else
            taoBaoOrder.seteIncome(new BigDecimal(0));
        if (!StringUtil.isNullOrEmpty(item.optString("pub_share_pre_fee")))
            taoBaoOrder.setEstimate(new BigDecimal(item.optString("pub_share_pre_fee")));
        else
            taoBaoOrder.setEstimate(new BigDecimal(0));
        taoBaoOrder.setiRatio(new BigDecimal(item.optString("income_rate")));
        taoBaoOrder.setLatestUpdateTime(null);
        taoBaoOrder.setManagerWangWang(null);
        taoBaoOrder.setOrderBy(null);
        taoBaoOrder.setOrderId(item.optString("trade_parent_id"));
        if (item.optInt("tk_status") == 12)
            taoBaoOrder.setOrderState("订单付款");
        else if (item.optInt("tk_status") == 3)
            taoBaoOrder.setOrderState("订单结算");
        else if (item.optInt("tk_status") == 13)
            taoBaoOrder.setOrderState("订单失效");
        else if (item.optInt("tk_status") == 14)
            taoBaoOrder.setOrderState("订单成功");
        taoBaoOrder.setOrderType(item.optString("order_type"));
        if (!StringUtil.isNullOrEmpty(item.optString("alipay_total_price")))
            taoBaoOrder.setPayment(new BigDecimal(item.optString("alipay_total_price")));
        else
            taoBaoOrder.setPayment(new BigDecimal(0));
        if (StringUtil.isNullOrEmpty(item.optString("item_price")))
            taoBaoOrder.setPrice(new BigDecimal(0));
        else
            taoBaoOrder.setPrice(new BigDecimal(item.optString("item_price")));
        if (!StringUtil.isNullOrEmpty(item.optString("pay_price")))
            taoBaoOrder.setSettlement(new BigDecimal(item.optString("pay_price")));
        else
            taoBaoOrder.setSettlement(taoBaoOrder.getPayment());
        taoBaoOrder.setSettlementTime(item.optString("tk_earning_time"));
        taoBaoOrder.setShop(item.optString("seller_shop_title"));
        taoBaoOrder.setSourceMediaId(item.optString("site_id"));
        taoBaoOrder.setSourceMediaName(item.optString("site_name"));
        taoBaoOrder.setsRatio(null);
        if (!StringUtil.isNullOrEmpty(item.optString("subsidy_fee")))// 补贴金额
            taoBaoOrder.setSubsidy(new BigDecimal(item.optString("subsidy_fee")));
        if (!StringUtil.isNullOrEmpty(item.optString("subsidy_rate")))
            taoBaoOrder.setSubsidyRatio(new BigDecimal(item.optString("subsidy_rate")));
        taoBaoOrder.setSubsidyType(item.optString("subsidy_type"));
        taoBaoOrder.setTechnologySupportPercent(null);
        taoBaoOrder.setThirdService(null);
        taoBaoOrder.setTitle(item.optString("item_title"));
        if (!StringUtil.isNullOrEmpty(item.optString("total_commission_fee")))
            taoBaoOrder.setTkMoney(new BigDecimal(item.optString("total_commission_fee")));
        else
            taoBaoOrder.setTkMoney(new BigDecimal(0));
        if (!StringUtil.isNullOrEmpty(item.optString("commission_rate")))
            taoBaoOrder.setTkRate(new BigDecimal(item.optString("commission_rate")));
        else if (!StringUtil.isNullOrEmpty(item.optString("total_commission_rate")))
            taoBaoOrder.setTkRate(new BigDecimal(item.optString("total_commission_rate")));
        taoBaoOrder.setTransactionPlatform(item.optString("terminal_type"));
        taoBaoOrder.setRelationId(item.optString("relation_id"));
        taoBaoOrder.setSpecialId(item.optString("special_id"));
        taoBaoOrder.setTradeId(item.optString("trade_id"));
        // 解析商品信息
        TaoBaoOrderGoods goods = new TaoBaoOrderGoods();
        goods.setCategoryName(item.optString("item_category_name"));
        goods.setCreateTime(new Date());
        goods.setGoodsId(item.optLong("item_id"));
        goods.setImg(item.optString("item_img"));
        goods.setLink(item.optString("item_link"));
        goods.setPrice(item.optString("item_price"));
        goods.setTitle(item.optString("item_title"));
        goods.setTradeId(item.optString("trade_id"));
        if (goods.getImg() != null && !goods.getImg().startsWith("http")) {
            goods.setImg("http:" + goods.getImg());
        }
        taoBaoOrder.setGoods(goods);
        return taoBaoOrder;
    }
    @Deprecated
    public static List<TaoBaoOrder> queryTaoBaoOrder(OrderQuery orderQuery, String appKey, String appSecret) {
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeScApiUtil.java
@@ -1966,7 +1966,7 @@
    }
    /**
     * 获取淘宝系统时间
     * 获取淘宝系统时间(收费API,谨慎调用)
     *
     * @return
     */
fanli/src/main/java/com/yeshi/fanli/util/vipshop/DingDanXiaApiUtil.java
New file
@@ -0,0 +1,138 @@
package com.yeshi.fanli.util.vipshop;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.dto.vip.VIPConvertResultDTO;
import com.yeshi.fanli.dto.vipshop.VipShopOrderQueryModel;
import com.yeshi.fanli.dto.vipshop.VipShopQueryOrderResultDTO;
import com.yeshi.fanli.entity.vipshop.VipShopOrder;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.yeshi.utils.HttpUtil;
import org.yeshi.utils.JsonUtil;
import java.lang.reflect.Type;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
 * 订单侠
 */
public class DingDanXiaApiUtil {
    private final static String API_KEY = "1VCQjf4ymNbNAhvhDZA7WDFgSv6mnDxN";
    public static VIPConvertResultDTO convertLink(String goodsId, String tag) {
        String url = "http://api.tbk.dingdanxia.com/vip/id_privilege?apikey=" + API_KEY;
        url += "&id=" + goodsId;
        if (tag != null) {
            url += "&chanTag=" + tag;
        }
        String result = HttpUtil.get(url);
        System.out.println(result);
        JSONObject data = JSONObject.fromObject(result);
        if (data.optInt("code") != 200) {
            return null;
        }
        data = data.optJSONObject("data");
        Gson gson = JsonUtil.getSimpleGson();
        return gson.fromJson(data.toString(), VIPConvertResultDTO.class);
    }
    public static VIPConvertResultDTO convertLinkByUrl(String url, String tag) {
        String baseUrl = "http://api.tbk.dingdanxia.com/vip/url_privilege?apikey=" + API_KEY;
        baseUrl += "&url=" + URLEncoder.encode(url);
        if (tag != null) {
            baseUrl += "&chanTag=" + tag;
        }
        String result = HttpUtil.get(baseUrl);
        System.out.println(result);
        JSONObject data = JSONObject.fromObject(result);
        if (data.optInt("code") != 200) {
            return null;
        }
        data = data.optJSONObject("data");
        Gson gson = JsonUtil.getSimpleGson();
        return gson.fromJson(data.toString(), VIPConvertResultDTO.class);
    }
    public static VipShopQueryOrderResultDTO getOrderList(VipShopOrderQueryModel query) {
        String url = "http://api.tbk.dingdanxia.com/vip/order_details2?apikey=" + API_KEY;
        url += "&page=" + query.getPage();
        if (query.getPageSize() != null) {
            url += "&pageSize=" + query.getPageSize();
        }
        if (query.getOrderTimeStart() != null) {
            url += "&orderTimeStart=" + query.getOrderTimeStart();
        }
        if (query.getOrderTimeEnd() != null) {
            url += "&orderTimeEnd=" + query.getOrderTimeEnd();
        }
        if (query.getStatus() != null) {
            url += "&status=" + query.getStatus();
        }
        if (query.getUpdateTimeStart() != null) {
            url += "&updateTimeStart=" + query.getUpdateTimeStart();
        }
        if (query.getUpdateTimeEnd() != null) {
            url += "&updateTimeEnd=" + query.getUpdateTimeEnd();
        }
        String result = HttpUtil.get(url);
        System.out.println(result);
        JSONObject data = JSONObject.fromObject(result);
        if (data.optInt("code") != 200) {
            return null;
        }
        int total = data.optInt("total_results");
        JSONArray array = JSONArray.fromObject(data.optJSONArray("data"));
        if (array == null)
            return null;
        Type type = new TypeToken<ArrayList<VipShopOrder>>() {
        }.getType();
        List<VipShopOrder> orderList = new Gson().fromJson(array.toString(), type);
        return new VipShopQueryOrderResultDTO(orderList, total);
    }
    public static VipShopOrder getOrderDetail(String orderSn) {
        String url = "http://api.tbk.dingdanxia.com/vip/order_details?apikey=" + API_KEY;
        url += "&orderSn=" + orderSn;
        String result = HttpUtil.get(url);
        System.out.println(result);
        JSONObject data = JSONObject.fromObject(result);
        if (data.optInt("code") != 200) {
            return null;
        }
        VipShopOrder vipShopOrder = new Gson().fromJson(data.optJSONObject("data").toString(), VipShopOrder.class);
        return vipShopOrder;
    }
    public static void main(String[] args) {
//        convertLinkByUrl("6918302458239328477", "123");
//        convertLinkByUrl("https://t.vip.com/T7RyKKCJLj9", "437032");
//        VipShopOrderQueryModel queryModel = new VipShopOrderQueryModel();
//        queryModel.setPage(1);
//        queryModel.setPageSize(20);
//        queryModel.setOrderTimeEnd(System.currentTimeMillis());
//        queryModel.setOrderTimeStart(System.currentTimeMillis() - 1000 * 60 * 60 * 48L);
//        VipShopQueryOrderResultDTO resultDTO = getOrderList(queryModel);
//        System.out.println(resultDTO);
        getOrderDetail("21081436395569");
    }
}
fanli/src/main/java/com/yeshi/fanli/util/vipshop/VipShopSCApiUtil.java
New file
@@ -0,0 +1,268 @@
package com.yeshi.fanli.util.vipshop;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.yeshi.fanli.dto.vip.VIPConvertResultDTO;
import com.yeshi.fanli.dto.vip.VIPSearchFilter;
import com.yeshi.fanli.dto.vip.VIPSearchResult;
import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
import com.yeshi.fanli.dto.vipshop.VipShopOrderQueryModel;
import com.yeshi.fanli.dto.vipshop.VipShopQueryOrderResultDTO;
import com.yeshi.fanli.entity.vipshop.VipShopOrder;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.methods.PostMethod;
import org.yeshi.utils.HttpUtil;
import org.yeshi.utils.StringUtil;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Type;
import java.net.URLEncoder;
import java.util.*;
/**
 * 唯品会接口服务商接口
 * 权限文档: https://vop.vip.com/home#/console/app/detail/permission/2343e85c
 *
 * @author Administrator
 */
public class VipShopSCApiUtil {
    private final static String appKey = "2343e85c";
    private final static String appSecret = "16AC47F90859E29078FD59E5A951E335";
    /**
     * 文档:https://vop.vip.com/doccenter/viewdoc/33
     * 授权链接:https://auth.vip.com/oauth2/authorize?client_id=9870c528&response_type=code&redirect_uri=http://www.baidu.com#
     *
     * @param code
     * @return
     */
    private static String getAccessToken(String code) {
        //EFCD81A1A311349E2043F9D97B456B277165D3FE
        Map<String, String> params = new HashMap<>();
        params.put("client_id", appKey);
        params.put("client_secret", appSecret);
        params.put("grant_type", "authorization_code");
        params.put("redirect_uri", "http://www.baidu.com");
        params.put("request_client_ip", "192.168.3.122");
        params.put("code", code);
        List<String> list = new ArrayList<>();
        for (Iterator<String> its = params.keySet().iterator(); its.hasNext(); ) {
            String key = its.next();
            list.add(key + "=" + URLEncoder.encode(params.get(key)));
        }
        String url = "https://auth.vip.com/oauth2/token?" + StringUtil.concat(list, "&");
        String result = HttpUtil.post(url);
        JSONObject data = JSONObject.fromObject(result);
        return data.optString("access_token");
    }
    /**
     * 获取签名
     *
     * @param params
     * @return
     */
    private static String getSign(Map<String, String> systemParams, JSONObject taskParams) {
        List<String> list = new ArrayList<>();
        for (Iterator<String> its = systemParams.keySet().iterator(); its.hasNext(); ) {
            String key = its.next();
            String value = systemParams.get(key);
            list.add(key + value);
        }
        Collections.sort(list);
        String source = "";
        for (String st : list)
            source += st;
        source += taskParams.toString();
        return StringUtil.MD5Hmac(source, appSecret);
    }
    private static Map<String, String> getSystemParams(String service, String method) {
        Map<String, String> params = new HashMap<String, String>();
        params.put("service", service);
        params.put("method", method);
        params.put("version", "1.0");
        params.put("timestamp", System.currentTimeMillis() / 1000 + "");
        params.put("format", "json");
        params.put("appKey", appKey);
        params.put("accessToken", "EFCD81A1A311349E2043F9D97B456B277165D3FE");
        return params;
    }
    /**
     * 基础请求
     *
     * @param service
     * @param method
     * @param taskParams
     * @return
     */
    private static String baseRequest(String service, String method, JSONObject taskParams) {
        Map<String, String> systemParams = getSystemParams(service, method);
        String sign = getSign(systemParams, taskParams);
        systemParams.put("sign", sign);
        String baseUrl = "https://gw.vipapis.com";
        baseUrl += "?";
        for (Iterator<String> its = systemParams.keySet().iterator(); its.hasNext(); ) {
            String key = its.next();
            String value = "";
            try {
                value = URLEncoder.encode(systemParams.get(key), "UTF-8");
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }
            baseUrl += key + "=" + value + "&";
        }
        baseUrl = baseUrl.endsWith("&") ? baseUrl.substring(0, baseUrl.length() - 1) : baseUrl;
        String result = post(baseUrl, taskParams.toString());
        return result;
    }
    @SuppressWarnings("deprecation")
    private static String post(String url, String body) {
        HttpClient client = new HttpClient();
        PostMethod method = new PostMethod(url);
        method.addRequestHeader("Content-Type", "application/json;charset=UTF-8");
        method.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
        method.setRequestBody(body);
        try {
            client.executeMethod(method);
            return method.getResponseBodyAsString();
        } catch (HttpException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
    /**
     * 商品ID转链
     *
     * @param goodsId
     */
    public static VIPConvertResultDTO convertLink(String goodsId, String tag) {
        JSONObject taskParams = new JSONObject();
        JSONArray goodsIdArray = new JSONArray();
        goodsIdArray.add(goodsId);
        taskParams.put("goodsIdList", goodsIdArray);
        taskParams.put("chanTag", tag);
        taskParams.put("requestId", System.currentTimeMillis() + "_" + UUID.randomUUID());
        String result = baseRequest("com.vip.adp.api.open.service.UnionUrlService", "genByGoodsIdWithOauth",
                JSONObject.fromObject(taskParams));
        System.out.println(result);
        JSONObject resultJSON = JSONObject.fromObject(result);
        if (resultJSON.optInt("returnCode") == 0) {
            String re = resultJSON.optJSONObject("result").optJSONArray("urlInfoList").optJSONObject(0).toString();
            return new Gson().fromJson(re, VIPConvertResultDTO.class);
        }
        return null;
    }
    public static VIPConvertResultDTO convertLinkByUrl(String url, String tag) {
        JSONObject taskParams = new JSONObject();
        JSONArray urlArray = new JSONArray();
        urlArray.add(url);
        taskParams.put("urlList", urlArray);
        if (tag != null) {
            taskParams.put("chanTag", tag);
        }
        taskParams.put("requestId", System.currentTimeMillis() + "_" + UUID.randomUUID());
        String result = baseRequest("com.vip.adp.api.open.service.UnionUrlService", "genByVIPUrl",
                JSONObject.fromObject(taskParams));
        System.out.println(result);
        JSONObject resultJSON = JSONObject.fromObject(result);
        if (resultJSON.optInt("returnCode") == 0) {
            String re = resultJSON.optJSONObject("result").optJSONArray("urlInfoList").optJSONObject(0).toString();
            return new Gson().fromJson(re, VIPConvertResultDTO.class);
        }
        return null;
    }
    /**
     * 根据商品ID获取商品详情
     *
     * @param goodsIdList
     * @return
     */
    public static List<VIPGoodsInfo> getGoodsDetail(List<String> goodsIdList) {
        JSONObject params = new JSONObject();
        params.put("goodsIdList", goodsIdList);
        params.put("requestId", UUID.randomUUID());
        String result = baseRequest("com.vip.adp.api.open.service.UnionGoodsService", "getByGoodsIds",
                JSONObject.fromObject(params));
        System.out.println(result);
        JSONObject resultJson = JSONObject.fromObject(result);
        Gson gson = new Gson();
        List<VIPGoodsInfo> goodsList = new ArrayList<>();
        if (resultJson.optInt("returnCode") == 0) {
            JSONArray array = resultJson.optJSONArray("result");
            for (int i = 0; i < array.size(); i++) {
                VIPGoodsInfo info = gson.fromJson(array.optJSONObject(i).toString(), VIPGoodsInfo.class);
                if (info != null)
                    goodsList.add(info);
            }
            return goodsList;
        }
        return null;
    }
    /**
     * 获取商品详情
     *
     * @param goodsId
     * @return
     */
    public static VIPGoodsInfo getGoodsDetail(String goodsId) {
        List<String> goodsIdList = new ArrayList<>();
        goodsIdList.add(goodsId);
        List<VIPGoodsInfo> goodsList = getGoodsDetail(goodsIdList);
        if (goodsList == null || goodsList.size() == 0)
            return null;
        return goodsList.get(0);
    }
    public static VipShopQueryOrderResultDTO getOrderList(VipShopOrderQueryModel query) {
        JSONObject params = JSONObject.fromObject(new Gson().toJson(query));
        params.put("requestId", UUID.randomUUID());
        JSONObject root = new JSONObject();
        root.put("queryModel", params);
        String result = baseRequest("com.vip.adp.api.open.service.UnionOrderService", "orderList", root);
        System.out.println(result);
        JSONObject json = JSONObject.fromObject(result);
        if (json.optInt("returnCode") == 0) {
            JSONObject resultJson = json.optJSONObject("result");
            int total = resultJson.optInt("total");
            JSONArray array = JSONArray.fromObject(resultJson.optJSONArray("orderInfoList"));
            if (array != null) {
                Type type = new TypeToken<ArrayList<VipShopOrder>>() {
                }.getType();
                List<VipShopOrder> orderList = new Gson().fromJson(array.toString(), type);
                return new VipShopQueryOrderResultDTO(orderList, total);
            }
        }
        return null;
    }
    public static void main(String[] args) {
        VipShopOrderQueryModel model = new VipShopOrderQueryModel();
        model.setPage(1);
        model.setPageSize(20);
        model.setOrderSnList(Arrays.asList(new String[]{"21081436395569", "21072601507337"}));
        VipShopQueryOrderResultDTO dto = getOrderList(model);
        System.out.println(dto);
    }
}
fanli/src/main/resource/mapping/homemodule/HomeNavbarUserMapper.xml
@@ -2,135 +2,145 @@
<!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.HomeNavbarUserMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">
    <id column="hnu_id" property="id" jdbcType="BIGINT"/>
    <result column="hnu_uid" property="uid" jdbcType="BIGINT"/>
    <result column="hnu_device" property="device" jdbcType="VARCHAR"/>
    <result column="hnu_order" property="order" jdbcType="INTEGER"/>
    <result column="hnu_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <association property="homeNavbar" column="hnu_navbar_id" javaType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">
        <id column="hnu_navbar_id" property="id" jdbcType="BIGINT" />
    </association>
  </resultMap>
  <resultMap id="WholeResultMap" type="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">
    <id column="hnu_id" property="id" jdbcType="BIGINT"/>
    <result column="hnu_uid" property="uid" jdbcType="BIGINT"/>
    <result column="hnu_device" property="device" jdbcType="VARCHAR"/>
    <result column="hnu_order" property="order" jdbcType="INTEGER"/>
    <result column="hnu_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <association property="homeNavbar" column="hnu_navbar_id" resultMap="com.yeshi.fanli.dao.mybatis.homemodule.HomeNavbarMapper.BaseResultMap"/>
  </resultMap>
  <sql id="Base_Column_List">hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_home_navbar_user where hnu_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_home_navbar_user where hnu_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar_user (hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{homeNavbar.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar_user
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">hnu_id,</if>
      <if test="uid != null">hnu_uid,</if>
      <if test="device != null">hnu_device,</if>
      <if test="order != null">hnu_order,</if>
      <if test="homeNavbar != null">hnu_navbar_id,</if>
      <if test="createTime != null">hnu_create_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
      <if test="device != null">#{device,jdbcType=VARCHAR},</if>
      <if test="order != null">#{order,jdbcType=INTEGER},</if>
      <if test="homeNavbar != null">#{homeNavbar.id,jdbcType=BIGINT},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">update yeshi_ec_home_navbar_user set hnu_uid = #{uid,jdbcType=BIGINT},hnu_device = #{device,jdbcType=VARCHAR},hnu_order = #{order,jdbcType=INTEGER},hnu_navbar_id = #{homeNavbar.id,jdbcType=BIGINT},hnu_create_time = #{createTime,jdbcType=TIMESTAMP} where hnu_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">update yeshi_ec_home_navbar_user
    <set>
      <if test="uid != null">hnu_uid=#{uid,jdbcType=BIGINT},</if>
      <if test="device != null">hnu_device=#{device,jdbcType=VARCHAR},</if>
      <if test="order != null">hnu_order=#{order,jdbcType=INTEGER},</if>
      <if test="homeNavbar != null">hnu_navbar_id=#{homeNavbar.id,jdbcType=BIGINT},</if>
      <if test="createTime != null">hnu_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
    </set> where hnu_id = #{id,jdbcType=BIGINT}
  </update>
    <!-- 批量插入数据 -->
  <insert id="insertBatch" keyProperty="id" parameterType="java.util.List">
        insert into yeshi_ec_home_navbar_user
        (hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time)
        values
        <foreach collection="list" item="item" separator=",">
            (
            #{item.id,jdbcType=BIGINT},
            #{item.uid,jdbcType=BIGINT},
            #{item.device,jdbcType=VARCHAR},
            #{item.order,jdbcType=INTEGER},
            #{item.homeNavbar.id,jdbcType=BIGINT},
            #{item.createTime,jdbcType=TIMESTAMP}
            )
        </foreach>
  </insert>
  <!-- 批量更新排序 -->
  <update id="updateSelectiveBatch" parameterType="java.util.List">
        update yeshi_ec_home_navbar_user
        <trim prefix="set" suffixOverrides=",">
            <trim prefix="hnu_order=case" suffix="end,">
                <foreach collection="list" item="item" index="index">
                    <if test="item.order !=null">
                        when hnu_id=#{item.id} then #{item.order}
                    </if>
                </foreach>
            </trim>
        </trim>
        where hnu_id in
        <foreach collection="list" index="index" item="item"
            separator="," open="(" close=")">
            #{item.id,jdbcType=BIGINT}
        </foreach>
    </update>
      <delete id="deleteByPrimaryKeyBatch" parameterType="java.util.List">
        DELETE FROM yeshi_ec_home_navbar_user WHERE hnu_id in
        <foreach collection="list" item="item" open="(" close=")"
            separator=",">#{item}</foreach>
    </delete>
    <delete id="deleteByUid">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">
        <id column="hnu_id" property="id" jdbcType="BIGINT"/>
        <result column="hnu_uid" property="uid" jdbcType="BIGINT"/>
        <result column="hnu_device" property="device" jdbcType="VARCHAR"/>
        <result column="hnu_order" property="order" jdbcType="INTEGER"/>
        <result column="hnu_create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <association property="homeNavbar" column="hnu_navbar_id"
                     javaType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">
            <id column="hnu_navbar_id" property="id" jdbcType="BIGINT"/>
        </association>
    </resultMap>
    <resultMap id="WholeResultMap" type="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">
        <id column="hnu_id" property="id" jdbcType="BIGINT"/>
        <result column="hnu_uid" property="uid" jdbcType="BIGINT"/>
        <result column="hnu_device" property="device" jdbcType="VARCHAR"/>
        <result column="hnu_order" property="order" jdbcType="INTEGER"/>
        <result column="hnu_create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <association property="homeNavbar" column="hnu_navbar_id"
                     resultMap="com.yeshi.fanli.dao.mybatis.homemodule.HomeNavbarMapper.BaseResultMap"/>
    </resultMap>
    <sql id="Base_Column_List">hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time</sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List"/>from yeshi_ec_home_navbar_user where hnu_id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey"
            parameterType="java.lang.Long">delete from yeshi_ec_home_navbar_user where hnu_id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser" useGeneratedKeys="true"
            keyProperty="id">insert into yeshi_ec_home_navbar_user (hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{device,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{homeNavbar.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP})</insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser"
            useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar_user
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">hnu_id,</if>
            <if test="uid != null">hnu_uid,</if>
            <if test="device != null">hnu_device,</if>
            <if test="order != null">hnu_order,</if>
            <if test="homeNavbar != null">hnu_navbar_id,</if>
            <if test="createTime != null">hnu_create_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="uid != null">#{uid,jdbcType=BIGINT},</if>
            <if test="device != null">#{device,jdbcType=VARCHAR},</if>
            <if test="order != null">#{order,jdbcType=INTEGER},</if>
            <if test="homeNavbar != null">#{homeNavbar.id,jdbcType=BIGINT},</if>
            <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKey"
            parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">update yeshi_ec_home_navbar_user set hnu_uid = #{uid,jdbcType=BIGINT},hnu_device = #{device,jdbcType=VARCHAR},hnu_order = #{order,jdbcType=INTEGER},hnu_navbar_id = #{homeNavbar.id,jdbcType=BIGINT},hnu_create_time = #{createTime,jdbcType=TIMESTAMP} where hnu_id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbarUser">update
        yeshi_ec_home_navbar_user
        <set>
            <if test="uid != null">hnu_uid=#{uid,jdbcType=BIGINT},</if>
            <if test="device != null">hnu_device=#{device,jdbcType=VARCHAR},</if>
            <if test="order != null">hnu_order=#{order,jdbcType=INTEGER},</if>
            <if test="homeNavbar != null">hnu_navbar_id=#{homeNavbar.id,jdbcType=BIGINT},</if>
            <if test="createTime != null">hnu_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
        </set>
        where hnu_id = #{id,jdbcType=BIGINT}
    </update>
    <!-- 批量插入数据 -->
    <insert id="insertBatch" keyProperty="id" parameterType="java.util.List">
        insert into yeshi_ec_home_navbar_user
        (hnu_id,hnu_uid,hnu_device,hnu_order,hnu_navbar_id,hnu_create_time)
        values
        <foreach collection="list" item="item" separator=",">
            (
            #{item.id,jdbcType=BIGINT},
            #{item.uid,jdbcType=BIGINT},
            #{item.device,jdbcType=VARCHAR},
            #{item.order,jdbcType=INTEGER},
            #{item.homeNavbar.id,jdbcType=BIGINT},
            #{item.createTime,jdbcType=TIMESTAMP}
            )
        </foreach>
    </insert>
    <!-- 批量更新排序 -->
    <update id="updateSelectiveBatch" parameterType="java.util.List">
        update yeshi_ec_home_navbar_user
        <trim prefix="set" suffixOverrides=",">
            <trim prefix="hnu_order=case" suffix="end,">
                <foreach collection="list" item="item" index="index">
                    <if test="item.order !=null">
                        when hnu_id=#{item.id} then #{item.order}
                    </if>
                </foreach>
            </trim>
        </trim>
        where hnu_id in
        <foreach collection="list" index="index" item="item"
                 separator="," open="(" close=")">
            #{item.id,jdbcType=BIGINT}
        </foreach>
    </update>
    <delete id="deleteByPrimaryKeyBatch" parameterType="java.util.List">
        DELETE FROM yeshi_ec_home_navbar_user WHERE hnu_id in
        <foreach collection="list" item="item" open="(" close=")"
                 separator=",">#{item}
        </foreach>
    </delete>
    <delete id="deleteByUid">
        DELETE FROM yeshi_ec_home_navbar_user 
        WHERE hnu_uid = #{uid}
    </delete>
    <delete id="deleteByDevice">
    <delete id="deleteByDevice">
        DELETE FROM yeshi_ec_home_navbar_user 
        WHERE hnu_device = #{device}
    </delete>
  <select id="listEffectiveNavbars" resultMap="WholeResultMap">
     SELECT * FROM yeshi_ec_home_navbar_user u
    LEFT JOIN yeshi_ec_home_navbar h ON u.`hnu_navbar_id` = h.`br_id`
    WHERE h.br_state = 1
          AND IF(h.br_start_time IS NULL,TRUE, h.br_start_time<![CDATA[<=]]> NOW())
          AND IF(h.br_end_time IS NULL,TRUE, h.br_end_time <![CDATA[>=]]> NOW())
        <if test="uid != null"> AND u.`hnu_uid` = #{uid} </if>
        <if test="device != null"> AND u.`hnu_device` = #{device}</if>
    ORDER BY u.`hnu_order`
  </select>
   <select id="listMyNavbars" resultMap="BaseResultMap">
     SELECT * FROM yeshi_ec_home_navbar_user u
    WHERE 1=1
        <if test="uid != null"> AND u.`hnu_uid` = #{uid} </if>
        <if test="device != null"> AND u.`hnu_device` = #{device}</if>
  </select>
    <select id="listEffectiveNavbars" resultMap="WholeResultMap">
        SELECT * FROM yeshi_ec_home_navbar_user u
        LEFT JOIN yeshi_ec_home_navbar h ON u.`hnu_navbar_id` = h.`br_id`
        WHERE h.br_state = 1
        AND IF(h.br_start_time IS NULL,TRUE, h.br_start_time<![CDATA[<=]]> NOW())
        AND IF(h.br_end_time IS NULL,TRUE, h.br_end_time <![CDATA[>=]]> NOW())
        <if test="system!=null">
            AND h.br_system=#{system}
        </if>
        <if test="uid != null">AND u.`hnu_uid` = #{uid}</if>
        <if test="device != null">AND u.`hnu_device` = #{device}</if>
        ORDER BY u.`hnu_order`
    </select>
    <select id="listMyNavbars" resultMap="BaseResultMap">
        SELECT * FROM yeshi_ec_home_navbar_user u
        WHERE 1=1
        <if test="uid != null">AND u.`hnu_uid` = #{uid}</if>
        <if test="device != null">AND u.`hnu_device` = #{device}</if>
    </select>
</mapper>
fanli/src/main/resource/mapping/push/PushInfoMapper.xml
@@ -95,7 +95,7 @@
        <if test="key != null and key !='' ">
            <if test="keyType == 1">AND pi_title like '%#{key}%'</if>
            <if test="keyType == 2">AND pi_content like '%#{key}%'</if>
            <if test="keyType == 3">AND pi_uids like '%#{key}%'</if>
            <if test="keyType == 3">AND pi_uids like '%${key}%'</if>
        </if>
        <if test="state != null">
            AND pi_state = #{state}
@@ -110,7 +110,7 @@
        <if test="key != null and key !='' ">
            <if test="keyType == 1">AND pi_title like '%#{key}%'</if>
            <if test="keyType == 2">AND pi_content like '%#{key}%'</if>
            <if test="keyType == 3">AND pi_uids like '%#{key}%'</if>
            <if test="keyType == 3">AND pi_uids like '%${key}%'</if>
        </if>
        <if test="state != null">
            AND pi_state = #{state}
fanli/src/main/resource/mapping/vipshop/VipShopOrderMapper.xml
@@ -2,118 +2,157 @@
<!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.vipshop.VipShopOrderMapper">
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.vipshop.VipShopOrder">
        <id column="vo_id" property="id" jdbcType="BIGINT" />
        <result column="vo_order_sn" property="orderSn" jdbcType="VARCHAR" />
        <result column="vo_order_status" property="status" jdbcType="INTEGER" />
        <result column="vo_new_customer" property="newCustomer"
            jdbcType="INTEGER" />
        <result column="vo_channel_tag" property="channelTag" jdbcType="VARCHAR" />
        <result column="vo_order_time" property="orderTime" jdbcType="BIGINT" />
        <result column="vo_sign_time" property="signTime" jdbcType="BIGINT" />
        <result column="vo_settled_time" property="settledTime"
            jdbcType="BIGINT" />
        <result column="vo_last_update_time" property="lastUpdateTime"
            jdbcType="BIGINT" />
        <result column="vo_settled" property="settled" jdbcType="INTEGER" />
        <result column="vo_self_buy" property="selfBuy" jdbcType="INTEGER" />
        <result column="vo_order_sub_status_name" property="orderSubStatusName"
            jdbcType="VARCHAR" />
        <result column="vo_commission" property="commission" jdbcType="DECIMAL" />
        <result column="vo_after_sale_change_commission" property="afterSaleChangeCommission"
            jdbcType="VARCHAR" />
        <result column="vo_after_sale_change_goods_count" property="afterSaleChangeGoodsCount"
            jdbcType="INTEGER" />
        <result column="vo_commission_enter_time" property="commissionEnterTime"
            jdbcType="BIGINT" />
        <result column="vo_order_source" property="orderSource"
            jdbcType="VARCHAR" />
        <result column="vo_pid" property="pid" jdbcType="VARCHAR" />
        <result column="vo_is_prepay" property="isPrepay" jdbcType="INTEGER" />
        <result column="vo_b2c_user_id" property="b2cUserId" jdbcType="BIGINT" />
        <result column="vo_create_time" property="createTime" jdbcType="TIMESTAMP" />
        <result column="vo_update_time" property="updateTime" jdbcType="TIMESTAMP" />
    </resultMap>
    <sql id="Base_Column_List">vo_id,vo_order_sn,vo_order_status,vo_new_customer,vo_channel_tag,vo_order_time,vo_sign_time,vo_settled_time,vo_last_update_time,vo_settled,vo_self_buy,vo_order_sub_status_name,vo_commission,vo_after_sale_change_commission,vo_after_sale_change_goods_count,vo_commission_enter_time,vo_order_source,vo_pid,vo_is_prepay,vo_b2c_user_id,vo_create_time,vo_update_time
    <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.vipshop.VipShopOrder">
        <id column="vo_id" property="id" jdbcType="BIGINT"/>
        <result column="vo_order_sn" property="orderSn" jdbcType="VARCHAR"/>
        <result column="vo_order_status" property="status" jdbcType="INTEGER"/>
        <result column="vo_new_customer" property="newCustomer"
                jdbcType="INTEGER"/>
        <result column="vo_channel_tag" property="channelTag" jdbcType="VARCHAR"/>
        <result column="vo_order_time" property="orderTime" jdbcType="BIGINT"/>
        <result column="vo_sign_time" property="signTime" jdbcType="BIGINT"/>
        <result column="vo_settled_time" property="settledTime"
                jdbcType="BIGINT"/>
        <result column="vo_last_update_time" property="lastUpdateTime"
                jdbcType="BIGINT"/>
        <result column="vo_settled" property="settled" jdbcType="INTEGER"/>
        <result column="vo_self_buy" property="selfBuy" jdbcType="INTEGER"/>
        <result column="vo_order_sub_status_name" property="orderSubStatusName"
                jdbcType="VARCHAR"/>
        <result column="vo_commission" property="commission" jdbcType="DECIMAL"/>
        <result column="vo_after_sale_change_commission" property="afterSaleChangeCommission"
                jdbcType="VARCHAR"/>
        <result column="vo_after_sale_change_goods_count" property="afterSaleChangeGoodsCount"
                jdbcType="INTEGER"/>
        <result column="vo_commission_enter_time" property="commissionEnterTime"
                jdbcType="BIGINT"/>
        <result column="vo_order_source" property="orderSource"
                jdbcType="VARCHAR"/>
        <result column="vo_pid" property="pid" jdbcType="VARCHAR"/>
        <result column="vo_is_prepay" property="isPrepay" jdbcType="INTEGER"/>
        <result column="vo_b2c_user_id" property="b2cUserId" jdbcType="BIGINT"/>
        <result column="vo_create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="vo_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
    </resultMap>
    <sql id="Base_Column_List">vo_id,vo_order_sn,vo_order_status,vo_new_customer,vo_channel_tag,vo_order_time,vo_sign_time,vo_settled_time,vo_last_update_time,vo_settled,vo_self_buy,vo_order_sub_status_name,vo_commission,vo_after_sale_change_commission,vo_after_sale_change_goods_count,vo_commission_enter_time,vo_order_source,vo_pid,vo_is_prepay,vo_b2c_user_id,vo_create_time,vo_update_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_vipshop_order where vo_id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByOrderSn" resultMap="BaseResultMap"
        parameterType="java.lang.String">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_vipshop_order where vo_order_sn = #{0}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
            parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List"/>
        from yeshi_ec_vipshop_order where vo_id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByOrderSn" resultMap="BaseResultMap"
            parameterType="java.lang.String">
        select
        <include refid="Base_Column_List"/>
        from yeshi_ec_vipshop_order where vo_order_sn = #{0}
    </select>
    <sql id="listWhere">
        <if test="query.orderSubStatusName!=null">
            and vo_order_sub_status_name=#{query.orderSubStatusName}
        </if>
        <if test="query.minCreateTime!=null">
            and vo_create_time>=#{query.minCreateTime}
        </if>
        <if test="query.maxCreateTime!=null">
            and #{query.maxCreateTime}>vo_create_time
        </if>
    </sql>
    <select id="list" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from yeshi_ec_vipshop_order where 1=1
        <include refid="listWhere"></include>
        <if test="query.sortList!=null">
            <foreach collection="query.sortList" separator="," open=" order by " item="item" close=" ">
                #{item}
            </foreach>
        </if>
        limit #{query.start},#{query.count}
    </select>
    <select id="count" resultType="java.lang.Long">
        select
        count(*)
        from yeshi_ec_vipshop_order where 1=1
        <include refid="listWhere"></include>
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_vipshop_order where vo_id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder"
        useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_vipshop_order
    <insert id="insert" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder"
            useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_vipshop_order
        (vo_id,vo_order_sn,vo_order_status,vo_new_customer,vo_channel_tag,vo_order_time,vo_sign_time,vo_settled_time,vo_last_update_time,vo_settled,vo_self_buy,vo_order_sub_status_name,vo_commission,vo_after_sale_change_commission,vo_after_sale_change_goods_count,vo_commission_enter_time,vo_order_source,vo_pid,vo_is_prepay,vo_b2c_user_id,vo_create_time,vo_update_time)
        values
        (#{id,jdbcType=BIGINT},#{orderSn,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{newCustomer,jdbcType=INTEGER},#{channelTag,jdbcType=VARCHAR},#{orderTime,jdbcType=BIGINT},#{signTime,jdbcType=BIGINT},#{settledTime,jdbcType=BIGINT},#{lastUpdateTime,jdbcType=BIGINT},#{settled,jdbcType=INTEGER},#{selfBuy,jdbcType=INTEGER},#{orderSubStatusName,jdbcType=VARCHAR},#{commission,jdbcType=DECIMAL},#{afterSaleChangeCommission,jdbcType=VARCHAR},#{afterSaleChangeGoodsCount,jdbcType=INTEGER},#{commissionEnterTime,jdbcType=BIGINT},#{orderSource,jdbcType=VARCHAR},#{pid,jdbcType=VARCHAR},#{isPrepay,jdbcType=INTEGER},#{b2cUserId,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_vipshop_order
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">vo_id,</if>
            <if test="orderSn != null">vo_order_sn,</if>
            <if test="status != null">vo_order_status,</if>
            <if test="newCustomer != null">vo_new_customer,</if>
            <if test="channelTag != null">vo_channel_tag,</if>
            <if test="orderTime != null">vo_order_time,</if>
            <if test="signTime != null">vo_sign_time,</if>
            <if test="settledTime != null">vo_settled_time,</if>
            <if test="lastUpdateTime != null">vo_last_update_time,</if>
            <if test="settled != null">vo_settled,</if>
            <if test="selfBuy != null">vo_self_buy,</if>
            <if test="orderSubStatusName != null">vo_order_sub_status_name,</if>
            <if test="commission != null">vo_commission,</if>
            <if test="afterSaleChangeCommission != null">vo_after_sale_change_commission,</if>
            <if test="afterSaleChangeGoodsCount != null">vo_after_sale_change_goods_count,</if>
            <if test="commissionEnterTime != null">vo_commission_enter_time,</if>
            <if test="orderSource != null">vo_order_source,</if>
            <if test="pid != null">vo_pid,</if>
            <if test="isPrepay != null">vo_is_prepay,</if>
            <if test="b2cUserId != null">vo_b2c_user_id,</if>
            <if test="createTime != null">vo_create_time,</if>
            <if test="updateTime != null">vo_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="orderSn != null">#{orderSn,jdbcType=VARCHAR},</if>
            <if test="status != null">#{status,jdbcType=INTEGER},</if>
            <if test="newCustomer != null">#{newCustomer,jdbcType=INTEGER},</if>
            <if test="channelTag != null">#{channelTag,jdbcType=VARCHAR},</if>
            <if test="orderTime != null">#{orderTime,jdbcType=BIGINT},</if>
            <if test="signTime != null">#{signTime,jdbcType=BIGINT},</if>
            <if test="settledTime != null">#{settledTime,jdbcType=BIGINT},</if>
            <if test="lastUpdateTime != null">#{lastUpdateTime,jdbcType=BIGINT},</if>
            <if test="settled != null">#{settled,jdbcType=INTEGER},</if>
            <if test="selfBuy != null">#{selfBuy,jdbcType=INTEGER},</if>
            <if test="orderSubStatusName != null">#{orderSubStatusName,jdbcType=VARCHAR},</if>
            <if test="commission != null">#{commission,jdbcType=DECIMAL},</if>
            <if test="afterSaleChangeCommission != null">#{afterSaleChangeCommission,jdbcType=VARCHAR},</if>
            <if test="afterSaleChangeGoodsCount != null">#{afterSaleChangeGoodsCount,jdbcType=INTEGER},</if>
            <if test="commissionEnterTime != null">#{commissionEnterTime,jdbcType=BIGINT},</if>
            <if test="orderSource != null">#{orderSource,jdbcType=VARCHAR},</if>
            <if test="pid != null">#{pid,jdbcType=VARCHAR},</if>
            <if test="isPrepay != null">#{isPrepay,jdbcType=INTEGER},</if>
            <if test="b2cUserId != null">#{b2cUserId,jdbcType=BIGINT},</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.vipshop.VipShopOrder">update
    <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder"
            useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_vipshop_order
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">vo_id,</if>
            <if test="orderSn != null">vo_order_sn,</if>
            <if test="status != null">vo_order_status,</if>
            <if test="newCustomer != null">vo_new_customer,</if>
            <if test="channelTag != null">vo_channel_tag,</if>
            <if test="orderTime != null">vo_order_time,</if>
            <if test="signTime != null">vo_sign_time,</if>
            <if test="settledTime != null">vo_settled_time,</if>
            <if test="lastUpdateTime != null">vo_last_update_time,</if>
            <if test="settled != null">vo_settled,</if>
            <if test="selfBuy != null">vo_self_buy,</if>
            <if test="orderSubStatusName != null">vo_order_sub_status_name,</if>
            <if test="commission != null">vo_commission,</if>
            <if test="afterSaleChangeCommission != null">vo_after_sale_change_commission,</if>
            <if test="afterSaleChangeGoodsCount != null">vo_after_sale_change_goods_count,</if>
            <if test="commissionEnterTime != null">vo_commission_enter_time,</if>
            <if test="orderSource != null">vo_order_source,</if>
            <if test="pid != null">vo_pid,</if>
            <if test="isPrepay != null">vo_is_prepay,</if>
            <if test="b2cUserId != null">vo_b2c_user_id,</if>
            <if test="createTime != null">vo_create_time,</if>
            <if test="updateTime != null">vo_update_time,</if>
        </trim>
        values
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="orderSn != null">#{orderSn,jdbcType=VARCHAR},</if>
            <if test="status != null">#{status,jdbcType=INTEGER},</if>
            <if test="newCustomer != null">#{newCustomer,jdbcType=INTEGER},</if>
            <if test="channelTag != null">#{channelTag,jdbcType=VARCHAR},</if>
            <if test="orderTime != null">#{orderTime,jdbcType=BIGINT},</if>
            <if test="signTime != null">#{signTime,jdbcType=BIGINT},</if>
            <if test="settledTime != null">#{settledTime,jdbcType=BIGINT},</if>
            <if test="lastUpdateTime != null">#{lastUpdateTime,jdbcType=BIGINT},</if>
            <if test="settled != null">#{settled,jdbcType=INTEGER},</if>
            <if test="selfBuy != null">#{selfBuy,jdbcType=INTEGER},</if>
            <if test="orderSubStatusName != null">#{orderSubStatusName,jdbcType=VARCHAR},</if>
            <if test="commission != null">#{commission,jdbcType=DECIMAL},</if>
            <if test="afterSaleChangeCommission != null">#{afterSaleChangeCommission,jdbcType=VARCHAR},</if>
            <if test="afterSaleChangeGoodsCount != null">#{afterSaleChangeGoodsCount,jdbcType=INTEGER},</if>
            <if test="commissionEnterTime != null">#{commissionEnterTime,jdbcType=BIGINT},</if>
            <if test="orderSource != null">#{orderSource,jdbcType=VARCHAR},</if>
            <if test="pid != null">#{pid,jdbcType=VARCHAR},</if>
            <if test="isPrepay != null">#{isPrepay,jdbcType=INTEGER},</if>
            <if test="b2cUserId != null">#{b2cUserId,jdbcType=BIGINT},</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.vipshop.VipShopOrder">update
        yeshi_ec_vipshop_order set vo_order_sn =
        #{orderSn,jdbcType=VARCHAR},vo_order_status =
        #{status,jdbcType=INTEGER},vo_new_customer =
@@ -138,36 +177,38 @@
        #{createTime,jdbcType=TIMESTAMP},vo_update_time =
        #{updateTime,jdbcType=TIMESTAMP} where vo_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder">
        update yeshi_ec_vipshop_order
        <set>
            <if test="orderSn != null">vo_order_sn=#{orderSn,jdbcType=VARCHAR},</if>
            <if test="status != null">vo_order_status=#{status,jdbcType=INTEGER},</if>
            <if test="newCustomer != null">vo_new_customer=#{newCustomer,jdbcType=INTEGER},</if>
            <if test="channelTag != null">vo_channel_tag=#{channelTag,jdbcType=VARCHAR},</if>
            <if test="orderTime != null">vo_order_time=#{orderTime,jdbcType=BIGINT},</if>
            <if test="signTime != null">vo_sign_time=#{signTime,jdbcType=BIGINT},</if>
            <if test="settledTime != null">vo_settled_time=#{settledTime,jdbcType=BIGINT},</if>
            <if test="lastUpdateTime != null">vo_last_update_time=#{lastUpdateTime,jdbcType=BIGINT},
            </if>
            <if test="settled != null">vo_settled=#{settled,jdbcType=INTEGER},</if>
            <if test="selfBuy != null">vo_self_buy=#{selfBuy,jdbcType=INTEGER},</if>
            <if test="orderSubStatusName != null">vo_order_sub_status_name=#{orderSubStatusName,jdbcType=VARCHAR},
            </if>
            <if test="commission != null">vo_commission=#{commission,jdbcType=DECIMAL},</if>
            <if test="afterSaleChangeCommission != null">vo_after_sale_change_commission=#{afterSaleChangeCommission,jdbcType=VARCHAR},
            </if>
            <if test="afterSaleChangeGoodsCount != null">vo_after_sale_change_goods_count=#{afterSaleChangeGoodsCount,jdbcType=INTEGER},
            </if>
            <if test="commissionEnterTime != null">vo_commission_enter_time=#{commissionEnterTime,jdbcType=BIGINT},
            </if>
            <if test="orderSource != null">vo_order_source=#{orderSource,jdbcType=VARCHAR},</if>
            <if test="pid != null">vo_pid=#{pid,jdbcType=VARCHAR},</if>
            <if test="isPrepay != null">vo_is_prepay=#{isPrepay,jdbcType=INTEGER},</if>
            <if test="b2cUserId != null">vo_b2c_user_id=#{b2cUserId,jdbcType=BIGINT},</if>
            <if test="createTime != null">vo_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">vo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where vo_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.vipshop.VipShopOrder">
        update yeshi_ec_vipshop_order
        <set>
            <if test="orderSn != null">vo_order_sn=#{orderSn,jdbcType=VARCHAR},</if>
            <if test="status != null">vo_order_status=#{status,jdbcType=INTEGER},</if>
            <if test="newCustomer != null">vo_new_customer=#{newCustomer,jdbcType=INTEGER},</if>
            <if test="channelTag != null">vo_channel_tag=#{channelTag,jdbcType=VARCHAR},</if>
            <if test="orderTime != null">vo_order_time=#{orderTime,jdbcType=BIGINT},</if>
            <if test="signTime != null">vo_sign_time=#{signTime,jdbcType=BIGINT},</if>
            <if test="settledTime != null">vo_settled_time=#{settledTime,jdbcType=BIGINT},</if>
            <if test="lastUpdateTime != null">vo_last_update_time=#{lastUpdateTime,jdbcType=BIGINT},
            </if>
            <if test="settled != null">vo_settled=#{settled,jdbcType=INTEGER},</if>
            <if test="selfBuy != null">vo_self_buy=#{selfBuy,jdbcType=INTEGER},</if>
            <if test="orderSubStatusName != null">vo_order_sub_status_name=#{orderSubStatusName,jdbcType=VARCHAR},
            </if>
            <if test="commission != null">vo_commission=#{commission,jdbcType=DECIMAL},</if>
            <if test="afterSaleChangeCommission != null">
                vo_after_sale_change_commission=#{afterSaleChangeCommission,jdbcType=VARCHAR},
            </if>
            <if test="afterSaleChangeGoodsCount != null">
                vo_after_sale_change_goods_count=#{afterSaleChangeGoodsCount,jdbcType=INTEGER},
            </if>
            <if test="commissionEnterTime != null">vo_commission_enter_time=#{commissionEnterTime,jdbcType=BIGINT},
            </if>
            <if test="orderSource != null">vo_order_source=#{orderSource,jdbcType=VARCHAR},</if>
            <if test="pid != null">vo_pid=#{pid,jdbcType=VARCHAR},</if>
            <if test="isPrepay != null">vo_is_prepay=#{isPrepay,jdbcType=INTEGER},</if>
            <if test="b2cUserId != null">vo_b2c_user_id=#{b2cUserId,jdbcType=BIGINT},</if>
            <if test="createTime != null">vo_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
            <if test="updateTime != null">vo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
        </set>
        where vo_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>