fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ShareController.java
@@ -1099,7 +1099,10 @@ continue; } } commentTexts.add(arr.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[邀请码]", inviteCode).replace("[淘口令]", data.optString("token"))); if(StringUtil.isNullOrEmpty(inviteCode)) commentTexts.add(arr.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[淘口令]", data.optString("token"))); else commentTexts.add(arr.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[邀请码]", inviteCode).replace("[淘口令]", data.optString("token"))); } } data.put("commentTexts", commentTexts); fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java
@@ -187,13 +187,7 @@ } String orderFindUrl = null; // 判断是否需要显示订单找回提示 if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) if (state ==null && page == 1) { if (redisManager.frequencyLimit("orderlist-" + acceptData.getDevice(), 8, 4)) {// 8秒内请求3次触发 orderFindUrl = configService.get("order_find_notify_url"); } } try { long count = 0; @@ -238,6 +232,14 @@ if (todayMoney == null) { todayMoney = new BigDecimal(0.00); } // 判断是否需要显示订单找回提示 if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) if (state ==null && page == 1) { if (redisManager.frequencyLimit("orderlist-" + acceptData.getDevice(), 8, 4)||count==0L) {// 8秒内请求3次触发 orderFindUrl = configService.get("order_find_notify_url"); } } JSONObject data = new JSONObject(); data.put("count", count); fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -241,10 +241,10 @@ HttpServletRequest request, PrintWriter out) { UserExtraTaoBaoInfo extraInfo = userExtraTaoBaoInfoService.getByUid(uid); UserInfoExtra userExtraInfo = userInfoExtraService.getUserInfoExtra(uid); String inviteCode=null; if(userExtraInfo!=null) inviteCode=userExtraInfo.getInviteCode(); String inviteCode = null; if (userExtraInfo != null) inviteCode = userExtraInfo.getInviteCode(); String relationId = null; if (extraInfo != null && extraInfo.getRelationId() != null && extraInfo.getRelationValid() != null && extraInfo.getRelationValid() == true) @@ -263,12 +263,8 @@ try { ShareInfoVO shareInfo = new ShareInfoVO(); // 测试 TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(uid, goodsId, relationId); @@ -285,27 +281,26 @@ shareInfo.setToken(TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken())); shareInfo.setRule(configService.get("share_single_goods_rule")); shareInfo.setPictUrl(TbImgUtil.getTBSizeImg(taoBaoLink.getGoods().getPictUrl(), 500)); String commentTextStr= configService.get("share_single_goods_comment_text"); String commentTextStr = configService.get("share_single_goods_comment_text"); List<String> commentTexts = new ArrayList<>(); if(!StringUtil.isNullOrEmpty(commentTextStr)) { JSONArray array= JSONArray.fromObject(commentTextStr); for(int i=0;i<array.size();i++) { if(StringUtil.isNullOrEmpty(inviteCode)) { if(array.optString(i).contains("[邀请码]")) { if (!StringUtil.isNullOrEmpty(commentTextStr)) { JSONArray array = JSONArray.fromObject(commentTextStr); for (int i = 0; i < array.size(); i++) { if (StringUtil.isNullOrEmpty(inviteCode)) { if (array.optString(i).contains("[邀请码]")) { continue; } } commentTexts.add(array.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK).replace("[邀请码]", inviteCode).replace("[淘口令]", shareInfo.getToken())); if (StringUtil.isNullOrEmpty(inviteCode)) commentTexts.add(array.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK) .replace("[淘口令]", shareInfo.getToken())); else commentTexts.add(array.optString(i).replace("[下载链接]", Constant.YINGYONGBAO_LINK) .replace("[邀请码]", inviteCode).replace("[淘口令]", shareInfo.getToken())); } } shareInfo.setCommentTexts(commentTexts); String shareText = ""; // 无券 fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java
@@ -37,8 +37,8 @@ */ public void saveJDOrders(List<JDOrder> jdOrderList) { for (JDOrder order : jdOrderList) { LogHelper.orderInfo("京东订单:" + order.getOrderId()); if (order.getValidCode() == 15)// 过滤掉代付款状态 LogHelper.orderInfo("京东订单:" + order.getOrderId()+"-"+order.getValidCode()); if (order.getValidCode() == 15)// 过滤掉待付款 continue; try { jdOrderService.addJDOrder(order); fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -1061,8 +1061,8 @@ commonOrder.getTradeId(), new Date(), commonOrder.getSourceType())); return new CommonOrderAddResultDTO(commonOrder, CommonOrderAddResultDTO.TYPE_ADD); } else {// 修改 // 已经结算,已经失效,状态未改变的订单不处理 if (oldCommonOrder.getState() == CommonOrder.STATE_JS || oldCommonOrder.getState() == CommonOrder.STATE_SX // 非京东已经结算,已经失效,状态未改变的订单不处理 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())) { return new CommonOrderAddResultDTO(oldCommonOrder, CommonOrderAddResultDTO.TYPE_NOUPDATE); fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java
@@ -735,7 +735,6 @@ public void processJDOrder(JDOrder order) { if (order == null || order.getOrderItemList() == null || order.getOrderItemList().size() == 0) return; // 拆单的不做处理 if (order.getValidCode() == 2) return; utils/src/main/java/org/yeshi/utils/wx/WXPayUtil.java
@@ -26,9 +26,8 @@ * */ public class WXPayUtil { private static String post(String url,String entity) { private static String post(String url, String entity) { HttpClient client = new HttpClient(); PostMethod method = new PostMethod(url); method.setRequestBody(entity); @@ -221,10 +220,10 @@ String entity = WXUtil.loadWXMessage(map); String result = post("https://api.mch.weixin.qq.com/pay/unifiedorder", entity); String result = HttpUtil.post("https://api.mch.weixin.qq.com/pay/unifiedorder", entity); try { System.out.println("统一下单结果:" + new String(result.getBytes("GBK"), "UTF-8")); } catch (UnsupportedEncodingException e) { } catch (Exception e) { e.printStackTrace(); } Map<String, String> resultMap = WXUtil.parseXML(result);