admin
2019-12-11 8b3371befea773bda4e08b19189c25c32ea6818f
订单维权修改,通用模板修改
7个文件已修改
97 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/UserMoneyMsgNotificationServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/manger/HongBaoV2AddManager.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/dataoke/DaTaoKeApiUtil.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/push_msg.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java
@@ -205,35 +205,36 @@
        DaTaoKeGoodsResult result = null;
        if ("-1".equalsIgnoreCase(cid)) {
            result = DaTaoKeApiUtil.search("", null, null, new BigDecimal("10"), page, pageSize,
            result = DaTaoKeApiUtil.getGoodsList("", null, null, new BigDecimal("10"), null, page, pageSize,
                    DaTaoKeApiUtil.SORT_DEFAULT);
            if (result == null || result.getGoodsList() == null || result.getGoodsList().size() == 0) {
                result = new DaTaoKeGoodsResult();
                result.setGoodsList(daTaoKeGoodsDetailV2Service.listByMaxPrice(null,
                        new BigDecimal("10"),null, page, pageSize));
                result.setTotalCount(
                        daTaoKeGoodsDetailV2Service.countByMaxPrice(null, new BigDecimal("10")));
                result.setGoodsList(
                        daTaoKeGoodsDetailV2Service.listByMaxPrice(null, new BigDecimal("10"), null, page, pageSize));
                result.setTotalCount(daTaoKeGoodsDetailV2Service.countByMaxPrice(null, new BigDecimal("10")));
            }
        } else if ("0".equalsIgnoreCase(cid)) {
            result = DaTaoKeApiUtil.search("", null, null, new BigDecimal("10"), page, pageSize,
            result = DaTaoKeApiUtil.getGoodsList("", null, null, new BigDecimal("10"), null, page, pageSize,
                    DaTaoKeApiUtil.SORT_CREATETIME);
            if (result == null || result.getGoodsList() == null || result.getGoodsList().size() == 0) {
                result = new DaTaoKeGoodsResult();
                result.setGoodsList(daTaoKeGoodsDetailV2Service.listByMaxPrice(null,
                        new BigDecimal("10"),"createTime", page, pageSize));
                result.setTotalCount(
                        daTaoKeGoodsDetailV2Service.countByMaxPrice(null, new BigDecimal("10")));
                result.setGoodsList(daTaoKeGoodsDetailV2Service.listByMaxPrice(null, new BigDecimal("10"), "createTime",
                        page, pageSize));
                result.setTotalCount(daTaoKeGoodsDetailV2Service.countByMaxPrice(null, new BigDecimal("10")));
            }
        } else {
            List<Integer> cidList = new ArrayList<>();
            cidList.add(Integer.parseInt(cid));
            result = DaTaoKeApiUtil.search("", cidList, null, new BigDecimal("10"), page, pageSize,
                    DaTaoKeApiUtil.SORT_DEFAULT);
            result =
                    DaTaoKeApiUtil.getGoodsList("", cidList, null, new BigDecimal("10"), null, page, pageSize,
                            DaTaoKeApiUtil.SORT_DEFAULT);
            if (result == null || result.getGoodsList() == null || result.getGoodsList().size() == 0) {
                result = new DaTaoKeGoodsResult();
                result.setGoodsList(daTaoKeGoodsDetailV2Service.listByMaxPrice(Integer.parseInt(cid),
                        new BigDecimal("10"),null, page, pageSize));
                        new BigDecimal("10"), null, page, pageSize));
                result.setTotalCount(
                        daTaoKeGoodsDetailV2Service.countByMaxPrice(Integer.parseInt(cid), new BigDecimal("10")));
            }
@@ -390,7 +391,7 @@
        List<Integer> cidList = new ArrayList<>();
        cidList.add(4);// 居家生活
        int sort = getCommonSort(cid);
        result = DaTaoKeApiUtil.search("", cidList, null, null, page, pageSize, sort);
        result = DaTaoKeApiUtil.getGoodsList("", cidList, null, null, null, page, pageSize, sort);
        List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
        long count = 0;
        if (result != null) {
@@ -415,7 +416,7 @@
        List<Integer> cidList = new ArrayList<>();
        cidList.add(6);// 美食
        int sort = getCommonSort(cid);
        result = DaTaoKeApiUtil.search("", cidList, null, null, page, pageSize, sort);
        result = DaTaoKeApiUtil.getGoodsList("", cidList, null, null, null, page, pageSize, sort);
        List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
        long count = 0;
        if (result != null) {
@@ -464,7 +465,9 @@
        if ("1".equalsIgnoreCase(cid)) {// 大淘客数据
            List<Integer> cidList = new ArrayList<>();
            cidList.add(2);// 母婴
            result = DaTaoKeApiUtil.search("", cidList, null, null, page, pageSize, DaTaoKeApiUtil.SORT_DEFAULT);
            result = DaTaoKeApiUtil.getGoodsList("", cidList, null, null, null, page, pageSize,
                    DaTaoKeApiUtil.SORT_DEFAULT);
            List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
            long count = 0;
            if (result != null) {
@@ -512,7 +515,8 @@
        List<Integer> cidList = new ArrayList<>();
        cidList.add(1);// 女装
        int sort = getCommonSort(cid);
        result = DaTaoKeApiUtil.search("", cidList, null, null, page, pageSize, sort);
        result = DaTaoKeApiUtil.getGoodsList("", cidList, null, null, null, page, pageSize, sort);
        List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
        long count = 0;
        if (result != null) {
@@ -672,7 +676,7 @@
        cidList.add(7);
        cidList.add(13);
        int sort = getCommonSort(cid);
        result = DaTaoKeApiUtil.search("", cidList, null, null, page, pageSize, sort);
        result = DaTaoKeApiUtil.getGoodsList("", cidList, null, null, null, page, pageSize, sort);
        DaTaoKeGoodsResult result1 = DaTaoKeApiUtil.search("运动 男", cidList, null, null, page, pageSize, sort);
        List<TaoBaoGoodsBrief> goodsList = new ArrayList<>();
        long count = 0;
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/UserMoneyMsgNotificationServiceImpl.java
@@ -119,7 +119,7 @@
    public void fanliOrderReceived(Long uid, String orderId, int orderType, int goodsCount, BigDecimal money,
            BigDecimal balance) {
        MsgMoneyDetail detail = MsgMoneyDetailFactory.createFailiMsg(money, balance, orderId, orderType, goodsCount,
                uid, null);
                uid, "若需再返请使用返利奖励券");
        try {
            msgMoneyDetailService.addMsgMoneyDetail(detail);
        } catch (MsgMoneyDetailException e) {
fanli/src/main/java/com/yeshi/fanli/service/manger/HongBaoV2AddManager.java
@@ -457,7 +457,7 @@
        return true;
    }
    @Transactional
    @Transactional(rollbackFor = Exception.class)
    private void saveHongBao(CommonOrder commonOrder, int type, boolean vip, Map<Integer, HongBaoOrder> notificationMap)
            throws HongBaoException, UserAccountException {
        if (type == HongBaoV2.TYPE_ZIGOU) {// 获取自购的返利比例
@@ -543,7 +543,7 @@
            if (shareRate.compareTo(new BigDecimal(0)) <= 0)
                return;
            HongBaoV2 hongBao = createShareHongBao(commonOrder, shareRate,vip);
            HongBaoV2 hongBao = createShareHongBao(commonOrder, shareRate, vip);
            if (hongBao == null)
                return;
            addFanLiOrShareHongBao(hongBao, commonOrder, notificationMap);
fanli/src/main/java/com/yeshi/fanli/util/dataoke/DaTaoKeApiUtil.java
@@ -360,7 +360,7 @@
        }
        return null;
    }
    public static DaTaoKeDetailV2 getGoodsDetailByGoodsId(Long goodsId) {
        TaoKeAppInfo app = getRandomApp();
        Map<String, String> params = new TreeMap<>();
@@ -417,11 +417,11 @@
            cids = cids.substring(0, cids.length() - 1);
        if (!StringUtil.isNullOrEmpty(cids))
            params.put("cids", cids);
        if (StringUtil.isNullOrEmpty(key))
            key = "";
        params.put("keyWords", key);
        if (sort != null)
            params.put("sort", sort + "");
        params.put("sign", getSign(params, app.getAppSecret()));
@@ -440,8 +440,7 @@
        }
        return daTaoKeGoodsResult;
    }
    public static DaTaoKeGoodsResult search(String key, List<Integer> cidList, BigDecimal priceLowerLimit,
            BigDecimal priceUpperLimit, Integer couponPriceLowerLimit, int page, int pageSize, Integer sort) {
@@ -456,10 +455,10 @@
            params.put("priceLowerLimit", priceLowerLimit + "");
        if (priceUpperLimit != null)
            params.put("priceUpperLimit", priceUpperLimit + "");
        if (couponPriceLowerLimit != null)
            params.put("couponPriceLowerLimit", couponPriceLowerLimit + "");
        String cids = "";
        if (cidList != null && cidList.size() > 0)
            for (Integer cid : cidList) {
@@ -470,11 +469,11 @@
            cids = cids.substring(0, cids.length() - 1);
        if (!StringUtil.isNullOrEmpty(cids))
            params.put("cids", cids);
        if (StringUtil.isNullOrEmpty(key))
            key = "%";
        params.put("keyWords", key);
        if (sort != null)
            params.put("sort", sort + "");
        params.put("sign", getSign(params, app.getAppSecret()));
@@ -496,6 +495,7 @@
    /**
     * 商品列表
     *
     * @param key
     * @param cidList
     * @param priceLowerLimit
@@ -515,18 +515,27 @@
        params.put("appKey", app.getAppKey());
        params.put("pageSize", pageSize + "");
        params.put("pageId", pageId + "");
        if (priceLowerLimit != null)
            params.put("priceLowerLimit", priceLowerLimit + "");
        if (priceUpperLimit != null)
            params.put("priceUpperLimit", priceUpperLimit + "");
        if (couponPriceLowerLimit != null)
            params.put("couponPriceLowerLimit", couponPriceLowerLimit + "");
        if (sort != null)
            params.put("sort", sort +"");
            params.put("sort", sort + "");
        if (cidList != null && cidList.size() > 0) {
            String cids = "";
            for (int cid : cidList)
                cids += cid + ",";
            cids = cids.endsWith(",") ? cids.substring(0, cids.length() - 1) : cids;
            params.put("cids", cids + "");
        }
        params.put("sign", getSign(params, app.getAppSecret()));
        String result = HttpUtil.get("https://openapi.dataoke.com/api/goods/get-goods-list", params, new HashMap<>());
        JSONObject json = JSONObject.fromObject(result);
fanli/src/main/java/com/yeshi/fanli/util/factory/UserMoneyDetailFactory.java
@@ -203,7 +203,7 @@
                .Md5(UserMoneyDetailTypeEnum.fanliWeiQuan.name() + "-" + uid + "-" + drawBack.getOrderItemId()));
        detail.setMoney(new BigDecimal("0").subtract(money));
        detail.setTitle(UserMoneyDetailTypeEnum.fanliWeiQuan.getDesc());
        detail.setSubTitle("订单维权");
        detail.setSubTitle("订单售后");
        detail.setType(UserMoneyDetailTypeEnum.fanliWeiQuan);
        detail.setSourceIdentifyId(drawBack.getId());
        detail.setDescInfo("订单号:" + drawBack.getOrderId());
@@ -243,7 +243,7 @@
                .Md5(UserMoneyDetailTypeEnum.shareWeiQuan.name() + "-" + uid + "-" + drawBack.getOrderItemId()));
        detail.setMoney(new BigDecimal("0").subtract(money));
        detail.setTitle(UserMoneyDetailTypeEnum.shareWeiQuan.getDesc());
        detail.setSubTitle("订单维权");
        detail.setSubTitle("订单售后");
        detail.setType(UserMoneyDetailTypeEnum.shareWeiQuan);
        detail.setSourceIdentifyId(drawBack.getId());
        detail.setDescInfo("订单号:" + UserUtil.filterOrderId(drawBack.getOrderId()));
@@ -283,7 +283,7 @@
                .Md5(UserMoneyDetailTypeEnum.inviteWeiQuan.name() + "-" + uid + "-" + drawBack.getOrderItemId()));
        detail.setMoney(new BigDecimal("0").subtract(money));
        detail.setTitle(UserMoneyDetailTypeEnum.inviteWeiQuan.getDesc());
        detail.setSubTitle("订单维权");
        detail.setSubTitle("订单售后");
        detail.setType(UserMoneyDetailTypeEnum.inviteWeiQuan);
        detail.setSourceIdentifyId(drawBack.getId());
        detail.setDescInfo("订单号:" + UserUtil.filterOrderId(drawBack.getOrderId()));
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -411,7 +411,7 @@
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("返利订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单维权", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
@@ -440,7 +440,7 @@
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单维权", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
@@ -470,7 +470,7 @@
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请订单", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("订单维权", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO("订单售后", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("扣除说明", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
fanli/src/main/resource/push_msg.properties
@@ -18,7 +18,7 @@
#返利到账
money_fanli_recieved_title=返利到账
money_fanli_recieved_msg=[订单类型]订单[订单号],返利[金额]元,已存入到你的账户余额中,请注意查收。
money_fanli_recieved_msg=[订单类型]订单[订单号],返利[金额]元,已存入到你的账户余额中,需再返请使用返利奖励券。
#分享奖金到账
money_share_recieved_title=分享奖金到账