| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.config.AppHomeFloatImg;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.notify.UserActivedRecordService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.vo.user.UserDialogBtnVO;
|
| | | import com.yeshi.fanli.vo.user.UserDialogVO;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | @Resource
|
| | | private SwiperPictureService swiperPictureService;
|
| | |
|
| | | @Resource
|
| | | private UserActivedRecordService userActivedRecordService;
|
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | /**
|
| | | * s 首页配置信息
|
| | |
| | | if (!StringUtil.isNullOrEmpty(notifyImg)) {
|
| | | data.put("floatNotifyImg", notifyImg);
|
| | | }
|
| | |
|
| | |
|
| | | // 无新人弹框 则查询默认
|
| | | FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 0);
|
| | |
| | | } else {// 老人
|
| | | data.put("userTimeType", 1);
|
| | | }
|
| | | data.put("hotFuctionLink",
|
| | | configService.getByVersion(ConfigKeyEnum.hotFunctionUrl.getKey(), platform, Integer.parseInt(acceptData.getVersion())));//
|
| | | data.put("hotFuctionLink", configService.getByVersion(ConfigKeyEnum.hotFunctionUrl.getKey(), platform,
|
| | | Integer.parseInt(acceptData.getVersion())));//
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | // 是否需要购物城转链
|
| | | boolean convert = "0".equalsIgnoreCase(configService.get(ConfigKeyEnum.showTaobaoCartConvert.getKey())) ? false : true;
|
| | | boolean convert = "0".equalsIgnoreCase(configService.get(ConfigKeyEnum.showTaobaoCartConvert.getKey())) ? false
|
| | | : true;
|
| | |
|
| | | if (!"cart".equalsIgnoreCase(position) && !convert) {
|
| | | out.print(JsonUtil.loadFalseResult(""));
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 关闭提醒
|
| | | * |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param id
|
| | | * @param type
|
| | | * 0-关闭 1-点击右边按钮 2-点击左边按钮
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "closeDialogNotify", method = RequestMethod.POST)
|
| | | public void closeDialogNotify(AcceptData acceptData, Long uid, String id, int type, PrintWriter out) {
|
| | |
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(id)) {
|
| | | out.print(JsonUtil.loadFalseResult("id为空"));
|
| | | return;
|
| | | }
|
| | | if (id.equalsIgnoreCase("tearcherNotify")) {
|
| | | userActivedRecordService.setTearcherNotified(uid);
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | } else {
|
| | | out.print(JsonUtil.loadFalseResult("id不存在"));
|
| | | }
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "getUserConfig", method = RequestMethod.POST)
|
| | | public void getUserConfig(AcceptData acceptData, PrintWriter out) {
|
| | | public void getUserConfig(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | try {
|
| | | // 用户协议链接
|
| | | String serviceProtocol = configService.get(ConfigKeyEnum.serviceProtocolLink.getKey());
|
| | |
| | | data.put("serviceProtocolLink", serviceProtocol);
|
| | | data.put("privacyProtocolLink", privacyProtocol);
|
| | | // 购物车跳转方式(包含jumpDetail与params)
|
| | | JSONObject source = JSONObject.fromObject(configService.getByVersion(ConfigKeyEnum.taobaoCartJumpDetail.getKey(),
|
| | | JSONObject source = JSONObject
|
| | | .fromObject(configService.getByVersion(ConfigKeyEnum.taobaoCartJumpDetail.getKey(),
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())));
|
| | | data.put("taoBaoCart", source);
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // 我的界面banner
|
| | | List<SwiperPicture> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | List<SwiperPicture> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | if (banner == null)
|
| | | banner = new ArrayList<SwiperPicture>();
|
| | | data.put("banner", JsonUtil.getApiCommonGson().toJson(banner));
|
| | |
| | | // 转链的网页链接
|
| | | String convertLinkUrl = configService.get(ConfigKeyEnum.convertDocWebLink.getKey());
|
| | | data.put("convertLinkUrl", convertLinkUrl);
|
| | | if (uid != null) {
|
| | |
|
| | | String tearcherLink = configService.getByVersion(ConfigKeyEnum.tearcherLink.getKey(),
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | if (userActivedRecordService.canNotifyAddTearcher(uid)) {
|
| | | UserInfo userInfo = userInfoService.selectAvailableByPrimaryKey(uid);
|
| | | if (userInfo != null) {
|
| | | JumpDetailV2 jumpDetail = jumpDetailV2Service.getByTypeCache("web",
|
| | | Constant.getPlatformCode(acceptData.getPlatform()),
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | |
|
| | | JSONObject negativeParams = new JSONObject();
|
| | | negativeParams.put("url", configService.getByVersion(ConfigKeyEnum.newerGonglue.getKey(),
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())));
|
| | |
|
| | | JSONObject positiveParams = new JSONObject();
|
| | | positiveParams.put("url", tearcherLink);
|
| | |
|
| | | UserDialogVO dialog = new UserDialogVO("tearcherNotify", true,
|
| | | "HI," + userInfo.getNickName(),
|
| | | "我是你的导师,为你在省赚过程中解难答疑,对你一对一辅导,倾听你的需求总结并反馈给板栗快省官方运营团队,快来添加我吧。",
|
| | | new UserDialogBtnVO("复制导师微信", jumpDetail, positiveParams),
|
| | | new UserDialogBtnVO("去新手攻略", jumpDetail, negativeParams));
|
| | | data.put("dialog", dialog);
|
| | | }
|
| | | }
|
| | |
|
| | | data.put("tearcherLink", tearcherLink);
|
| | | }
|
| | |
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | |
| | | public void getOrderConfig(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | // 测试
|
| | | data.put("showTaoBaoOrder", "0".equalsIgnoreCase(configService.get(ConfigKeyEnum.showTaobaoOrder.getKey()).trim()) ? false : true);
|
| | | data.put("showTaoBaoOrder",
|
| | | "0".equalsIgnoreCase(configService.get(ConfigKeyEnum.showTaobaoOrder.getKey()).trim()) ? false : true);
|
| | | data.put("taoBaoOrderUrl", "https://main.m.taobao.com/olist/index.html");
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
|
| | |
|
| | |
| | | data.put("activityRules", valueBr);
|
| | | data.put("inviteList", String.format("http://%s/%s/client/share/friends_new.html",
|
| | | Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName()));
|
| | | List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | List<SwiperPicture> pictureList = swiperPictureService.getByBannerCardAndVersion("invite_top_banner",
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
|
| | | if (pictureList != null && pictureList.size() > 0) {
|
| | | SwiperPicture picture = pictureList.get(0);
|
| | | com.alibaba.fastjson.JSONObject pictureJson = new com.alibaba.fastjson.JSONObject();
|
| | |
| | | }
|
| | |
|
| | | // 邀请链接
|
| | | // String shortLink = HttpUtil.getShortLink("http://" + Constant.wxGZConfig.getLoginHost() + "/"
|
| | | // + Constant.systemCommonConfig.getProjectName() + "/client/threeShareNew?uid=" + uid);
|
| | | // String shortLink = HttpUtil.getShortLink("http://" +
|
| | | // Constant.wxGZConfig.getLoginHost() + "/"
|
| | | // + Constant.systemCommonConfig.getProjectName() +
|
| | | // "/client/threeShareNew?uid=" + uid);
|
| | | data.put("inviteLink", "http://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate");
|
| | |
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("激活失败"));
|
| | | return;
|
| | | }
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("inviteCode", myInviteCode);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } else
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("邀请码激活成功"));
|
| | |
|
| | | } catch (UserInfoExtraException e) {
|
| | |
| | | try {
|
| | | userInfoExtraService.activationInviteWX(
|
| | | Constant.getWXAccount(acceptData.getPlatform(), acceptData.getVersion()), uid, code);
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | String myInviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("inviteCode", myInviteCode);
|
| | | JsonUtil.printMode(out, "", JsonUtil.loadTrueResult(data));
|
| | | } else
|
| | | out.print(JsonUtil.loadTrueResult("邀请码激活成功"));
|
| | | } catch (UserInfoExtraException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | |
| | | import com.yeshi.fanli.dto.HongBaoDTO;
|
| | | import com.yeshi.fanli.dto.money.AccountDetails;
|
| | | import com.yeshi.fanli.dto.order.OrderItem;
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.dto.wx.WXAccountInfoDTO;
|
| | | import com.yeshi.fanli.entity.AppVersionInfo;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleExtraInfoSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
|
| | | import com.yeshi.fanli.util.AESUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private RedPackForbidService redPackForbidService;
|
| | |
|
| | | @Resource
|
| | | private UserInviteService userInviteService;
|
| | |
|
| | | private static final String EXTRACT_MIN_MONEY = ConfigKeyEnum.extractMoneyMin.getKey();
|
| | | private static final String EXTRACT_MAX_MONEY = ConfigKeyEnum.extractMoneyMAX.getKey();
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "请上传提现金额"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
|
| | | if (!Constant.IS_TEST) {
|
| | | // 判断手机验证码的正确性
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0_7(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | JSONObject inviteLevel = new JSONObject();
|
| | | UserInviteLevelEnum level = userInviteService.getUserInviteLevel(uid);
|
| | | inviteLevel.put("level", level.name());
|
| | | inviteLevel.put("link", level.getLink());
|
| | | data.put("inviteLevel", inviteLevel);
|
| | | }
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | |
| | | if (qrCodeFile != null) {
|
| | | userInfoExtraService.uploadERCode(qrCodeFile, uid);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (UserInfoException e) {
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "getUserConfig", method = RequestMethod.POST)
|
| | | public void getUserConfig(AcceptData acceptData, PrintWriter out) {
|
| | | try {
|
| | | // 用户协议链接
|
| | | String serviceProtocol = configService.get(ConfigKeyEnum.serviceProtocolLink.getKey());
|
| | | // 隐私条款链接
|
| | | String privacyProtocol = configService.get(ConfigKeyEnum.privacyProtocolLink.getKey());
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("serviceProtocolLink", serviceProtocol);
|
| | | data.put("privacyProtocolLink", privacyProtocol);
|
| | | // 购物车跳转方式(包含jumpDetail与params)
|
| | | JSONObject source = JSONObject.fromObject(configService.get(ConfigKeyEnum.taobaoCartJumpDetail.getKey()));
|
| | | data.put("taoBaoCart", source);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("获取失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | | * 订单解析配置
|
| | | * |
| | | * @param acceptData
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getOrderParseConfig", method = RequestMethod.POST)
|
| | | public void getOrderParseConfig(AcceptData acceptData, int type, PrintWriter out) {
|
| | |
|
| | | switch (type) {
|
| | | case Constant.SOURCE_TYPE_TAOBAO:
|
| | | if ("0".equalsIgnoreCase(configService.get(ConfigKeyEnum.autoFindTaobaoOrder.getKey())))
|
| | | out.print(JsonUtil.loadFalseResult(1, "暂不支持"));
|
| | | else {
|
| | | String orderJS = configService.get(ConfigKeyEnum.taobaoOrderParseJS.getKey());
|
| | | JSONObject data = new JSONObject();
|
| | | try {
|
| | | data.put("orderJS", DESUtil.encode(orderJS, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,")));
|
| | | data.put("orderUrl",
|
| | | DESUtil.encode("https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm",
|
| | | StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,")));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | break;
|
| | |
|
| | | case Constant.SOURCE_TYPE_JD: {
|
| | |
|
| | | }
|
| | | break;
|
| | |
|
| | | case Constant.SOURCE_TYPE_PDD: {
|
| | |
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取订单配置
|
| | | *
|
| | |
| | | data.put("words", configService.get(ConfigKeyEnum.articleHotWords.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | //发圈测试
|
| | | @RequestMapping(value = "evaluate", method = RequestMethod.POST)
|
| | | public void evaluate(AcceptData acceptData, PrintWriter out) {
|
| | | out.print(configService.get("test"));
|
| | |
|
| | | // //发圈测试
|
| | | public void evaluateTest(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = JSONObject.fromObject(configService.get("test"));
|
| | | out.print(data.toString());
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | */
|
| | | @RequestMapping(value = "evaluate", method = RequestMethod.POST)
|
| | | public void evaluate(AcceptData acceptData, Integer page, PrintWriter out) {
|
| | | if ("1".equalsIgnoreCase(configService.get("test-open"))) {
|
| | | evaluateTest(acceptData, out);
|
| | | return;
|
| | | }
|
| | |
|
| | | long cid = 1;
|
| | | long subId = 1;
|
| | | List<DynamicInfo> listd = dynamicInfoService.queryV2(2, 74, (page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,
|
| | |
| | |
|
| | | List<GoodsEvaluate> list = new ArrayList<>();
|
| | |
|
| | | int p = 0;
|
| | | for (DynamicInfo info : listd) {
|
| | | p++;
|
| | |
|
| | | GoodsEvaluate goodsEvaluate = new GoodsEvaluate();
|
| | | goodsEvaluate.setId(info.getId());
|
| | | ActivityUser user = info.getUser();
|
| | |
| | |
|
| | | List<ImgInfo> imgList = new ArrayList<>();
|
| | | int i = 0;
|
| | |
|
| | | for (GoodsPicture goodsPicture : imgs) {
|
| | | ImgInfo imgInfo = new ImgInfo();
|
| | | GoodsDetailVO goodsVO = goodsPicture.getGoodsVO();
|
| | |
| | | // i++;
|
| | |
|
| | | imgList.add(imgInfo);
|
| | | }
|
| | |
|
| | | if (p == 1) {
|
| | | ImgInfo imgInfo = new ImgInfo();
|
| | | imgInfo.setLarge(true);
|
| | | imgInfo.setType(ImgEnum.img);
|
| | | imgInfo.setUrl(
|
| | | "http://ec-1255749512.file.myqcloud.com/img/invite/new/10ea86eb8db94f7cbb5e68864480d5fe.jpg");
|
| | | imgInfo.setH(1334);
|
| | | imgInfo.setW(750);
|
| | | imgList.add(0, imgInfo);
|
| | |
|
| | | imgInfo = new ImgInfo();
|
| | | imgInfo.setType(ImgEnum.video);
|
| | | imgInfo.setLarge(true);
|
| | | imgInfo.setUrl(
|
| | | "http://ec-1255749512.file.myqcloud.com/img/invite/new/10ea86eb8db94f7cbb5e68864480d5fe.jpg");
|
| | | imgInfo.setH(315);
|
| | | imgInfo.setW(560);
|
| | | imgInfo.setUrl("https://zzya.beva.cn/img/Fr56bczo_F8NvroeG54jLH5ey0aC.jpg");
|
| | | imgInfo.setVideoUrl("http://img.flqapp.com/resource/video.mp4");
|
| | | imgList.add(0, imgInfo);
|
| | |
|
| | | }
|
| | |
|
| | | goodsEvaluate.setImgList(imgList);
|
| | |
| | | list.add(goodsEvaluate);
|
| | | }
|
| | |
|
| | | // List<GoodsEvaluate> list = goodsEvaluateService.queryValidEvaluateCache((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE);
|
| | | // List<GoodsEvaluate> list =
|
| | | // goodsEvaluateService.queryValidEvaluateCache((page - 1) *
|
| | | // Constant.PAGE_SIZE, Constant.PAGE_SIZE);
|
| | | // if (list == null) {
|
| | | // list = new ArrayList<>();
|
| | | // }
|
| | |
| | | }
|
| | |
|
| | | @RequestMapping(value = "evaluateShare", method = RequestMethod.POST)
|
| | | public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, Long goodsId, Integer goodsType, PrintWriter out) {
|
| | | public void evaluateShare(AcceptData acceptData, Long uid, String id, Integer type, Long goodsId, Integer goodsType,
|
| | | PrintWriter out) {
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("用户未登录"));
|
| | | return;
|
| | |
| | | }
|
| | |
|
| | | if (type == 1) {
|
| | | if (goodsVO.getGoodsId().longValue() == goodsId.longValue() && goodsVO.getGoodsType() == goodsType.intValue()) {
|
| | | if (goodsVO.getGoodsId().longValue() == goodsId.longValue()
|
| | | && goodsVO.getGoodsType() == goodsType.intValue()) {
|
| | | String jumpLink = getJumpLink(goodsVO, user);
|
| | | if (!StringUtil.isNullOrEmpty(jumpLink)) {
|
| | | list.add(jumpLink);
|
| | |
| | | jumpLink = JDApiUtil.convertLinkWithSubUnionId(materialId, couponUrl, JDApiUtil.POSITION_SHARE + "",
|
| | | user.getId() + "");
|
| | | } else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_PDD) {
|
| | | jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsVO.getGoodsId(), PinDuoDuoApiUtil.PID_SHARE + "", user.getId() + "");
|
| | | jumpLink = PinDuoDuoApiUtil.getPromotionUrl(goodsVO.getGoodsId(), PinDuoDuoApiUtil.PID_SHARE + "",
|
| | | user.getId() + "");
|
| | | }
|
| | | FileUploadResult uploadResult = qrCodeService.drawGoodsPoster(jumpLink, user.getPortrait(), goodsVO);
|
| | | if (uploadResult != null) {
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 评论复制
|
| | | * |
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param cid 评论id
|
| | | * @param cid
|
| | | * 评论id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "evaluateComment", method = RequestMethod.POST)
|
| | |
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate());
|
| | |
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
|
| | | if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
|
| | |
| | | goodsDetail.getMoneyInfo().setShareMoney(
|
| | | "¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
| | | * @param from
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getDetailJD", method = RequestMethod.POST)
|
| | | @RequestMapping(value = "getDetailJD")
|
| | | public void getDetialJD(AcceptData acceptData, Long id, Long uid, String from, PrintWriter out) {
|
| | | // uid=2255993L;
|
| | | // 系统验证
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | |
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate());
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, paramsDTO);
|
| | | if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
|
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
| | | out.print(JsonUtil.loadTrueResult(object.toString()));
|
| | |
|
| | | final JDGoods goods = jdGoods;
|
| | | final Long fuid=uid;
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | | // 添加浏览记录
|
| | | try {
|
| | | scanHistoryV2Service.addJDScanHistory(uid, acceptData.getDevice(), goods);
|
| | | scanHistoryV2Service.addJDScanHistory(fuid, acceptData.getDevice(), goods);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
|
| | | acceptData.getVersion());
|
| | | paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate());
|
| | |
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, paramsDTO);
|
| | | if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
|
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo().setShareMoney(
|
| | | "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | goodsDetail.getMoneyInfo().setCompositionInfo(goodsDetail.getMoneyInfo().getMaxCompositionInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
| | | data.put("helpLink", configService.get(ConfigKeyEnum.inviteHelpLink.getKey()));
|
| | | data.put("inviteRules", values.getValue().replace("\n", "<br><br>"));
|
| | | data.put("imgUrlList", JsonUtil.getSimpleGsonWithDate().toJson(imgList));
|
| | | data.put("inviteLink", "http://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate");
|
| | | data.put("inviteLink", Constant.YINGYONGBAO_LINK);
|
| | | out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "成功"));
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | BigDecimal fanliMoney) {
|
| | | List<ShareGoodsCommentChoiceInfo> list = new ArrayList<>();
|
| | | if (!StringUtil.isNullOrEmpty(token))
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_TOKEN, "淘口令", token, true, false));
|
| | | list.add(
|
| | | new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_TOKEN, "淘口令", token, true, false));
|
| | | if (!StringUtil.isNullOrEmpty(link)) {
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_LINK, "链接",link, true, false));
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(inviteCode)) {
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_INVITE_CODE, "邀请码", inviteCode, false,
|
| | | true));
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_INVITE_CODE, "邀请码", inviteCode,
|
| | | false, true));
|
| | | }
|
| | |
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_DOWNLOAD_LINK, "下载链接", "http://www.baidu.com", false,
|
| | | true));
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_DOWNLOAD_LINK, "下载链接",
|
| | | "http://www.baidu.com", false, true));
|
| | |
|
| | | list.add(
|
| | | new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_FANLI_MONEY, "返利金额", "¥ "+fanliMoney, false, true));
|
| | | list.add(new ShareGoodsCommentChoiceInfo(ShareGoodsCommentChoiceInfo.TYPE_FANLI_MONEY, "返利金额",
|
| | | "¥ " + fanliMoney, false, true));
|
| | |
|
| | | return list;
|
| | | }
|
| | |
| | | taoBaoLink.getGoods(), shareInfo.getToken()));
|
| | |
|
| | | // 提示图文内容
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), platform,
|
| | | Integer.parseInt(version));
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | |
| | | }
|
| | | shareInfo.setDescText(descText);
|
| | |
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), acceptData.getPlatform(),
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | |
| | | shareInfo.setDescText(descText);
|
| | |
|
| | | //
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | String imgs = configService.getByVersion(ConfigKeyEnum.goodsShareNotifyImgs.getKey(), acceptData.getPlatform(),
|
| | | Integer.parseInt(acceptData.getVersion()));
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | |
| | | } else {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("userInfo", UserUtil.filterForClientUser(userInfo));
|
| | | data.put("inviteCode", userInfoExtraService.getInviteCodeByUid(userInfo.getId()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | final UserInfo uuser = userInfo;
|
| | |
| | | }
|
| | | vo.setFinishMoney(hongBaoV2CountService.getRewardMoneyBySelf(uid));
|
| | |
|
| | | |
| | | List<Integer> list = new ArrayList<Integer>();
|
| | | list.add(BanLiShopOrder.STATE_SUCCESS);
|
| | | BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
|
| | |
|
| | | vo.setFinishGoldCoin(Long.parseLong(integralDetailService.getCumulativeMoney(uid).setScale(0).toString()));
|
| | | vo.setFinishTeam(hongBaoV2CountService.countValidOrderTeamUserByUid(uid, TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney));
|
| | | vo.setFinishTeam(hongBaoV2CountService.countValidOrderTeamUserByUid(uid,
|
| | | TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney));
|
| | | vo.setFinishHongBao(banLiShopOrderService.countByUidAndState(uid, list));
|
| | |
|
| | |
|
| | | // 区分老用户和新用户
|
| | | String limtDate = userVipConfigService.getValueByKey("vip_execute_time");
|
| | |
| | | BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
|
| | |
|
| | | BigDecimal finishGoldCoin = integralDetailService.getCumulativeMoney(uid);
|
| | | long finishTeam = hongBaoV2CountService.countValidOrderTeamUserByUid(uid, TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney);
|
| | | long finishTeam = hongBaoV2CountService.countValidOrderTeamUserByUid(uid,
|
| | | TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney);
|
| | | long finishHongBao = banLiShopOrderService.countByUidAndState(uid, list);
|
| | | BigDecimal finishMoney = hongBaoV2CountService.getRewardMoneyBySelf(uid);
|
| | |
|
New file |
| | |
| | | package com.yeshi.fanli.dao.user.notify;
|
| | |
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import com.yeshi.fanli.dao.MongodbBaseDao;
|
| | | import com.yeshi.fanli.entity.bus.user.notify.UserActivedRecord;
|
| | |
|
| | | @Repository
|
| | | public class UserActivedRecordDao extends MongodbBaseDao<UserActivedRecord> {
|
| | |
|
| | | }
|
| | |
| | | private BigDecimal shareRate;
|
| | | // 奖励券最高返比例
|
| | | private BigDecimal maxRewardRate;
|
| | |
|
| | | // 基础返利比例信息
|
| | | private BigDecimal baseFanliRate;
|
| | | // VIP返利比例
|
| | | private BigDecimal vipFanLiRate;// 会员返利比例
|
| | |
|
| | | public BigDecimal getBaseFanliRate() {
|
| | | return baseFanliRate;
|
| | | }
|
| | |
|
| | | public void setBaseFanliRate(BigDecimal baseFanliRate) {
|
| | | this.baseFanliRate = baseFanliRate;
|
| | | }
|
| | |
|
| | | public BigDecimal getVipFanLiRate() {
|
| | | return vipFanLiRate;
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.dto.user;
|
| | |
|
| | | public enum UserInviteLevelEnum {
|
| | | noActive("未激活", ""), actived("已经激活", ""), vipApply("超级会员申请中", ""), vip("超级会员", ""), tearcherApply("导师申请中",
|
| | | ""), tearcher("导师", "");
|
| | | private String name;
|
| | | private String link;
|
| | |
|
| | | private UserInviteLevelEnum(String name, String link) {
|
| | | this.name = name;
|
| | | this.link = link;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return this.name;
|
| | | }
|
| | |
|
| | | public String getLink() {
|
| | | return this.link;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.entity.bus.user.notify;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import org.springframework.data.annotation.Id;
|
| | | import org.springframework.data.mongodb.core.mapping.Document;
|
| | | import org.springframework.data.mongodb.core.mapping.Field;
|
| | |
|
| | | /**
|
| | | * 用户激活记录表
|
| | | * |
| | | * @author Administrator
|
| | | *
|
| | | */
|
| | | @Document(collection = "userActivedRecord")
|
| | | public class UserActivedRecord {
|
| | | @Id
|
| | | private Long uid;
|
| | | @Field
|
| | | private Boolean addTearcherNotify;// 添加导师提醒
|
| | | @Field
|
| | | private Date addTearchNotifyTime;
|
| | | @Field
|
| | | private Date createTime;
|
| | | @Field
|
| | | private Date updateTime;
|
| | |
|
| | | public UserActivedRecord(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public UserActivedRecord() {
|
| | | }
|
| | |
|
| | | public Long getUid() {
|
| | | return uid;
|
| | | }
|
| | |
|
| | | public void setUid(Long uid) {
|
| | | this.uid = uid;
|
| | | }
|
| | |
|
| | | public Boolean getAddTearcherNotify() {
|
| | | return addTearcherNotify;
|
| | | }
|
| | |
|
| | | public void setAddTearcherNotify(Boolean addTearcherNotify) {
|
| | | this.addTearcherNotify = addTearcherNotify;
|
| | | }
|
| | |
|
| | | public Date getAddTearchNotifyTime() {
|
| | | return addTearchNotifyTime;
|
| | | }
|
| | |
|
| | | public void setAddTearchNotifyTime(Date addTearchNotifyTime) {
|
| | | this.addTearchNotifyTime = addTearchNotifyTime;
|
| | | }
|
| | |
|
| | | public Date getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(Date createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | |
|
| | | public Date getUpdateTime() {
|
| | | return updateTime;
|
| | | }
|
| | |
|
| | | public void setUpdateTime(Date updateTime) {
|
| | | this.updateTime = updateTime;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | convertDocWebLink("convert_doc_web_link","文案转链网页"),
|
| | | convertDocHelpLink("convert_doc_help_link","文案转链帮助网页"),
|
| | | convertDocTip("convert_doc_tip","文案转链温馨提示"),
|
| | | newerGonglue("newer_gonglue_url","新手攻略链接")
|
| | | newerGonglue("newer_gonglue_url","新手攻略链接"),
|
| | | tearcherLink("tearcher_link","导师链接")
|
| | | ;
|
| | |
|
| | | private final String key;
|
| | |
| | | try {
|
| | | convertContent = convertLinkManager.convertLinkFromText(info.getContent(), uid, true);
|
| | | } catch (Exception e) {
|
| | | throw new WXMPDynamicInfoException(2, e.getMessage());
|
| | | e.printStackTrace();
|
| | | throw new WXMPDynamicInfoException(2, "转链出错");
|
| | | }
|
| | | wxmpDynamicInfoDao.addShareCount(id);
|
| | | return convertContent;
|
| | |
| | | s.setParams(special.getParams());
|
| | | }
|
| | | }
|
| | |
|
| | | if (s.getJumpDetail() != null) {
|
| | | s.getJumpDetail().setNeedLogin(s.isJumpLogin()
|
| | | | (s.getJumpDetail().getNeedLogin() != null && s.getJumpDetail().getNeedLogin()));
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | // 数据处理
|
| | |
| | | return paramsDTO;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public BigDecimal getBaseFanliRate(long time) {
|
| | | String key = "base_fanli_rate";
|
| | | HongBaoManage hongBaoManage = hongBaoManageMapper.selectByKeyAndMaxValidTime(key, time);
|
| | | if (hongBaoManage == null)
|
| | | hongBaoManage = hongBaoManageMapper.selectByKey(key);
|
| | | if (hongBaoManage != null)
|
| | | return new BigDecimal(hongBaoManage.getValue());
|
| | | LogHelper.error("获取基础返利比例出错");
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public BigDecimal getBaseFanliRate() {
|
| | | return getBaseFanliRate(System.currentTimeMillis());
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRankRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.bus.user.notify.UserActivedRecord;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.user.ThreeSaleException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInviteRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserRankService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.notify.UserActivedRecordService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.FilePathEnum;
|
| | | import com.yeshi.fanli.util.InviteCodeFilterUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInviteRecordService userInviteRecordService;
|
| | |
|
| | | @Resource
|
| | | @Lazy
|
| | | private UserActivedRecordService userActivedRecordService;
|
| | |
|
| | | @Resource(name = "producer")
|
| | | private Producer producer;
|
| | |
| | | userInfoExtra.setCreateTime(new Date());
|
| | | userInfoExtraMapper.insertSelective(userInfoExtra);
|
| | | }
|
| | | userActivedRecordService.add(new UserActivedRecord(uid));
|
| | |
|
| | | if (!Constant.IS_TEST) { // 发送激活成功消息
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.inviteCodeActive,
|
| | |
| | | if (asInputStream == null) {
|
| | | LogHelper.test("微信头像下载失败: " + weiXinUser.getUnionid() + " " + headimgurl);
|
| | | } else {
|
| | | FileUploadResult result = COSManager.getInstance().uploadFile(asInputStream, String.format(
|
| | | FilePathEnum.userWXPortrait.getPath() + "%s_%s.jpg", weiXinUser.getUnionid(), System.currentTimeMillis() + ""));
|
| | | FileUploadResult result = COSManager.getInstance().uploadFile(asInputStream,
|
| | | String.format(FilePathEnum.userWXPortrait.getPath() + "%s_%s.jpg", weiXinUser.getUnionid(),
|
| | | System.currentTimeMillis() + ""));
|
| | | if (result != null && !StringUtil.isNullOrEmpty(result.getUrl())) {
|
| | | headimgurl = result.getUrl();
|
| | | } else {
|
| | |
| | | userInfoExtra.setCreateTime(new Date());
|
| | | userInfoExtraMapper.insertSelective(userInfoExtra);
|
| | | }
|
| | | userActivedRecordService.add(new UserActivedRecord(uid));
|
| | | |
| | |
|
| | | if (!Constant.IS_TEST) { // 发送激活成功消息
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.inviteCodeActive,
|
| | |
| | | if (asInputStream == null) {
|
| | | LogHelper.test("微信头像下载失败: " + weiXinUser.getUnionid() + " " + headimgurl);
|
| | | } else {
|
| | | FileUploadResult result = COSManager.getInstance().uploadFile(asInputStream, String.format(
|
| | | FilePathEnum.userWXPortrait.getPath() + "%s_%s.jpg", weiXinUser.getUnionid(), System.currentTimeMillis() + ""));
|
| | | FileUploadResult result = COSManager.getInstance().uploadFile(asInputStream,
|
| | | String.format(FilePathEnum.userWXPortrait.getPath() + "%s_%s.jpg", weiXinUser.getUnionid(),
|
| | | System.currentTimeMillis() + ""));
|
| | | if (result != null && !StringUtil.isNullOrEmpty(result.getUrl())) {
|
| | | headimgurl = result.getUrl();
|
| | | } else {
|
| | |
| | | userInfoExtra.setCreateTime(new Date());
|
| | | userInfoExtraMapper.insertSelective(userInfoExtra);
|
| | | }
|
| | | |
| | | userActivedRecordService.add(new UserActivedRecord(uid));
|
| | |
|
| | | if (!Constant.IS_TEST) { // 发送激活成功消息
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.inviteCodeActive,
|
| | |
| | |
|
| | | if(!Constant.IS_TEST) { //发送邀请码更改成功的消息
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userInfoUpdate,
|
| | | new Gson().toJson(new UserInfoUpdateMQMsg(uid, UserInfoUpdateTypeEnum.inviteCode, inviteCodeVip, new Date())));
|
| | | new Gson().toJson(new UserInfoUpdateMQMsg(uid, UserInfoUpdateTypeEnum.inviteCode, inviteCodeVip,
|
| | | new Date())));
|
| | | producer.send(message);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public void uploadERCode(MultipartFile file, Long uid) {
|
| | |
| | | COSManager.getInstance().deleteFile(erCode);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.dao.mybatis.UserInfoMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.UserShareGoodsHistoryMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.share.ShareMapper;
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.BindingAccount;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
| | | return userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | }
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.user.invite;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class UserInviteServiceImpl implements UserInviteService {
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private UserVIPInfoService userVIPInfoService;
|
| | |
|
| | | @Override
|
| | | public UserInviteLevelEnum getUserInviteLevel(Long uid) {
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | if (StringUtil.isNullOrEmpty(inviteCode)) {
|
| | | return UserInviteLevelEnum.noActive;
|
| | | }
|
| | | UserVIPInfo info = userVIPInfoService.selectByUid(uid);
|
| | | if (info == null || info.getState() == UserVIPInfo.STATE_INVALID)
|
| | | return UserInviteLevelEnum.actived;
|
| | | if (info.getState() == UserVIPInfo.STATE_VERIFING)
|
| | | return UserInviteLevelEnum.vipApply;
|
| | |
|
| | | // TODO 没有判断导师
|
| | |
|
| | | return UserInviteLevelEnum.vip;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.impl.user.notify;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.user.notify.UserActivedRecordDao;
|
| | | import com.yeshi.fanli.entity.bus.user.notify.UserActivedRecord;
|
| | | import com.yeshi.fanli.service.inter.user.notify.UserActivedRecordService;
|
| | |
|
| | | @Service
|
| | | public class UserActivedRecordServiceImpl implements UserActivedRecordService {
|
| | |
|
| | | @Resource
|
| | | private UserActivedRecordDao userActivedRecordDao;
|
| | |
|
| | | @Override
|
| | | public boolean canNotifyAddTearcher(Long uid) {
|
| | | UserActivedRecord record = userActivedRecordDao.get(uid);
|
| | | if (record == null)
|
| | | return false;
|
| | | if (record.getAddTearcherNotify() == null || record.getAddTearcherNotify() == false)
|
| | | return true;
|
| | | else
|
| | | return false;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void setTearcherNotified(Long uid) {
|
| | | UserActivedRecord record = userActivedRecordDao.get(uid);
|
| | | if (record == null)
|
| | | return;
|
| | | if (record.getAddTearcherNotify() == null || !record.getAddTearcherNotify()) {
|
| | | record.setAddTearchNotifyTime(new Date());
|
| | | record.setUpdateTime(new Date());
|
| | | record.setAddTearcherNotify(true);
|
| | | userActivedRecordDao.save(record);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void add(UserActivedRecord record) {
|
| | | UserActivedRecord old = userActivedRecordDao.get(record.getUid());
|
| | | if (old != null)
|
| | | return;
|
| | | if (record.getCreateTime() == null)
|
| | | record.setCreateTime(new Date());
|
| | | userActivedRecordDao.save(record);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | @Resource
|
| | | private UserSystemCouponService userSystemCouponService;
|
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void addUserVIPInfo(UserVIPInfo info) throws UserVIPInfoException {
|
| | |
| | |
|
| | | /**
|
| | | * 通知上级脱离关系
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | @Transactional
|
| | |
| | | return map;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public boolean verifyConform(Long uid) {
|
| | | if (uid == null || uid <= 0)
|
| | |
| | |
|
| | | // 1、直接粉丝(从 2020 年 1 月 1 日起直接粉丝产生有效订单)
|
| | | BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
|
| | | long teamNum = hongBaoV2CountService.countValidOrderTeamUserByUid(uid, TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney);
|
| | | |
| | | long teamNum = hongBaoV2CountService.countValidOrderTeamUserByUid(uid,
|
| | | TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney);
|
| | |
|
| | | // 区分老用户和新用户
|
| | | String limtDate = userVipConfigService.getValueByKey("vip_execute_time");
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public List<UserVIPInfo> listQuery(int page, int count, String key, Integer state){
|
| | | return userVIPInfoMapper.listQuery((page-1) * count, count, key, state);
|
| | |
| | | public long countQuery(String key, Integer state){
|
| | | return userVIPInfoMapper.countQuery(key, state);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | |
| | | // 上级会员情况
|
| | | boolean separate = false;
|
| | | UserVIPInfo userVIPInfo = userVIPInfoMapper.selectByPrimaryKey(bossId);
|
| | | if (userVIPInfo != null && userVIPInfo.getState() != null && userVIPInfo.getState() == UserVIPInfo.STATE_SUCCESS) {
|
| | | if (userVIPInfo != null && userVIPInfo.getState() != null
|
| | | && userVIPInfo.getState() == UserVIPInfo.STATE_SUCCESS) {
|
| | | if (userInviteSeparate.getEndTime().getTime() < userVIPInfo.getSuccessTime().getTime()) {
|
| | | separate = true; // 结束时间已经超过
|
| | | }
|
| | |
| | |
|
| | | if (!separate) {
|
| | | // 未脱离
|
| | | userInviteSeparateService.updateStateByWorkerIdAndBossId(workerId, bossId, UserInviteSeparate.STATE_INVALID);
|
| | | userInviteSeparateService.updateStateByWorkerIdAndBossId(workerId, bossId,
|
| | | UserInviteSeparate.STATE_INVALID);
|
| | | } else {
|
| | | // 脱离关系
|
| | | userInviteSeparateService.updateStateByWorkerIdAndBossId(workerId, bossId, UserInviteSeparate.STATE_SUCCESS);
|
| | | userInviteSeparateService.updateStateByWorkerIdAndBossId(workerId, bossId,
|
| | | UserInviteSeparate.STATE_SUCCESS);
|
| | |
|
| | | // 脱离邀请关系
|
| | | threeSaleSerivce.inviteSeparate(workerId, bossId);
|
| | |
| | | // 消息
|
| | | UserInfo userInfo = userInfoService.selectByPKey(workerId);
|
| | | MsgOtherVIPDTO msgboss = new MsgOtherVIPDTO();
|
| | | msgboss.setContent1(userInfo.getNickName() + workerId + "于" +TimeUtil.formatDateDot(userInviteSeparate.getCreateTime())+"成功升级成为超级会员 ");
|
| | | msgboss.setContent1(userInfo.getNickName() + workerId + "于"
|
| | | + TimeUtil.formatDateDot(userInviteSeparate.getCreateTime()) + "成功升级成为超级会员 ");
|
| | | msgboss.setContent2("很遗憾,你未能在"+limitDays+"天升级为超级会员 ");
|
| | | msgboss.setContent3("已与其脱离邀请关系");
|
| | | userOtherMsgNotificationService.teamSplitCallBoss(bossId, "如有疑问请联系我的-人工客服", msgboss);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
| | | */
|
| | | public ConfigParamsDTO getShowComputeRate(String platform, String version);
|
| | |
|
| | | /**
|
| | | * 获取基础的返利比例
|
| | | * |
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public BigDecimal getBaseFanliRate(long time);
|
| | |
|
| | | /**
|
| | | * 获取基础的返利比例
|
| | | * |
| | | * @return
|
| | | */
|
| | | public BigDecimal getBaseFanliRate();
|
| | |
|
| | | }
|
| | |
| | | import org.apache.ibatis.annotations.Param;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.dto.wx.WXAccountInfoDTO;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | |
| | |
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | |
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.exception.user.UserInfoException;
|
| | | import com.yeshi.fanli.vo.user.UserInfoVO;
|
| | |
| | | * @return
|
| | | */
|
| | | public List<UserInfoVO> query(long start, int count, Integer userState, String key, Integer keyType,
|
| | | String userRank, Integer days, String startTime, String endTime, Integer orderField, Integer orderMode,Integer userType);
|
| | | String userRank, Integer days, String startTime, String endTime, Integer orderField, Integer orderMode,
|
| | | Integer userType);
|
| | |
|
| | | public long queryCount(Integer userState, String key, Integer keyType, String userRank, Integer days,
|
| | | String startTime, String endTime,Integer userType);
|
| | |
| | | */
|
| | | public UserInfo selectAvailableByPrimaryKey(Long uid);
|
| | |
|
| | |
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.user.invite;
|
| | |
|
| | | import com.yeshi.fanli.dto.user.UserInviteLevelEnum;
|
| | |
|
| | | public interface UserInviteService {
|
| | | /**
|
| | | * 获取邀请等级
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public UserInviteLevelEnum getUserInviteLevel(Long uid);
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.service.inter.user.notify;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.notify.UserActivedRecord;
|
| | |
|
| | | public interface UserActivedRecordService {
|
| | |
|
| | | /**
|
| | | * 是否可以提醒用户添加导师
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public boolean canNotifyAddTearcher(Long uid);
|
| | |
|
| | | /**
|
| | | * 设置添加导师为已经提醒
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | public void setTearcherNotified(Long uid);
|
| | | |
| | | |
| | | /**
|
| | | * 添加数据
|
| | | * @param record
|
| | | */
|
| | | public void add(UserActivedRecord record);
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | |
|
| | | public static String YINGYONGBAO_LINK = "https://a.app.qq.com/o/simple.jsp?pkgname=com.yeshi.ec.rebate";
|
| | | public static String YINGYONGBAO_LINK = "https://w.url.cn/s/AHUuT7i";
|
| | |
|
| | | public final static String UIDAESKEY = "WW782ss@8*px/%2v";
|
| | |
|
| | |
| | | BigDecimal commission = CommonGoodsUtil.getCommission(goods, params.getFanLiRate());
|
| | | moneyInfoVO.setFanliMoney("¥" + commission);
|
| | |
|
| | | BigDecimal maxCommission = CommonGoodsUtil.getCommission(goods, params.getVipFanLiRate());
|
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | | else
|
| | | moneyInfoVO.setMaxMoney("¥" + CommonGoodsUtil.getCommission(goods, params.getVipFanLiRate()));
|
| | | moneyInfoVO.setMaxMoney("¥" + maxCommission);
|
| | |
|
| | | moneyInfoVO.setShareMoney(CommonGoodsUtil.getCommissionInfo(goods, params.getShareRate()));
|
| | |
|
| | | moneyInfoVO.setRateInfo("返利比 " + MoneyBigDecimalUtil.div(commission.multiply(new BigDecimal(100)),
|
| | | CommonGoodsUtil.getAfterUseCouplePrice(goods)) + "%");
|
| | | |
| | | moneyInfoVO.setMaxRateInfo("返利比 " + MoneyBigDecimalUtil.div(maxCommission.multiply(new BigDecimal(100)),
|
| | | CommonGoodsUtil.getAfterUseCouplePrice(goods)) + "%");
|
| | |
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
|
| | | // 券信息
|
| | |
| | | moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6
|
| | |
|
| | | BigDecimal commission = TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getFanLiRate());
|
| | |
|
| | | BigDecimal baseCommisstion = null;
|
| | | if (params.getBaseFanliRate() != null)
|
| | | baseCommisstion = TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getBaseFanliRate());
|
| | | moneyInfoVO.setFanliMoney("¥" + commission);
|
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | |
| | | BigDecimal maxRate = MoneyBigDecimalUtil.div(maxCommission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setMaxRateInfo("返利比 " + maxRate + "%");
|
| | | moneyInfoVO.setMaxMoney("¥" + maxCommission);
|
| | | if (baseCommisstion != null) {
|
| | | String desc = String.format("佣金¥ %s+平台补贴¥ %s", baseCommisstion.setScale(2).toString(),
|
| | | commission.subtract(baseCommisstion).setScale(2).toString());
|
| | | String maxDesc = String.format("佣金¥ %s+平台补贴¥ %s", baseCommisstion.setScale(2).toString(),
|
| | | maxCommission.subtract(baseCommisstion).setScale(2).toString());
|
| | | moneyInfoVO.setCompositionInfo(desc);
|
| | | moneyInfoVO.setMaxCompositionInfo(maxDesc);
|
| | | }
|
| | | }
|
| | |
|
| | | moneyInfoVO.setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, params.getShareRate()));
|
| | |
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
|
| | | // 券信息
|
| | |
| | | moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6
|
| | | BigDecimal commission = JDUtil.getGoodsFanLiMoney(goods, params.getFanLiRate());
|
| | | moneyInfoVO.setFanliMoney("¥" + commission);
|
| | | BigDecimal baseCommisstion = null;
|
| | | if (params.getBaseFanliRate() != null)
|
| | | baseCommisstion = JDUtil.getGoodsFanLiMoney(goods, params.getBaseFanliRate());
|
| | |
|
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | |
| | | BigDecimal maxRate = MoneyBigDecimalUtil.div(maxCommission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setMaxRateInfo("返利比 " + maxRate + "%");
|
| | | moneyInfoVO.setMaxMoney("¥" + maxCommission);
|
| | |
|
| | | if (baseCommisstion != null) {
|
| | | String desc = String.format("佣金¥ %s+平台补贴¥ %s", baseCommisstion.setScale(2).toString(),
|
| | | commission.subtract(baseCommisstion).setScale(2).toString());
|
| | | String maxDesc = String.format("佣金¥ %s+平台补贴¥ %s", baseCommisstion.setScale(2).toString(),
|
| | | maxCommission.subtract(baseCommisstion).setScale(2).toString());
|
| | | moneyInfoVO.setCompositionInfo(desc);
|
| | | moneyInfoVO.setMaxCompositionInfo(maxDesc);
|
| | | }
|
| | | }
|
| | | moneyInfoVO.setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(goods, params.getShareRate()));
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
| | | goodsInfo.setCouponInfo(coupon);
|
| | | }
|
| | |
|
| | | BigDecimal baseCommisstion = null;
|
| | | if (params.getBaseFanliRate() != null)
|
| | | baseCommisstion = PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getBaseFanliRate());
|
| | |
|
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | |
| | | moneyInfoVO.setMaxRateInfo("返利比 " + maxRate + "%");
|
| | |
|
| | | moneyInfoVO.setMaxMoney("¥" + maxCommission);
|
| | |
|
| | | if (baseCommisstion != null) {
|
| | | String desc = String.format("佣金¥ %s+平台补贴¥ %s", baseCommisstion.setScale(2).toString(),
|
| | | commission.subtract(baseCommisstion).setScale(2).toString());
|
| | | String maxDesc = String.format("佣金¥ %s+平台补贴¥ %s", baseCommisstion.setScale(2).toString(),
|
| | | maxCommission.subtract(baseCommisstion).setScale(2).toString());
|
| | | moneyInfoVO.setCompositionInfo(desc);
|
| | | moneyInfoVO.setMaxCompositionInfo(maxDesc);
|
| | | }
|
| | | }
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
|
| | |
| | | // }
|
| | | return goodsInfo;
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | |
|
| | | public static String convertLinkWithSubUnionId(String materialId, String couponUrl, String positionId,
|
| | | String subUnionId) {
|
| | | String log = "京东转链出错:";
|
| | | try {
|
| | | JSONObject json = new JSONObject();
|
| | | json.put("materialId", materialId);
|
| | | json.put("siteId", APP_ID);
|
| | |
| | |
|
| | | String result = baseRequest2("jd.union.open.promotion.bysubunionid.get", null, root);
|
| | |
|
| | | log += json.toString() + "####" + result;
|
| | | JSONObject resultJson = JSONObject.fromObject(result);
|
| | | result = resultJson.optJSONObject("jd_union_open_promotion_bysubunionid_get_response").optString("result");
|
| | | System.out.println(result);
|
| | |
| | |
|
| | | resultJson = JSONObject.fromObject(result);
|
| | | return resultJson.optJSONObject("data").optString("shortURL");
|
| | | } catch (Exception e) {
|
| | | LogHelper.error(log);
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static JDGoods queryGoodsDetail(Long skuId) {
|
| | |
| | | private String rateInfo;//比例信息
|
| | | @Expose
|
| | | private String rateInfoHelpUrl;//比例帮助链接
|
| | | @Expose
|
| | | private String compositionInfo;// 构成信息
|
| | |
|
| | | private String maxRateInfo;//最大比例信息
|
| | |
|
| | | private String maxCompositionInfo;//最大构成信息
|
| | |
|
| | | public String getMaxCompositionInfo() {
|
| | | return maxCompositionInfo;
|
| | | }
|
| | |
|
| | | public void setMaxCompositionInfo(String maxCompositionInfo) {
|
| | | this.maxCompositionInfo = maxCompositionInfo;
|
| | | }
|
| | |
|
| | | public String getCompositionInfo() {
|
| | | return compositionInfo;
|
| | | }
|
| | |
|
| | | public void setCompositionInfo(String compositionInfo) {
|
| | | this.compositionInfo = compositionInfo;
|
| | | }
|
| | |
|
| | | public String getMaxRateInfo() {
|
| | | return maxRateInfo;
|
New file |
| | |
| | | package com.yeshi.fanli.vo.user;
|
| | |
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class UserDialogBtnVO {
|
| | | private String name;
|
| | | private JumpDetailV2 jumpDetail;
|
| | | private JSONObject params;
|
| | |
|
| | | public UserDialogBtnVO(String name, JumpDetailV2 jumpDetail, JSONObject params) {
|
| | | super();
|
| | | this.name = name;
|
| | | this.jumpDetail = jumpDetail;
|
| | | this.params = params;
|
| | | }
|
| | |
|
| | | public String getName() {
|
| | | return name;
|
| | | }
|
| | |
|
| | | public void setName(String name) {
|
| | | this.name = name;
|
| | | }
|
| | |
|
| | | public JumpDetailV2 getJumpDetail() {
|
| | | return jumpDetail;
|
| | | }
|
| | |
|
| | | public void setJumpDetail(JumpDetailV2 jumpDetail) {
|
| | | this.jumpDetail = jumpDetail;
|
| | | }
|
| | |
|
| | | public JSONObject getParams() {
|
| | | return params;
|
| | | }
|
| | |
|
| | | public void setParams(JSONObject params) {
|
| | | this.params = params;
|
| | | }
|
| | | }
|
New file |
| | |
| | | package com.yeshi.fanli.vo.user;
|
| | |
|
| | | public class UserDialogVO {
|
| | | private String id;
|
| | | private boolean close;
|
| | | private String title;
|
| | | private String content;
|
| | | private UserDialogBtnVO positive;
|
| | | private UserDialogBtnVO negative;
|
| | |
|
| | | public UserDialogVO(String id, boolean close, String title, String content, UserDialogBtnVO positive,
|
| | | UserDialogBtnVO negative) {
|
| | | super();
|
| | | this.id = id;
|
| | | this.close = close;
|
| | | this.title = title;
|
| | | this.content = content;
|
| | | this.positive = positive;
|
| | | this.negative = negative;
|
| | | }
|
| | |
|
| | | public String getId() {
|
| | | return id;
|
| | | }
|
| | |
|
| | | public void setId(String id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | | public boolean isClose() {
|
| | | return close;
|
| | | }
|
| | |
|
| | | public void setClose(boolean close) {
|
| | | this.close = close;
|
| | | }
|
| | |
|
| | | public String getTitle() {
|
| | | return title;
|
| | | }
|
| | |
|
| | | public void setTitle(String title) {
|
| | | this.title = title;
|
| | | }
|
| | |
|
| | | public String getContent() {
|
| | | return content;
|
| | | }
|
| | |
|
| | | public void setContent(String content) {
|
| | | this.content = content;
|
| | | }
|
| | |
|
| | | public UserDialogBtnVO getPositive() {
|
| | | return positive;
|
| | | }
|
| | |
|
| | | public void setPositive(UserDialogBtnVO positive) {
|
| | | this.positive = positive;
|
| | | }
|
| | |
|
| | | public UserDialogBtnVO getNegative() {
|
| | | return negative;
|
| | | }
|
| | |
|
| | | public void setNegative(UserDialogBtnVO negative) {
|
| | | this.negative = negative;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | /**
|
| | | * 获取post返回location
|
| | | * |
| | | * @param url
|
| | | * @return
|
| | | */
|
| | |
| | | String result = HttpUtil.post(url, root.toString());
|
| | | }
|
| | |
|
| | | public static String getShortUrl(String accessToken, String url) {
|
| | |
|
| | | String requestUrl = "https://api.weixin.qq.com/cgi-bin/shorturl?access_token=" + accessToken;
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("action", "long2short");
|
| | | data.put("long_url", url);
|
| | | String result = HttpUtil.post(requestUrl, data.toString());
|
| | | System.out.println(result);
|
| | | return "";
|
| | | }
|
| | |
|
| | | }
|