From 271ae63c20fcbe28d29c47f1881138ff6551a2a1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 10 六月 2020 19:26:26 +0800 Subject: [PATCH] 唯品会订单bug修复,APP端佣金比例展示错误bug修复 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java | 50 ++++++++++++++++++++++++-------------------------- 1 files changed, 24 insertions(+), 26 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java index 35571e3..c141cb0 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java @@ -14,6 +14,7 @@ import org.yeshi.utils.encrypt.DESUtil; import com.alipay.api.AlipayApiException; +import com.google.gson.Gson; import com.yeshi.fanli.dto.wx.WXAccountInfoDTO; import com.yeshi.fanli.entity.accept.AcceptData; import com.yeshi.fanli.entity.bus.user.BindingAccount; @@ -69,6 +70,7 @@ import com.yeshi.fanli.util.RedisManager; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.ThreadUtil; +import com.yeshi.fanli.util.VersionUtil; import com.yeshi.fanli.util.account.UserUtil; import com.yeshi.fanli.util.wx.WXLoginUtil; @@ -174,7 +176,6 @@ @Resource private DeviceActiveService deviceActiveService; - /** * * @param acceptData @@ -192,6 +193,13 @@ public void login(AcceptData acceptData, String code, String vcode, String phone, boolean wxinstall, String tbOpenid, String tbNickName, String tbPortrait, String tbSession, int loginType, Boolean first, HttpSession session, HttpServletRequest request, PrintWriter out) { + + // 2.0浠ヤ笅鐗堟湰涓嶅厑璁哥櫥褰� + if (!VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion())) { + out.print("璇峰崌绾у埌鏈�鏂扮増鏈�"); + return; + } + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); if (system == null) { @@ -259,14 +267,6 @@ ThreadUtil.run(new Runnable() { public void run() { try { - int platformType = 0; - String platform = acceptData.getPlatform(); - if ("android".equals(platform)) { - platformType = 1; - } else if ("ios".equals(platform)) { - platformType = 2; - } - userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType, acceptData.getDevice()); // 缁戝畾oppo,vivo鎺ㄩ�� DeviceActive active = deviceActiveService.getFirstActiveInfo(acceptData.getDevice()); if (active != null) { @@ -282,7 +282,7 @@ } catch (UserAccountException e) { try { - LogHelper.cookieLog("鐧诲綍鍑洪敊:" + e.getCode() + "-" + e.getMessage()); + LogHelper.error("鐧诲綍鍑洪敊:" + e.getCode() + "-" + e.getMessage()); } catch (Exception e1) { e1.printStackTrace(); } @@ -306,6 +306,12 @@ @RequestMapping(value = "register") public void register(AcceptData acceptData, String tbOpenid, String tbNickName, String tbPortrait, String vcode, String phone, HttpServletRequest request, HttpSession session, PrintWriter out) { + // 2.0浠ヤ笅鐗堟湰涓嶅厑璁哥櫥褰� + if (!VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion())) { + out.print("璇峰崌绾у埌鏈�鏂扮増鏈�"); + return; + } + BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); if (system == null) { @@ -355,7 +361,6 @@ out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg())); } } - /** * 鑾峰彇鐢ㄦ埛ID @@ -945,6 +950,7 @@ userInfoModifyRecordService.addModifyRecord(uid, ModifyTypeEnum.bindAlipay, account); } catch (AlipayTransferException e1) { + LogHelper.error("鏀粯瀹濋獙璇佸嚭閿�:"+new Gson().toJson(e1)); if (e1.getSubCode().equalsIgnoreCase("PAYEE_NOT_EXIST")) { String msg = "绯荤粺鏈兘鎴愬姛杞处0.1鍏冿紝鎻愮幇璐﹀彿淇℃伅鏈夎锛岃鏍稿鍚庨噸鏂板~鍐欍��"; out.print(JsonUtil.loadFalseResult(1, msg)); @@ -1145,6 +1151,12 @@ public void loginNew(AcceptData acceptData, String vcode, String phone, String code, int loginType, HttpServletRequest request, PrintWriter out) { + // 2.0浠ヤ笅鐗堟湰涓嶅厑璁哥櫥褰� + if (!VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion())) { + out.print("璇峰崌绾у埌鏈�鏂扮増鏈�"); + return; + } + try { BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages()); @@ -1182,20 +1194,6 @@ LogHelper.errorDetailInfo(e); } - /* 鍚屾鏈櫥褰曚箣鍓嶈澶囨娊濂栨暟鎹� */ - try { - int platformType = 0; - String platform = acceptData.getPlatform(); - if ("android".equals(platform)) { - platformType = 1; - } else if ("ios".equals(platform)) { - platformType = 2; - } - userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType, device); - } catch (Exception e) { - e.printStackTrace(); - } - // 缁戝畾oppo鎺ㄩ�� DeviceActive active = deviceActiveService.getFirstActiveInfo(acceptData.getDevice()); if (active != null) { @@ -1210,7 +1208,7 @@ } catch (UserAccountException e) { out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg())); try { - LogHelper.cookieLog("鐧诲綍鍑洪敊:" + e.getCode() + "-" + e.getMessage()); + LogHelper.error("鐧诲綍鍑洪敊:" + e.getCode() + "-" + e.getMessage()); } catch (Exception e1) { e1.printStackTrace(); } -- Gitblit v1.8.0