From c5410b7f48a774e4ecd50019b46bc9173f2483ae Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 08 五月 2019 11:33:37 +0800 Subject: [PATCH] 转大淘客为普通商品详情 --- fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java | 67 +++++++++++++++++---------------- 1 files changed, 34 insertions(+), 33 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java index 276d485..6c1f6b1 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java @@ -202,7 +202,6 @@ @Resource private AccountMessageService accountMessageService; - private static final String PASSWORD_MAX_ERROR = "password_max_error"; private static final String EXTRACT_MIN_MONEY = "extract_min_money"; @@ -519,7 +518,6 @@ } } } - GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation(); @@ -578,12 +576,12 @@ int welfareCenterNews = 0; String invitCode = null; UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(user.getId()); - if (userInfoExtra != null ) { - if(userInfoExtra.getCouponNews() != null) { + if (userInfoExtra != null) { + if (userInfoExtra.getCouponNews() != null) { welfareCenterNews = userInfoExtra.getCouponNews(); } - - if(userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) { + + if (userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) { invitCode = userInfoExtra.getInviteCode(); } } @@ -1053,7 +1051,6 @@ return; } - /** * 鏂扮増鎻愮幇 * @@ -1159,13 +1156,17 @@ } catch (UnsupportedEncodingException e) { e.printStackTrace(); } - AdminUser adminUser = adminUserService.selectByPrimaryKey(4L); + + long[] targetUids = new long[] { 3L, 4L }; Config config = configService.getConfig("extract_code_email_from"); String[] sts = config.getValue().split(","); String account = sts[0]; String pwd = sts[1]; - String msg = "鎻愮幇瀹℃牳閾炬帴:" + url; - boolean isS = MailSenderUtil.sendEmail(adminUser.getEmail(), account, pwd, "鏈夋柊鐨勬彁鐜板鏍�", msg); + for (long adminId : targetUids) { + AdminUser adminUser = adminUserService.selectByPrimaryKey(adminId); + String msg = "鎻愮幇瀹℃牳閾炬帴:" + url; + boolean isS = MailSenderUtil.sendEmail(adminUser.getEmail(), account, pwd, "鏈夋柊鐨勬彁鐜板鏍�", msg); + } } }); return; @@ -1175,6 +1176,10 @@ out.print(JsonUtil.loadFalseResult("宸茶秴杩囧綋鏃ユ彁鐜伴噾棰�")); } else if (etype == 3) { out.print(JsonUtil.loadFalseResult("鎻愮幇閲戦澶т簬鎴戠殑绾㈠寘")); + } else if (etype == 111) { + out.print(JsonUtil.loadFalseResult("鏇存崲浜嗘墜鏈哄彿鍚�7澶╁唴涓嶅厑璁告彁鐜�")); + } else if (etype == 110) { + out.print(JsonUtil.loadFalseResult(Constant.znxConfig.getExtractWrongMsg())); } } @@ -1651,7 +1656,6 @@ } - /** * 鐢ㄦ埛闃熷憳鍒楄〃鏌ヨ 1.5.3鏌ヨ鏈夋晥闃熷憳 * @@ -1723,9 +1727,7 @@ e.printStackTrace(); } } - - - + /** * 鐢ㄦ埛闃熷憳缁熻 1.4.1 * @@ -1997,7 +1999,7 @@ e.printStackTrace(); } } - + /** * 鑾峰彇鐢ㄦ埛淇℃伅 * @@ -2015,14 +2017,14 @@ out.print(JsonUtil.loadFalseResult("绯荤粺涓嶅瓨鍦�")); return; } - + if (uid == null) { out.print(JsonUtil.loadFalseResult("璇锋眰鍙傛暟涓虹┖")); return; } - + UserInfo userInfo = userInfoService.getUserInfo(uid); - + // 娣诲姞鐢ㄦ埛娲昏穬璁板綍 UserActiveLog userActiveLog = new UserActiveLog(); userActiveLog.setChannel(acceptData.getChannel()); @@ -2032,14 +2034,14 @@ userActiveLog.setOsVersion(acceptData.getOsVersion()); userActiveLog.setDeviceType(acceptData.getDeviceType()); userActiveLogService.addUserActiveLog(userActiveLog); - + // 澶勭悊鐢ㄦ埛淇℃伅 outUserInfoHandle(userInfo); - + GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation(); JSONObject data = new JSONObject(); data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create().toJson(userInfo)); - + // 鐣岄潰鐘舵�� UserSettingsVO mySettings = null; try { @@ -2066,19 +2068,18 @@ } data.put("moduleState", mySettings); - int welfareCenterNews = 0; String invitCode = null; UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid); - if (userInfoExtra != null ) { - if(userInfoExtra.getCouponNews() != null) { + if (userInfoExtra != null) { + if (userInfoExtra.getCouponNews() != null) { welfareCenterNews = userInfoExtra.getCouponNews(); } - - if(userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) { + + if (userInfoExtra.getInviteCode() != null && userInfoExtra.getInviteCode().trim().length() > 0) { invitCode = userInfoExtra.getInviteCode(); } - + if (userInfoExtra.getUserRank() != null) { String picture = userInfoExtra.getUserRank().getPicture(); String icon = userInfoExtra.getUserRank().getIcon(); @@ -2089,7 +2090,7 @@ userInfo.setRankIcon(null); } } - + data.put("invitCode", invitCode); // 閭�璇风爜 data.put("welfareCenterNews", welfareCenterNews);// 绂忓埄涓績娑堟伅 out.print(JsonUtil.loadTrueResult(data)); @@ -2112,7 +2113,7 @@ } } }); - + } catch (UserInfoException e) { out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg())); } catch (Exception e) { @@ -2120,9 +2121,9 @@ e.printStackTrace(); } } - + private void outUserInfoHandle(UserInfo user) { - + // 绾㈠寘澶勭悊 user.setTotalHongBao(new BigDecimal(0)); user.setNoOpenHongBao(new BigDecimal(0)); @@ -2137,7 +2138,7 @@ user.setPhone(phone); } } - + UserInfoExtraVO userInfoExtra = userInfoExtraService.getInfoExtraVOByUid(user.getId()); if (userInfoExtra != null && userInfoExtra.getUserRank() != null) { String picture = userInfoExtra.getUserRank().getPicture(); @@ -2146,5 +2147,5 @@ user.setRankIcon(icon); } } - + } -- Gitblit v1.8.0