From 457f4881a89c03984c7b46ed10e8919d3294976c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 08 六月 2020 16:45:29 +0800 Subject: [PATCH] 淘宝好物圈修改 --- fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java | 2 +- fanli/src/main/java/com/yeshi/fanli/controller/CallBackController.java | 37 +++++++------------------------------ fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java | 2 +- 3 files changed, 9 insertions(+), 32 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/CallBackController.java b/fanli/src/main/java/com/yeshi/fanli/controller/CallBackController.java index 225f845..cbeaabb 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/CallBackController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/CallBackController.java @@ -94,7 +94,7 @@ @Resource private HongBaoManageService hongBaoManageService; - + @Resource private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService; @@ -194,8 +194,6 @@ public void VIP(PrintWriter out) { out.print("success"); } - - /** * 鏀粯瀹濇敮浠樺洖璋� @@ -260,33 +258,12 @@ // return; // } String contentDecode = ""; - if (request instanceof MultipartHttpServletRequest) { - MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; - List<MultipartFile> files = multipartRequest.getFiles("file"); - try { - InputStream input = files.get(0).getInputStream(); - InputStreamReader reader = new InputStreamReader(input, "UTF-16LE"); - int d = -1; - String st = ""; - while ((d = reader.read()) != -1) { - st += ((char) d); - } - System.out.println(st); - contentDecode = st; - contentDecode = contentDecode.substring(contentDecode.indexOf("(") +1, - contentDecode.length()).trim(); - if (contentDecode.endsWith(")")) - contentDecode = contentDecode.substring(0, contentDecode.length() - 1); + contentDecode = content.substring(content.indexOf("(") + 1, content.length()).trim(); + if (contentDecode.endsWith(")")) + contentDecode = contentDecode.substring(0, contentDecode.length() - 1); - System.out.println(contentDecode); - - reader.close(); - - } catch (IOException e) { - e.printStackTrace(); - } - } + System.out.println(contentDecode); JSONObject data = JSONObject.fromObject(contentDecode).optJSONObject("data"); @@ -337,7 +314,7 @@ } else { imgInfo.setType(ImgEnum.goods); SimpleGoods simpleGoods = new SimpleGoods(); - simpleGoods.setGoodsId(itemId+""); + simpleGoods.setGoodsId(itemId + ""); simpleGoods.setGoodsType(Constant.SOURCE_TYPE_TAOBAO); simpleGoods.setState(CommonGoods.STATE_NORMAL); CouponInfoVO couponInfo = goodsVO.getCouponInfo(); @@ -357,7 +334,7 @@ ActivityUser user = ruleList.get((int) (ruleList.size() * Math.random())).getActivityUser(); try { - goodsEvaluateService.addGoodsEvaluate(itemId+"", imageList, user, doc, null, null); + goodsEvaluateService.addGoodsEvaluate(itemId + "", imageList, user, doc, null, null); } catch (GoodsEvaluateException e) { e.printStackTrace(); } diff --git a/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java b/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java index 9eaa34f..0a86614 100644 --- a/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java +++ b/fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java @@ -85,7 +85,7 @@ saveJDOrders(result.getOrderList()); } else if ("1hour".equalsIgnoreCase(param)) {// 鏇存柊1灏忔椂鍐呯殑璁㈠崟 updateUpdateOrder(); - } else if ("1day".equalsIgnoreCase(param)) {// 鏇存柊1灏忔椂鍐呯殑璁㈠崟 + } else if ("1day".equalsIgnoreCase(param)) {// 鏇存柊1澶╁唴鐨勮鍗� updateLatestDayOrder(new Date(System.currentTimeMillis())); } else if ("3day".equalsIgnoreCase(param)) {// 鏇存柊鏈�杩�3澶╂洿鏂扮殑鏁版嵁 updateLatest3DayOrder(); diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java index 10f777c..c885b78 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java @@ -340,7 +340,7 @@ UserSystemCoupon userSystemCoupon = null; try { - userSystemCoupon = userSystemCouponService.freeCouponWin(giveUid, CouponTypeEnum.freeCoupon, + userSystemCoupon = userSystemCouponService.freeCouponWin(uid, CouponTypeEnum.freeCoupon, UserSystemCoupon.SOURCE_GIVE, 1, true); } catch (Exception e) { LogHelper.errorDetailInfo(e); -- Gitblit v1.8.0