From 88b54772dbcf5ecab1e2316e4e4626ac901b8908 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期二, 22 一月 2019 15:58:24 +0800 Subject: [PATCH] 邀请码添加返回状态 --- fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java | 390 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 335 insertions(+), 55 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 d773e6b..5b2d0c0 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 @@ -1,15 +1,17 @@ package com.yeshi.fanli.controller.client; import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Type; import java.math.BigDecimal; +import java.net.URLEncoder; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; +import java.util.Iterator; import java.util.List; -import java.util.Map; import java.util.UUID; import javax.annotation.Resource; @@ -23,6 +25,7 @@ import org.yeshi.utils.IPUtil; import org.yeshi.utils.JsonUtil; import org.yeshi.utils.NumberUtil; +import org.yeshi.utils.taobao.TbImgUtil; import org.yeshi.utils.tencentcloud.COSManager; import com.google.gson.Gson; @@ -31,6 +34,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; +import com.yeshi.fanli.dto.HongBaoDTO; import com.yeshi.fanli.entity.accept.AcceptData; import com.yeshi.fanli.entity.bus.user.AccountDetails; import com.yeshi.fanli.entity.bus.user.AccountMessage; @@ -39,7 +43,6 @@ import com.yeshi.fanli.entity.bus.user.ExtractRecord; import com.yeshi.fanli.entity.bus.user.HongBao; import com.yeshi.fanli.entity.bus.user.HongBaoExtra; -import com.yeshi.fanli.entity.bus.user.HongBaoMessage; import com.yeshi.fanli.entity.bus.user.LostOrder; import com.yeshi.fanli.entity.bus.user.MoneyRecord; import com.yeshi.fanli.entity.bus.user.OrderItem; @@ -50,27 +53,36 @@ import com.yeshi.fanli.entity.bus.user.UserActiveLog; import com.yeshi.fanli.entity.bus.user.UserInfo; import com.yeshi.fanli.entity.bus.user.WeiXinUser; +import com.yeshi.fanli.entity.common.AdminUser; +import com.yeshi.fanli.entity.common.Config; import com.yeshi.fanli.entity.goods.CollectionGoodsV2; +import com.yeshi.fanli.entity.goods.CommonGoods; +import com.yeshi.fanli.entity.money.UserMoneyDetail; +import com.yeshi.fanli.entity.order.HongBaoOrder; import com.yeshi.fanli.entity.system.System; import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief; import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra; import com.yeshi.fanli.exception.BindingAccountException; import com.yeshi.fanli.exception.ObjectStateException; import com.yeshi.fanli.exception.goods.CollectionGoodsException; +import com.yeshi.fanli.exception.taobao.TaoKeApiException; import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException; +import com.yeshi.fanli.exception.user.UserCustomSettingsException; +import com.yeshi.fanli.exception.user.UserInfoExtraException; import com.yeshi.fanli.log.LogHelper; +import com.yeshi.fanli.service.AdminUserService; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.config.SystemService; import com.yeshi.fanli.service.inter.goods.CollectionGoodsV2Service; import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService; -import com.yeshi.fanli.service.inter.hongbao.HongBaoMessageService; import com.yeshi.fanli.service.inter.hongbao.HongBaoService; +import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service; import com.yeshi.fanli.service.inter.hongbao.ThreeSaleExtraInfoSerivce; import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce; +import com.yeshi.fanli.service.inter.order.HongBaoOrderService; import com.yeshi.fanli.service.inter.order.LostOrderService; import com.yeshi.fanli.service.inter.order.OrderItemServcie; import com.yeshi.fanli.service.inter.order.OrderService; -import com.yeshi.fanli.service.inter.user.AccountDetailsService; import com.yeshi.fanli.service.inter.user.AccountMessageService; import com.yeshi.fanli.service.inter.user.BindingAccountService; import com.yeshi.fanli.service.inter.user.ExtractRecordService; @@ -78,10 +90,16 @@ import com.yeshi.fanli.service.inter.user.MoneyRecordService; import com.yeshi.fanli.service.inter.user.PassWordErrorRecordService; import com.yeshi.fanli.service.inter.user.ShamUserService; +import com.yeshi.fanli.service.inter.user.SpreadUserImgService; import com.yeshi.fanli.service.inter.user.UserAccountService; import com.yeshi.fanli.service.inter.user.UserActiveLogService; +import com.yeshi.fanli.service.inter.user.UserCustomSettingsService; +import com.yeshi.fanli.service.inter.user.UserInfoExtraService; import com.yeshi.fanli.service.inter.user.UserInfoService; +import com.yeshi.fanli.service.inter.user.UserMoneyDetailService; +import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService; import com.yeshi.fanli.service.inter.user.WxDownService; +import com.yeshi.fanli.util.AESUtil; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.GsonUtil; import com.yeshi.fanli.util.HongBaoUtil; @@ -91,8 +109,15 @@ import com.yeshi.fanli.util.TimeUtil; import com.yeshi.fanli.util.Utils; import com.yeshi.fanli.util.account.UserUtil; +import com.yeshi.fanli.util.email.MailSenderUtil; +import com.yeshi.fanli.util.factory.AccountDetailsFactory; +import com.yeshi.fanli.util.factory.HongBaoFactory; +import com.yeshi.fanli.util.factory.OrderItemFactory; import com.yeshi.fanli.util.taobao.TaoBaoUtil; +import com.yeshi.fanli.util.taobao.TaoKeApiUtil; import com.yeshi.fanli.util.wx.WXLoginUtil; +import com.yeshi.fanli.vo.user.UserInfoExtraVO; +import com.yeshi.fanli.vo.user.UserSettingsVO; import net.sf.json.JSONArray; import net.sf.json.JSONObject; @@ -129,9 +154,6 @@ private SystemService systemService; @Resource - private HongBaoMessageService hongBaoMessageService; - - @Resource private ShamUserService shamUserService; @Resource @@ -145,9 +167,6 @@ @Resource private OrderItemServcie orderItemServcie; - - @Resource - private AccountDetailsService accountDetailsService; @Resource private AccountMessageService accountMessageService; @@ -172,6 +191,31 @@ @Resource private CollectionGoodsV2Service collectionGoodsV2Service; + + @Resource + private AdminUserService adminUserService; + + @Resource + private UserMoneyDetailService userMoneyDetailService; + + @Resource + private HongBaoOrderService hongBaoOrderService; + + @Resource + private HongBaoV2Service hongBaoV2Service; + + @Resource + private SpreadUserImgService spreadUserImgService; + + @Resource + private UserShareGoodsRecordService userShareGoodsRecordService; + + @Resource + private UserCustomSettingsService userCustomSettingsService; + + @Resource + private UserInfoExtraService userInfoExtraService; + private static final String PASSWORD_MAX_ERROR = "password_max_error"; private static final String EXTRACT_MIN_MONEY = "extract_min_money"; @@ -467,12 +511,54 @@ data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create() .toJson(UserUtil.filterForClientUser(user))); data.put("first", 0); + int spreadImgCount = spreadUserImgService.countUserSpreadImg(user.getId()); + long shareCount = userShareGoodsRecordService.countShareRecordByUid(user.getId()); + + int showTiCheng = 1; // 涓嶆樉绀� + if ("ios".equalsIgnoreCase(acceptData.getPlatform()) + && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) + data.put("showTiCheng", false); + else { + data.put("showTiCheng", spreadImgCount + shareCount > 0); + if (spreadImgCount + shareCount > 0) { + showTiCheng = 0; + } + } + if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) data.put("inviteList", String.format("http://%s/%s/client/share/friends_new_online.html", Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName())); else data.put("inviteList", configService.get("team_list")); + + // 鐣岄潰鐘舵�� + UserSettingsVO mySettings = null; + try { + mySettings = userCustomSettingsService.getMySettings(user.getId()); + } catch (UserCustomSettingsException e) { + mySettings = new UserSettingsVO(); + e.printStackTrace(); + } + + if (mySettings.getCancelNotice() == null) { + mySettings.setCancelNotice(0); + } + if (mySettings.getNoBonusCount() == null) { + mySettings.setNoBonusCount(showTiCheng); // 鏍规嵁showTiCheng鏉ュ垽鏂� + } + if (mySettings.getNoNewsRedDot() == null) { + mySettings.setNoNewsRedDot(0); + } + if (mySettings.getNoShareRecordAndStorage() == null) { + mySettings.setNoShareRecordAndStorage(showTiCheng); // 鏍规嵁showTiCheng鏉ュ垽鏂� + } + if (mySettings.getNoInvitationBonus() == null) { + mySettings.setNoInvitationBonus(0); + } + + data.put("moduleState", mySettings); + out.print(JsonUtil.loadTrueResult(data)); final UserInfo uuser = user; ThreadUtil.run(new Runnable() { @@ -695,16 +781,9 @@ JSONObject data = new JSONObject(); data.put("user", user); Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create(); - String maxError = "5"; - maxError = configService.get(PASSWORD_MAX_ERROR); // 褰撴棩杈撻敊瀵嗙爜鏈�澶氭鏁� - PassWordErrorRecord record = passWordErrorRecordService.getRecord(uid); - int max = Integer.parseInt(maxError); - if (record.getCount() >= max) { - data.put("error", "1"); // 杈惧埌鏈�澶氶檺鍒� - } else { - data.put("error", "0"); - } - data.put("maxError", maxError); + + data.put("error", "0"); + data.put("maxError", 1); String minMoney = configService.get(EXTRACT_MIN_MONEY); // 鍗曠瑪鎻愮幇鐨勬渶灏忛噾棰� String maxMoney = configService.get(EXTRACT_MAX_MONEY); // 鍗曠瑪鎻愮幇鐨勬渶澶ч噾棰� int maxDayCount = Integer.parseInt(configService.get("extract_count_day")); @@ -1236,6 +1315,30 @@ JSONObject data = new JSONObject(); data.put("id", extract.getId()); out.print(JsonUtil.loadTrueResult(data)); + ThreadUtil.run(new Runnable() { + + @Override + public void run() { + JSONObject json = new JSONObject(); + json.put("timeStamp", java.lang.System.currentTimeMillis()); + json.put("adminId", 4L); + String sign = AESUtil.encrypt(json.toString(), Constant.ADMINH5_AESKEY); + String url = ""; + try { + url = String.format("%s?from=emailh5&sign=%s", + Constant.systemCommonConfig.getExtractNotifyUrl(), URLEncoder.encode(sign, "UTF-8")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + AdminUser adminUser = adminUserService.selectByPrimaryKey(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); + } + }); return; } else if (etype == 1) { out.print(JsonUtil.loadFalseResult("宸茶秴杩囧綋鏃ユ彁鐜版鏁�")); @@ -1303,14 +1406,6 @@ LogHelper.userInfo("[ip:" + IPUtil.getRemotIP(request) + "] 鎵撳紑绾㈠寘[id=" + hid + "]鎴愬姛锛�"); } - @RequestMapping(value = "getHongBaoMessages", method = RequestMethod.POST) - public void getHongBaoMessages(AcceptData acceptData, PrintWriter out) { - List<HongBaoMessage> list = shamUserService.getManyData(); - JSONObject data = new JSONObject(); - data.put("list", list); - out.print(JsonUtil.loadTrueResult(data)); - } - @RequestMapping("findLostOrder") public void findLostOrder(AcceptData acceptData, LostOrder lostOrder, PrintWriter out) { boolean orderNum = true; @@ -1347,15 +1442,20 @@ @RequestMapping("findOrderItemList") public void findOrderItemList(AcceptData acceptData, long uid, int page, PrintWriter out) { - List<OrderItem> list = orderItemServcie.findOrderItemList(uid, page); - list.parallelStream().forEach(oi -> { - oi.setDesc(); - }); - int count = orderItemServcie.getCount(uid); + List<HongBaoOrder> list = hongBaoOrderService.listFanLiOrder(uid, page, Constant.PAGE_SIZE); + + List<OrderItem> orderList = new ArrayList<>(); + for (HongBaoOrder oi : list) { + OrderItem orderItem = OrderItemFactory.create(oi); + orderItem.setDesc(); + orderItem.setPicture(TbImgUtil.getTBSize220Img(orderItem.getPicture())); + orderList.add(orderItem); + } + long count = hongBaoOrderService.countFanLiOrder(uid); Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().create(); JSONObject data = new JSONObject(); - data.put("list", gson.toJson(list)); + data.put("list", gson.toJson(orderList)); data.put("count", count); out.print(JsonUtil.loadTrueResult(data)); } @@ -1370,8 +1470,13 @@ */ @RequestMapping("getTiChengOrderList") public void getTiChengOrderList(AcceptData acceptData, long uid, int page, PrintWriter out) { - List<HongBao> list = hongBaoService.getTiChengHongBaoList(uid, page); - long count = hongBaoService.getTiChengHongBaoListCount(uid); + List<HongBaoDTO> hongBaoDTOList = hongBaoV2Service.listJiangJinByUid(uid, page, Constant.PAGE_SIZE); + List<HongBao> list = new ArrayList<>(); + if (hongBaoDTOList != null) + for (HongBaoDTO dto : hongBaoDTOList) { + list.add(HongBaoFactory.createHongBao(dto)); + } + long count = hongBaoV2Service.countJiangJinByUid(uid); List<OrderItem> orderItemList = HongBaoUtil.convertToTiChengOrder(list); Gson gson = JsonUtil.getApiCommonGson(); JSONObject data = new JSONObject(); @@ -1501,22 +1606,66 @@ List<CollectionGoodsV2> collectionGoodsList = collectionGoodsV2Service.getCollectionGoodsList(uid, page + 1, Constant.PAGE_SIZE); - // List<CollectionGoods> coList = - // collectionGoodsService.findCollectionGoods(uid, page + 1); + List<TaoBaoGoodsBriefExtra> list = new ArrayList<TaoBaoGoodsBriefExtra>(); + long count = collectionGoodsV2Service.getCollectionGoodsCount(uid); JSONObject data = new JSONObject(); - Map<String, String> map = hongBaoManageService.convertMap(); - String proportion = map.get("hongbao_goods_proportion"); - String fcRate = map.get("hongbao_fc_ratio"); - List<TaoBaoGoodsBriefExtra> list = new ArrayList<TaoBaoGoodsBriefExtra>(); - collectionGoodsList.parallelStream().forEachOrdered(cg -> { - TaoBaoGoodsBrief goodsBrief = TaoBaoUtil.convert(cg.getCommonGoods()); - goodsBrief.setSalesCount(TaoBaoUtil.getSaleCount(goodsBrief.getBiz30day())); - TaoBaoGoodsBriefExtra taoBaoGoodsBriefExtra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(goodsBrief, proportion, - fcRate, ""); - taoBaoGoodsBriefExtra.setCreatetime(cg.getCreateTime()); - list.add(taoBaoGoodsBriefExtra); - }); + + List<TaoBaoGoodsBrief> listTaoKeGoods = new ArrayList<TaoBaoGoodsBrief>(); + if (collectionGoodsList != null && collectionGoodsList.size() > 0) { + + BigDecimal proportion = hongBaoManageService.getFanLiRate(); + + List<Long> listGid = new ArrayList<Long>(); + for (CollectionGoodsV2 collectionGoodsV2 : collectionGoodsList) { + CommonGoods commonGoods = collectionGoodsV2.getCommonGoods(); + if (commonGoods == null) { + continue; + } + listGid.add(commonGoods.getGoodsId()); + } + + try { + // API缃戠粶鎺ュ彛楠岃瘉鏄惁鍦ㄥ敭 + listTaoKeGoods = TaoKeApiUtil.getBatchGoodsInfo(listGid); + } catch (TaoKeApiException e) { + e.printStackTrace(); + } catch (TaobaoGoodsDownException e) { + e.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); + } + + for (CollectionGoodsV2 collectionGoodsV2 : collectionGoodsList) { + CommonGoods commonGoods = collectionGoodsV2.getCommonGoods(); + if (commonGoods == null) { + continue; + } + + if (listTaoKeGoods != null && listTaoKeGoods.size() > 0) { + int state = 1; // 榛樿鍋滃敭 + Long goodsId = commonGoods.getGoodsId(); + for (TaoBaoGoodsBrief taoKeGoods : listTaoKeGoods) { + Long auctionId = taoKeGoods.getAuctionId(); + if (goodsId == auctionId || goodsId.equals(auctionId)) { + state = 0; // 鍦ㄥ敭 + break; + } + } + commonGoods.setState(state); + } + + TaoBaoGoodsBrief goodsBrief = TaoBaoUtil.convert(commonGoods); + goodsBrief.setSalesCount(TaoBaoUtil.getSaleCount(goodsBrief.getBiz30day())); + TaoBaoGoodsBriefExtra taoBaoGoodsBriefExtra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(goodsBrief, + proportion.toString(), ""); + taoBaoGoodsBriefExtra.setCreatetime(collectionGoodsV2.getCreateTime()); + + list.add(taoBaoGoodsBriefExtra); + } + + } + GsonBuilder builder = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() { @Override public JsonElement serialize(Date value, Type theType, JsonSerializationContext context) { @@ -1578,8 +1727,11 @@ @RequestMapping("findAccountDetailsList") public void findAccountDetailsList(AcceptData acceptData, long uid, int page, PrintWriter out) { - List<AccountDetails> list = accountDetailsService.findAccountDetailsList(uid, page); - int count = accountDetailsService.getCount(uid); + List<UserMoneyDetail> detailList = userMoneyDetailService.listByUidWithState(uid, page, Constant.PAGE_SIZE); + List<AccountDetails> list = new ArrayList<>(); + for (UserMoneyDetail detail : detailList) + list.add(AccountDetailsFactory.create(detail)); + long count = userMoneyDetailService.countByUidWithState(uid); JSONObject data = new JSONObject(); data.put("list", GsonUtil.toJsonExpose(list)); data.put("count", count); @@ -1587,9 +1739,21 @@ } @RequestMapping("findAccountDetailsListV2") - public void findAccountDetailsListNew(AcceptData acceptData, long uid, int page, PrintWriter out) { - List<AccountDetails> list = accountDetailsService.findAccountDetailsListWithState(uid, page); - long count = accountDetailsService.getCountWithState(uid); + public void findAccountDetailsListNew(AcceptData acceptData, Long uid, int page, PrintWriter out) { + + if (uid == null) { + out.print(JsonUtil.loadFalseResult(1, "UID涓虹┖")); + return; + } + + List<UserMoneyDetail> detailList = userMoneyDetailService.listByUidWithState(uid, page, Constant.PAGE_SIZE); + + List<AccountDetails> list = new ArrayList<>(); + for (UserMoneyDetail detail : detailList) + list.add(AccountDetailsFactory.create(detail)); + + long count = userMoneyDetailService.countByUidWithState(uid); + JSONObject data = new JSONObject(); JSONArray array = new JSONArray(); for (AccountDetails ad : list) { @@ -1818,7 +1982,123 @@ out.print(JsonUtil.loadFalseResult("鍒犻櫎澶辫触")); e.printStackTrace(); } + } + + + /** + * 璁剧疆鐣岄潰寮�鍏崇姸鎬� + * @param acceptData + * @param uid + * @param params + * @param out + */ + @RequestMapping(value = "setModuleState", method = RequestMethod.POST) + public void setModuleState(AcceptData acceptData, Long uid, String params, PrintWriter out) { + if (uid == null) { + out.print(JsonUtil.loadFalseResult("鐢ㄦ埛鏈櫥褰�")); + return; + } + + try { + if (params == null || params.trim().length() == 0) { + out.print(JsonUtil.loadFalseResult("浼犻�掑弬鏁颁负绌�")); + return; + } + + JSONObject json = JSONObject.fromObject(params); + Iterator<String> iterator = json.keys(); + while(iterator.hasNext()){ + String type = (String) iterator.next(); + int state = json.getInt(type); + userCustomSettingsService.saveModuleState(uid, type, state); + } + out.print(JsonUtil.loadTrueResult("璁剧疆鎴愬姛")); + + } catch (UserCustomSettingsException e) { + out.print(JsonUtil.loadFalseResult(e.getMsg())); + } catch (Exception e) { + out.print(JsonUtil.loadFalseResult("璁剧疆澶辫触")); + e.printStackTrace(); + } } + + /** + * 鑾峰彇绛夌骇淇℃伅 + * @param acceptData + * @param uid + * @param out + */ + @RequestMapping(value = "getRankInfo", method = RequestMethod.POST) + public void getRankInfo(AcceptData acceptData, Long uid, PrintWriter out) { + + if (uid == null) { + out.print(JsonUtil.loadFalseResult("鐢ㄦ埛鏈櫥褰�")); + return; + } + + try { + + UserInfoExtraVO rankInfo = userInfoExtraService.getRankInfo(uid); + + GsonBuilder gsonBuilder = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()); + gsonBuilder.excludeFieldsWithoutExposeAnnotation(); + Gson gson = gsonBuilder.setDateFormat("yyyy.MM.dd").create(); + + JSONObject resultData = new JSONObject(); + resultData.put("rankInfo", gson.toJson(rankInfo)); + + out.print(JsonUtil.loadTrueResult(resultData)); + + } catch (UserInfoExtraException e) { + out.print(JsonUtil.loadFalseResult(e.getMsg())); + } catch (Exception e) { + out.print(JsonUtil.loadFalseResult("鑾峰彇澶辫触")); + e.printStackTrace(); + } + } + + + /** + * 鑾峰彇绛夌骇淇℃伅 + * @param acceptData + * @param uid + * @param out + */ + @RequestMapping(value = "getUserConfig", method = RequestMethod.POST) + public void getUserConfig(AcceptData acceptData, Long uid, PrintWriter out) { + + if (uid == null) { + out.print(JsonUtil.loadFalseResult("鐢ㄦ埛鏈櫥褰�")); + return; + } + + try { + + String inviteCode = userInfoExtraService.getUserInviteCode(uid); + + JSONObject inviteData = new JSONObject(); + if (inviteCode == null || inviteCode.trim().length() == 0) { + // 鏃犻個璇风爜 + inviteData.put("content", "閭�璇锋縺娲�"); + inviteData.put("link", configService.get("invite_activation_url")); + } else { + // 宸叉湁閭�璇风爜 + inviteData.put("content", "閭�璇风爜"); + inviteData.put("link", configService.get("invite_activation_success_url")); + } + + JSONObject data = new JSONObject(); + data.put("invite", inviteData); + + out.print(JsonUtil.loadTrueResult(data)); + + } catch (UserInfoExtraException e) { + out.print(JsonUtil.loadFalseResult(e.getMsg())); + } catch (Exception e) { + out.print(JsonUtil.loadFalseResult("鑾峰彇澶辫触")); + e.printStackTrace(); + } + } } -- Gitblit v1.8.0