| | |
| | | import com.yeshi.fanli.entity.bus.share.UserShareGoodsHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.CustomerContent;
|
| | | import com.yeshi.fanli.entity.system.CustomerName;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | |
| | |
|
| | | @RequestMapping("share")
|
| | | public String getShare(Model model, String uid) {
|
| | | String value = configService.get("share_message");
|
| | | String value = configService.get(ConfigKeyEnum.shareMessage.getKey());
|
| | | try {
|
| | | if (uid == null) {
|
| | | uid = "0";
|
| | |
| | |
|
| | | @RequestMapping("shares")
|
| | | public String getShares(Model model, String uid) {
|
| | | String value = configService.get("share_message");
|
| | | String value = configService.get(ConfigKeyEnum.shareMessage.getKey());
|
| | | try {
|
| | | if (uid == null) {
|
| | | uid = "0";
|
| | |
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.activity.ActivityService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.email.MailSenderUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/email")
|
| | |
| | |
|
| | | // 获取目标邮箱
|
| | | adminUser = adminUserService.selectByPrimaryKey(adminUser.getId());
|
| | | Config config = configService.getConfig("extract_code_email_from");
|
| | | Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey());
|
| | | String[] sts = config.getValue().split(",");
|
| | | String account = sts[0];
|
| | | String pwd = sts[1];
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.ExtractException;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.ObjectStateException;
|
| | |
| | | // 当前用户余额总计:所有用户总余额
|
| | | BigDecimal amountMoney = userInfoCountService.countAllMoney(null);
|
| | |
|
| | | // 可提现金额限制
|
| | | String minMoney = configService.get(Constant.EXTRACT_MIN_MONEY);
|
| | | // 可提现金额限制 |
| | | String minMoney = configService.get(ConfigKeyEnum.extractMoneyMin.getKey());
|
| | | if (minMoney == null) {
|
| | | minMoney = "0";
|
| | | }
|
| | |
| | | // long sameGoodsOrderCount =
|
| | | // commonOrderCountService.countSameGoodsOrderByUidAndHongBaoType(typeList,
|
| | | // record.getExtract().getUserInfo().getId(),
|
| | | // Integer.parseInt(configService.get("admin_min_same_goods_order_count")));
|
| | | // Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameGoodsOrderCount.getKey())));
|
| | | // long sameShopOrderCount =
|
| | | // commonOrderCountService.countSameShopOrderByUidAndHongBaoType(typeList,
|
| | | // record.getExtract().getUserInfo().getId(),
|
| | | // Integer.parseInt(configService.get("admin_min_same_shop_order_count")));
|
| | | // Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameShopOrderCount.getKey())));
|
| | | // if (sameGoodsOrderCount > 0 || sameShopOrderCount > 0) {
|
| | | // warnLevel = 3;
|
| | | // record.setExtraInfoStr(
|
| | |
| | | List<Integer> typeList = new ArrayList<>();
|
| | | typeList.add(HongBaoV2.TYPE_ZIGOU);
|
| | | long sameGoodsOrderCount = commonOrderCountService.countSameGoodsOrderByUidAndHongBaoType(typeList, uid,
|
| | | Integer.parseInt(configService.get("admin_min_same_goods_order_count")));
|
| | | Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameGoodsOrderCount.getKey())));
|
| | | long sameShopOrderCount = commonOrderCountService.countSameShopOrderByUidAndHongBaoType(typeList, uid,
|
| | | Integer.parseInt(configService.get("admin_min_same_shop_order_count")));
|
| | | Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameShopOrderCount.getKey())));
|
| | | if (sameGoodsOrderCount > 0 || sameShopOrderCount > 0) {
|
| | | String text = (String.format("同店铺:%s 同商品:%s", sameShopOrderCount, sameGoodsOrderCount));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(text));
|
| | |
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | | import com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanDrawBack;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.exception.order.CommonOrderException;
|
| | |
| | |
|
| | | if (riskType == 1) {
|
| | | listGoodsId = commonOrderCountService.getSameGoodsOrderByUidAndHongBaoType(typeList, uid,
|
| | | Integer.parseInt(configService.get("admin_min_same_goods_order_count")));
|
| | | Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameGoodsOrderCount.getKey())));
|
| | | if (listGoodsId == null || listGoodsId.isEmpty()) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无同商品订单"));
|
| | | return;
|
| | | }
|
| | | } else if (riskType == 2) {
|
| | | listShopId = commonOrderCountService.getSameShopOrderByUidAndHongBaoType(typeList, uid,
|
| | | Integer.parseInt(configService.get("admin_min_same_shop_order_count")));
|
| | | Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameShopOrderCount.getKey())));
|
| | | if (listShopId == null || listShopId.isEmpty()) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无同店铺订单"));
|
| | | return;
|
| | |
| | | import com.yeshi.fanli.entity.bus.lable.MergeClass;
|
| | | import com.yeshi.fanli.entity.bus.lable.QualityFactory;
|
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoHongBaoInfo;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | if (page == 1) {
|
| | | // 抽奖规则
|
| | | String rules = configService.get("free_goods_rule");
|
| | | String rules = configService.get(ConfigKeyEnum.freeGoodsRule.getKey());
|
| | | data.put("ruleLink", rules);
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.brand.BrandClass;
|
| | | import com.yeshi.fanli.entity.brand.TaoBaoShopHistory;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShop;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | |
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("bgPicture", configService.get("brand_background_picture"));
|
| | | data.put("bgPicture", configService.get(ConfigKeyEnum.brandBackgroundPicture.getKey()));
|
| | | data.put("count", list.size());
|
| | | data.put("list", JsonUtil.getApiCommonGson().toJson(list));
|
| | |
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.FloatAD.FloatADTypeEnum;
|
| | | 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.config.AppHomeFloatImg;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | }
|
| | |
|
| | | // 领券帮助链接,1.5.2后生效
|
| | | String couponHelp = configService.get("taobao_coupon_help");
|
| | | String couponHelp = configService.get(ConfigKeyEnum.taobaoCouponHelp.getKey());
|
| | | data.put("couponHelpUrl", couponHelp);
|
| | |
|
| | | // 底部网页链接
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equalsIgnoreCase(platform)) {
|
| | | data.put("htmlLink", configService.get("index_html_link_android"));
|
| | | data.put("htmlLink", configService.get(ConfigKeyEnum.indexHtmlLinkAndroid.getKey()));
|
| | | }
|
| | |
|
| | | // 判断新老用户
|
| | |
| | | data.put("userTimeType", 1);
|
| | | }
|
| | | data.put("hotFuctionLink",
|
| | | configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));//
|
| | | configService.getByVersion(ConfigKeyEnum.hotFunctionUrl.getKey(), platform, Integer.parseInt(acceptData.getVersion())));//
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | // 是否需要购物城转链
|
| | | boolean convert = "0".equalsIgnoreCase(configService.get("show_taobao_cart_convert")) ? false : true;
|
| | | boolean convert = "0".equalsIgnoreCase(configService.get(ConfigKeyEnum.showTaobaoCartConvert.getKey())) ? false : true;
|
| | |
|
| | | if (!"cart".equalsIgnoreCase(position) && !convert) {
|
| | | out.print(JsonUtil.loadFalseResult(""));
|
| | |
| | | clientTBPid = tbPidService.getAndroidDefault();
|
| | | }
|
| | |
|
| | | String cartJS = configService.get("taobao_cart_js");
|
| | | String cartUrl = configService.get("taobao_cart_link");
|
| | | String cartJS = configService.get(ConfigKeyEnum.taobaoCartJS.getKey());
|
| | | String cartUrl = configService.get(ConfigKeyEnum.taobaoCartLink.getKey());
|
| | | if (!convert)// 不转链
|
| | | {
|
| | | cartUrl = "http://";
|
| | |
| | |
|
| | | @RequestMapping(value = "getBindAccountConfig", method = RequestMethod.POST)
|
| | | public void getBindAccountConfig(AcceptData acceptData, PrintWriter out) {
|
| | | String alipayHelpUrl = configService.get("alipay_help");// 支付宝帮助
|
| | | String alipayBindFailUrl = configService.get("alipay_bind_fail_reason");// 支付宝绑定失败原因
|
| | | String alipayHelpUrl = configService.get(ConfigKeyEnum.alipayHelp.getKey());// 支付宝帮助
|
| | | String alipayBindFailUrl = configService.get(ConfigKeyEnum.alipayBindFailReason.getKey());// 支付宝绑定失败原因
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("alipayHelp", alipayHelpUrl);
|
| | | data.put("alipayBindFailReason", alipayBindFailUrl);
|
| | |
| | | public void getUserConfig(AcceptData acceptData, PrintWriter out) {
|
| | | try {
|
| | | // 用户协议链接
|
| | | String serviceProtocol = configService.get("service_protocol_link");
|
| | | String serviceProtocol = configService.get(ConfigKeyEnum.serviceProtocolLink.getKey());
|
| | | // 隐私条款链接
|
| | | String privacyProtocol = configService.get("privacy_protocol_link");
|
| | | 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.getByVersion("taobao_cart_jump_detail",
|
| | | JSONObject source = JSONObject.fromObject(configService.getByVersion(ConfigKeyEnum.taobaoCartJumpDetail.getKey(),
|
| | | acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())));
|
| | | data.put("taoBaoCart", source);
|
| | |
|
| | |
| | | @RequestMapping(value = "getOrderParseConfig", method = RequestMethod.POST)
|
| | | public void getOrderParseConfig(AcceptData acceptData, PrintWriter out) {
|
| | |
|
| | | if ("0".equalsIgnoreCase(configService.get("auto_find_taobao_order")))
|
| | | if ("0".equalsIgnoreCase(configService.get(ConfigKeyEnum.autoFindTaobaoOrder.getKey())))
|
| | | out.print(JsonUtil.loadFalseResult(1, "暂不支持"));
|
| | | else {
|
| | | String orderJS = configService.get("taobao_order_parse_js");
|
| | | String orderJS = configService.get(ConfigKeyEnum.taobaoOrderParseJS.getKey());
|
| | | JSONObject data = new JSONObject();
|
| | | try {
|
| | | data.put("orderJS", DESUtil.encode(orderJS, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | |
| | | public void getOrderConfig(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | // 测试
|
| | | data.put("showTaoBaoOrder", "0".equalsIgnoreCase(configService.get("show_taobao_order").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));
|
| | | }
|
| | |
| | | @RequestMapping(value = "getKeFuConfig", method = RequestMethod.POST)
|
| | | public void getKeFuConfig(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("meiqia", "1".equalsIgnoreCase(configService.get("kefu_meiqia")) ? true : false);// 是否跳转美洽,不跳转美洽就用原来的
|
| | | data.put("meiqia", "1".equalsIgnoreCase(configService.get(ConfigKeyEnum.kefuMeiqia.getKey())) ? true : false);// 是否跳转美洽,不跳转美洽就用原来的
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | // 设置消息已读
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
| | | @RequestMapping(value = "getInviteCodeInputHelp", method = RequestMethod.POST)
|
| | | public void getInviteCodeInputHelp(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("helpUrl", configService.get("invite_code_input_help"));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.inviteCodeInputHelp.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | |
| | | data.put("topBanner", pictureJson);
|
| | | }
|
| | |
|
| | | data.put("desc", configService.get("invite_desc"));
|
| | | data.put("desc", configService.get(ConfigKeyEnum.inviteDesc.getKey()));
|
| | |
|
| | | boolean hasCode = false;
|
| | | if (uid != null && uid.trim().length() > 0) {
|
| | |
| | |
|
| | | // 邀请激活链接
|
| | | if (!hasCode) {
|
| | | data.put("activationlink", configService.get("invite_activation_url"));
|
| | | data.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | }
|
| | |
|
| | | data.put("hasCode", hasCode);
|
| | |
| | | String valueN = values.getValue();
|
| | | String valueBr = valueN.replace("\n", "<br><br>");
|
| | |
|
| | | data.put("helpLink", configService.get("invite_help_link"));
|
| | | data.put("helpLink", configService.get(ConfigKeyEnum.inviteHelpLink.getKey()));
|
| | |
|
| | | data.put("inviteRules", valueBr);
|
| | | out.print(JsonUtil.loadTrue(0, JsonUtil.getSimpleGson().toJson(data), "成功"));
|
| | |
| | | @RequestMapping(value = "getActivationTip")
|
| | | public void getActivationTip(AcceptData acceptData, String callback, PrintWriter out) {
|
| | | try {
|
| | | String tip = configService.get("invite_activation_tip");
|
| | | String tip = configService.get(ConfigKeyEnum.inviteActivationTip.getKey());
|
| | | if (tip == null || tip.trim().length() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无提醒"));
|
| | | return;
|
| | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("邀请码不存在"));
|
| | | return;
|
| | | }
|
| | | String tip = configService.get("invite_activation_success_tip");
|
| | | String tip = configService.get(ConfigKeyEnum.inviteActivationSuccessTip.getKey());
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("inviteCode", inviteCode);
|
| | |
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.LostOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.order.LostOrderService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @RequestMapping("getConfig")
|
| | | public void getConfig(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("what", configService.get("lost_order_help_what"));
|
| | | data.put("reason", configService.get("lost_order_help_reason"));
|
| | | data.put("what", configService.get(ConfigKeyEnum.lostOrderHelpWhat.getKey()));
|
| | | data.put("reason", configService.get(ConfigKeyEnum.lostOrderHelpReason.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.push.PushGoodsGroup;
|
| | | import com.yeshi.fanli.entity.push.PushGoodsRecord;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.push.PushGoodsGroupException;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | |
| | | Integer.parseInt(acceptData.getVersion()));
|
| | |
|
| | | } else {
|
| | | String url = configService.get("push_goods_details");
|
| | | String url = configService.get(ConfigKeyEnum.pushGoodsDetails.getKey());
|
| | | if (url == null) {
|
| | | url = "";
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.goods.ScanHistoryV2;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | | import com.yeshi.fanli.entity.taobao.PidUser;
|
| | |
| | |
|
| | | // taoBaoGoodsBriefExtra.setAuctionUrl(null);
|
| | | data.put("taobao", taobaoJson);
|
| | | String info = configService.get("detail_prompt");
|
| | | String info = configService.get(ConfigKeyEnum.detailPrompt.getKey());
|
| | | data.put("info", info);
|
| | | String onlyInfo = configService.get("only_info");
|
| | | String onlyInfo = configService.get(ConfigKeyEnum.onlyInfo.getKey());
|
| | | data.put("only", onlyInfo);
|
| | | data.put("helpUrl", configService.get("old_goods_detail_help_url"));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.oldGoodsDetailHelpUrl.getKey()));
|
| | |
|
| | | int showType = taoBaoGoodsBriefExtra.getShowType();
|
| | | String price = "";
|
| | |
| | | data.put("shareTitle", taoBaoGoodsBriefExtra.getTitle());
|
| | | data.put("shareContent", "¥" + price + "元");
|
| | | data.put("shareImg", taoBaoGoodsBriefExtra.getPictUrl());
|
| | | String html = configService.get("downAPP");
|
| | | String html = configService.get(ConfigKeyEnum.downAPP.getKey());
|
| | | data.put("downAPP", html);
|
| | | String shareSinaContent = configService.get("shareSinaContent");
|
| | | data.put("shareSina",
|
| | |
| | | JSONObject invite = new JSONObject();
|
| | | JumpDetailV2 jumpDetail = jumpDetailV2Service.getByTypeCache("invite");
|
| | | invite.put("jumpDetail", jumpDetail);
|
| | | invite.put("picture", configService.get("home_invite_banner"));
|
| | | invite.put("picture", configService.get(ConfigKeyEnum.homeInviteBanner.getKey()));
|
| | |
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
|
| | |
| | | // 4、IOS的底部网页链接
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("ios".equalsIgnoreCase(platform)) {
|
| | | root.put("htmlLink", configService.get("index_html_link_ios"));
|
| | | root.put("htmlLink", configService.get(ConfigKeyEnum.indexHtmlLinkIos.getKey()));
|
| | | }
|
| | |
|
| | | root.put("spikeGoods", getSpikeGoodsContent(acceptData));
|
| | |
| | | .toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
|
| | | goods.put("jumpDetail", jumpDetail);
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link") + "?id=" + taoBaoGoodsBrief.getAuctionId());
|
| | | params.put("url", configService.get(ConfigKeyEnum.spikeGoodsLink.getKey()) + "?id=" + taoBaoGoodsBrief.getAuctionId());
|
| | | goods.put("params", params);
|
| | |
|
| | | // 1.5.4及以后返回
|
| | |
| | | root.put("listgoods", array);
|
| | |
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link"));
|
| | | params.put("url", configService.get(ConfigKeyEnum.spikeGoodsLink.getKey()));
|
| | |
|
| | | root.put("params", params);
|
| | | root.put("jumpDetail", jumpDetail);
|
| | |
| | | }
|
| | |
|
| | | } else if (from != null && from.equals("taolijin_buy")) {
|
| | | noRebateHelpLink = configService.get("zigoulijian_nofanli_help");
|
| | | noRebateHelpLink = configService.get(ConfigKeyEnum.zigoulijianNofanliHelp.getKey());
|
| | | // 查询分享库
|
| | | TLJBuyGoods buyGoods = tljBuyGoodsService.selectByAuctionIdAndDay(goods.getAuctionId(),
|
| | | TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy-MM-dd"));
|
| | |
| | | if (!StringUtil.isNullOrEmpty(noRebateHelpLink)) {
|
| | | data.put("noRebateHelpLink", noRebateHelpLink);
|
| | | } else {
|
| | | data.put("noRebateHelpLink", configService.get("no_rebate_help_link"));
|
| | | data.put("noRebateHelpLink", configService.get(ConfigKeyEnum.noRebateHelpLink.getKey()));
|
| | | }
|
| | |
|
| | | // 取消分享活动
|
| | |
| | | @RequestSerializableByKey(key = "#phone+'-'+#uid+'-'+#type")
|
| | | @RequestMapping(value = "sendSMS", method = RequestMethod.POST)
|
| | | public void sendMSM(AcceptData acceptData, String phone, Long uid, Integer type, PrintWriter out) {
|
| | | if (Constant.IS_TEST) {
|
| | | out.print(JsonUtil.loadTrueResult("发送成功"));
|
| | | return;
|
| | | }
|
| | | sendMSM(acceptData, phone, uid, type, StringUtil.Md5(phone + "-" + "-" + uid + "-" + type), out);
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.recommend.Honest;
|
| | | import com.yeshi.fanli.entity.bus.search.HotSearch;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.PidUser;
|
| | | import com.yeshi.fanli.entity.taobao.SearchFilter;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | |
| | | provinceId = array.optJSONObject(i).optInt("id");
|
| | | } else if ("tkRate1".equalsIgnoreCase(ty)) {
|
| | | // 获取对应参数
|
| | | String value = configService.get("tkRate_range");
|
| | | String value = configService.get(ConfigKeyEnum.tkRateRange.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | JSONArray tkRatearray = JSONArray.fromObject(value);
|
| | | if (tkRatearray != null) {
|
| | |
| | | }
|
| | | } else if ("tkRate2".equalsIgnoreCase(ty)) {
|
| | | // 获取对应参数
|
| | | String value = configService.get("tkRate_range");
|
| | | String value = configService.get(ConfigKeyEnum.tkRateRange.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | JSONArray tkRatearray = JSONArray.fromObject(value);
|
| | | if (tkRatearray != null) {
|
| | |
| | | }
|
| | | } else if ("tkRate3".equalsIgnoreCase(ty)) {
|
| | | // 获取对应参数
|
| | | String value = configService.get("tkRate_range");
|
| | | String value = configService.get(ConfigKeyEnum.tkRateRange.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | JSONArray tkRatearray = JSONArray.fromObject(value);
|
| | | if (tkRatearray != null) {
|
| | |
| | | }
|
| | | } else if ("tkRate4".equalsIgnoreCase(ty)) {
|
| | | // 获取对应参数
|
| | | String value = configService.get("tkRate_range");
|
| | | String value = configService.get(ConfigKeyEnum.tkRateRange.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | JSONArray tkRatearray = JSONArray.fromObject(value);
|
| | | if (tkRatearray != null) {
|
| | |
| | | }
|
| | | } else if ("tkRate5".equalsIgnoreCase(ty)) {
|
| | | // 获取对应参数
|
| | | String value = configService.get("tkRate_range");
|
| | | String value = configService.get(ConfigKeyEnum.tkRateRange.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | JSONArray tkRatearray = JSONArray.fromObject(value);
|
| | | if (tkRatearray != null) {
|
| | |
| | | */
|
| | | public void setSearchTkRate(int i, SearchFilter sf) {
|
| | | // 获取对应参数
|
| | | String value = configService.get("tkRate_range");
|
| | | String value = configService.get(ConfigKeyEnum.tkRateRange.getKey());
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | |
|
| | |
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.fasterxml.jackson.core.util.VersionUtil;
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.JsonElement;
|
| | |
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.dynamic.DynamicInfo;
|
| | | import com.yeshi.fanli.entity.dynamic.GoodsPicture;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.util.cache.TaoBaoGoodsCacheUtil;
|
| | | import com.yeshi.fanli.util.factory.MonitorFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
| | |
|
| | | data.put("clickUrl", url);
|
| | | data.put("token", TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
|
| | | data.put("rule", configService.get("share_single_goods_rule"));
|
| | | data.put("rule", configService.get(ConfigKeyEnum.shareSingleGoodsRule.getKey()));
|
| | | data.put("pictUrl", TbImgUtil.getTBSizeImg(taoBaoLink.getGoods().getPictUrl(), 500));
|
| | |
|
| | | String shareText = "";
|
| | |
| | | if (StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) {
|
| | | String text = shareGoodsTextTemplateService.getCommonTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(text))
|
| | | text = configService.get("goods_share_text_nocoupon");
|
| | | text = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey());
|
| | | shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle()).replace("{商品原价}",
|
| | | MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "");
|
| | | } else// 有券
|
| | | {
|
| | | String text = shareGoodsTextTemplateService.geteCouponTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(text))
|
| | | text = configService.get("goods_share_text_coupon");
|
| | | text = configService.get(ConfigKeyEnum.goodsShareTextCoupon.getKey());
|
| | |
|
| | | shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle())
|
| | | .replace("{商品原价}", MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "")
|
| | |
| | | descText = descText.substring(0);
|
| | | data.put("descText", descText);
|
| | | //
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size())
|
| | | data.put("notifyPicture", array.optString(p));
|
| | | data.put("notifyDesc", configService.get("goods_share_notify"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | | BigDecimal rate = hongBaoManageService.getShareRate();
|
| | |
| | | if (StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) {
|
| | | String text = shareGoodsTextTemplateService.getCommonTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(text))
|
| | | text = configService.get("goods_share_text_nocoupon");
|
| | | text = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey());
|
| | | shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle()).replace("{商品原价}",
|
| | | MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "");
|
| | | } else// 有券
|
| | |
| | | descText = descText.substring(0);
|
| | | data.put("descText", descText);
|
| | |
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size())
|
| | | data.put("notifyPicture", array.optString(p));
|
| | | data.put("notifyDesc", configService.get("goods_share_notify"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | | BigDecimal rate = hongBaoManageService.getShareRate();
|
| | |
| | | } else {
|
| | | String template = shareGoodsTextTemplateService.geteCouponTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(template))
|
| | | template = configService.get("goods_share_text_coupon");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCoupon.getKey());
|
| | | return template;
|
| | | }
|
| | |
|
| | | } else {
|
| | | String template = shareGoodsTextTemplateService.getCommonTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(template))
|
| | | template = configService.get("goods_share_text_nocoupon");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey());
|
| | | return template;
|
| | | }
|
| | | }
|
| | |
| | | if (tljId != null) {
|
| | | out.print(JsonUtil.loadTrueResult(configTaoLiJinService.getValueByKey("share_goods_rules", new Date())));
|
| | | } else {
|
| | | out.print(JsonUtil.loadTrueResult(configService.get("share_goods_template_rules")));
|
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRules.getKey())));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | data.put("shareMoney", new BigDecimal(content.substring(index + 1, content.length())).toString());
|
| | |
|
| | | // 分享提醒
|
| | | data.put("notifyDesc", configService.get("goods_share_notify"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | | // 分享提示语
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | |
| | | TaoBaoGoodsBrief goods = taoBaoLink.getGoods();
|
| | | if (!com.yeshi.fanli.util.VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(),
|
| | | acceptData.getVersion()))
|
| | | data.put("clickUrl", ShareControllerV2.getERCodeContent(configService.get("taobao_share_qrcode_text"), goods, taoBaoLink.getTaoToken()));
|
| | | data.put("clickUrl", ShareControllerV2.getERCodeContent(configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()), goods, taoBaoLink.getTaoToken()));
|
| | |
|
| | | data.put("token", TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
|
| | |
|
| | | String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
|
| | | // 测试
|
| | | List<String> commentTexts = new ArrayList<>();
|
| | | String commentTextStr = configService.get("share_single_goods_comment_text");
|
| | | String commentTextStr = configService.get(ConfigKeyEnum.shareSingleGoodsCommentText.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(commentTextStr)) {
|
| | | JSONArray arr = JSONArray.fromObject(commentTextStr);
|
| | | for (int i = 0; i < arr.size(); i++) {
|
| | |
| | | }
|
| | | }
|
| | | data.put("commentTexts", commentTexts);
|
| | | data.put("wxErCode", ShareControllerV2.getERCodeContent(configService.get("taobao_share_qrcode_text"), goods, taoBaoLink.getTaoToken()));
|
| | | data.put("wxErCode", ShareControllerV2.getERCodeContent(configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()), goods, taoBaoLink.getTaoToken()));
|
| | | }
|
| | |
|
| | | } else if (cid == 4) { // 邀请分享
|
| | |
| | | + Constant.systemCommonConfig.getProjectName() + "/client/threeShareNew?uid=" + uid);
|
| | | data.put("inviteLink", shortLink);
|
| | | data.put("inviteCode", inviteCode);
|
| | | data.put("helpLink", configService.get("invite_help_link"));
|
| | | data.put("helpLink", configService.get(ConfigKeyEnum.inviteHelpLink.getKey()));
|
| | | }
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.push.DeviceActive;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.CustomerContent;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | if (ssp.getKey().equalsIgnoreCase("iosonling") && "ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
|
| | | ssp.setValue("1");
|
| | | } else if (ssp.getKey().equalsIgnoreCase("home_weex_url")) {
|
| | | } else if (ssp.getKey().equalsIgnoreCase(ConfigKeyEnum.homeWeexUrl.getKey())) {
|
| | | if (("android".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && Integer.parseInt(acceptData.getVersion()) < 36)) {
|
| | | // 老版本weex(1.5.1之前的)
|
| | |
| | | @Resource
|
| | | private DeviceActiveService deviceActiveService;
|
| | |
|
| | | private static final String PASSWORD_MAX_ERROR = "password_max_error";
|
| | | private static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | | private static final String EXTRACT_MAX_MONEY = "extract_max_money";
|
| | |
|
| | | /**
|
| | | *
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (!"1".equalsIgnoreCase(configService.get("open_speical_and_relation_apply"))) {
|
| | | if (!"1".equalsIgnoreCase(configService.get(ConfigKeyEnum.openSpeicalAndRelationApply.getKey()))) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "暂不开放申请"));
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | boolean canParse = "0".equalsIgnoreCase(configService.get("auto_find_taobao_order")) ? false : true;
|
| | | boolean canParse = "0".equalsIgnoreCase(configService.get(ConfigKeyEnum.autoFindTaobaoOrder.getKey())) ? false : true;
|
| | |
|
| | | String link = TaoBaoUtil.getTaoBaoUnionAuthUrl(TaoBaoConstant.TAOBAO_AUTH_APPKEY,
|
| | | "http://api.flqapp.com/fanli/client/v1/auth/callback/tb", uid, source);
|
| | |
|
| | | String orderJS = configService.get("taobao_order_parse_js");
|
| | | String orderJS = configService.get(ConfigKeyEnum.taobaoOrderParseJS.getKey());
|
| | | if (!canParse)
|
| | | orderJS = "-";
|
| | | JSONObject data = new JSONObject();
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.DeviceLotteryRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserLotteryRecord;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon;
|
| | | import com.yeshi.fanli.exception.user.UserLotteryRecordException;
|
| | | import com.yeshi.fanli.exception.user.UserSystemCouponException;
|
| | |
| | | }
|
| | |
|
| | | JSONObject dataTip = new JSONObject();
|
| | | dataTip.put("content", configService.get("free_coupon_tip"));
|
| | | dataTip.put("content", configService.get(ConfigKeyEnum.freeCouponTip.getKey()));
|
| | | dataTip.put("fontColor", "#F14242");
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("helpLink", configService.get("free_coupon_help"));
|
| | | data.put("helpLink", configService.get(ConfigKeyEnum.freeCouponHelp.getKey()));
|
| | | data.put("tip", dataTip);
|
| | | data.put("count", resultList.size());
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(resultList));
|
| | |
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("helpLink", configService.get("reward_coupon_help"));
|
| | | data.put("helpLink", configService.get(ConfigKeyEnum.rewardCouponHelp.getKey()));
|
| | | data.put("count", resultList.size());
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(resultList));
|
| | |
|
| | |
| | | count = count - list.size();
|
| | | }
|
| | | // 抽奖规则
|
| | | String lotteryRule = configService.get("lottery_rule_newbies");
|
| | | String lotteryRule = configService.get(ConfigKeyEnum.lotteryRuleNewbies.getKey());
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | |
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.exception.goods.CollectionGoodsException;
|
| | |
| | | @Resource
|
| | | private RedPackForbidService redPackForbidService;
|
| | |
|
| | | private static final String PASSWORD_MAX_ERROR = "password_max_error";
|
| | | private static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | | private static final String EXTRACT_MAX_MONEY = "extract_max_money";
|
| | | private static final String EXTRACT_MIN_MONEY = ConfigKeyEnum.extractMoneyMin.getKey(); |
| | | private static final String EXTRACT_MAX_MONEY = ConfigKeyEnum.extractMoneyMAX.getKey();
|
| | |
|
| | | /**
|
| | | * 获取用户信息
|
| | |
| | | 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"));
|
| | | data.put("inviteList", configService.get(ConfigKeyEnum.teamList.getKey()));
|
| | |
|
| | | // 界面状态
|
| | | UserSettingsVO mySettings = null;
|
| | |
| | | data.put("maxError", 1);
|
| | | String minMoney = configService.get(EXTRACT_MIN_MONEY); // 单笔提现的最小金额
|
| | | String maxMoney = configService.get(EXTRACT_MAX_MONEY); // 单笔提现的最小金额
|
| | | String maxDayMoney = configService.get("extract_money_day"); // 每日最大提现金额
|
| | | int maxDayCount = Integer.parseInt(configService.get("extract_count_day"));
|
| | | String maxDayMoney = configService.get(ConfigKeyEnum.extractMoneyDay.getKey()); // 每日最大提现金额
|
| | | int maxDayCount = Integer.parseInt(configService.get(ConfigKeyEnum.extractDayCount.getKey()));
|
| | | ExtractRecord extractRecord = extractRecordService.getExtractRecordByUid(uid);
|
| | | boolean canExtract = true;
|
| | | String errorMsg = "";
|
| | |
| | | }
|
| | |
|
| | | String minMoney = configService.get(EXTRACT_MIN_MONEY); // 单笔提现的最小金额
|
| | | String maxDayMoney = configService.get("extract_money_day"); // 每日最大提现金额
|
| | | int maxDayCount = Integer.parseInt(configService.get("extract_count_day"));
|
| | | String maxDayMoney = configService.get(ConfigKeyEnum.extractMoneyDay.getKey()); // 每日最大提现金额
|
| | | int maxDayCount = Integer.parseInt(configService.get(ConfigKeyEnum.extractDayCount.getKey()));
|
| | | ExtractRecord extractRecord = extractRecordService.getExtractRecordByUid(uid);
|
| | | boolean canExtract = true;
|
| | | String errorMsg = "";
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | // 判断手机验证码的正确性
|
| | | String oldCode = redisManager.getSMSVCode(user.getPhone(), SMSHistory.TYPE_LOGIN);
|
| | | if (StringUtil.isNullOrEmpty(oldCode) || !oldCode.equalsIgnoreCase(vcode)) {
|
| | | out.print(JsonUtil.loadFalseResult(90001, "验证码错误"));
|
| | | return;
|
| | | |
| | | if (!Constant.IS_TEST) {
|
| | | // 判断手机验证码的正确性
|
| | | String oldCode = redisManager.getSMSVCode(user.getPhone(), SMSHistory.TYPE_LOGIN);
|
| | | if (StringUtil.isNullOrEmpty(oldCode) || !oldCode.equalsIgnoreCase(vcode)) {
|
| | | out.print(JsonUtil.loadFalseResult(90001, "验证码错误"));
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | |
| | | }
|
| | |
|
| | | long[] targetUids = new long[] { 3L, 4L };
|
| | | Config config = configService.getConfig("extract_code_email_from");
|
| | | Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey());
|
| | | String[] sts = config.getValue().split(",");
|
| | | String account = sts[0];
|
| | | String pwd = sts[1];
|
| | |
| | | bossData.put("inviteTime", "邀请时间: " + sdf.format(inviteTime));
|
| | | }
|
| | |
|
| | | String helpLink = configService.get("team_help_url");
|
| | | String helpLink = configService.get(ConfigKeyEnum.teamHelpUrl.getKey());
|
| | | if (helpLink == null) {
|
| | | helpLink = "";
|
| | | }
|
| | |
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | | // 邀请激活链接
|
| | | resultData.put("activationlink", configService.get("invite_activation_url"));
|
| | | resultData.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | }
|
| | | resultData.put("hasCode", hasCode);
|
| | |
|
| | |
| | | bossData.put("inviteTime", "邀请时间: " + sdf.format(inviteTime));
|
| | | }
|
| | |
|
| | | String helpLink = configService.get("team_help_url");
|
| | | String helpLink = configService.get(ConfigKeyEnum.teamHelpUrl.getKey());
|
| | | if (helpLink == null) {
|
| | | helpLink = "";
|
| | | }
|
| | |
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | | // 邀请激活链接
|
| | | resultData.put("activationlink", configService.get("invite_activation_url"));
|
| | | resultData.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | }
|
| | | resultData.put("hasCode", hasCode);
|
| | |
|
| | |
| | |
|
| | | JSONObject resultData = new JSONObject();
|
| | |
|
| | | String helpLink = configService.get("team_help_url");
|
| | | String helpLink = configService.get(ConfigKeyEnum.teamHelpUrl.getKey());
|
| | | if (helpLink == null) {
|
| | | helpLink = "";
|
| | | }
|
| | |
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | | // 邀请激活链接
|
| | | resultData.put("activationlink", configService.get("invite_activation_url"));
|
| | | resultData.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | }
|
| | | resultData.put("hasCode", hasCode);
|
| | |
|
| | |
| | | if (inviteCode == null || inviteCode.trim().length() == 0) {
|
| | | // 无邀请码
|
| | | inviteData.put("content", "邀请激活");
|
| | | inviteData.put("link", configService.get("invite_activation_url"));
|
| | | inviteData.put("link", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | } else {
|
| | | // 已有邀请码
|
| | | inviteData.put("content", "邀请码");
|
| | | inviteData.put("link", configService.get("invite_activation_success_url"));
|
| | | inviteData.put("link", configService.get(ConfigKeyEnum.inviteActivationSuccessUrl.getKey()));
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | |
| | | else
|
| | | vo.setAutoExtract(false);
|
| | |
|
| | | vo.setAutoExtractHelpUrl(configService.get("auto_extract_help_url"));
|
| | | vo.setAutoExtractHelpUrl(configService.get(ConfigKeyEnum.autoExtractHelpUrl.getKey()));
|
| | | vo.setOpenAutoExtractMsg("自动提现必须要微信授权,当账户中的余额≥2元时,系统在保障你资金安全的情况下,以微信红包的形式完成提现");
|
| | | vo.setCloseAutoExtractMsg("关闭自动提现后,60天以内将不自动提现,60天后系统将会自动开启,敬请知晓");
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.exception.order.CommonOrderException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (state ==null && page == 1) {
|
| | | if (redisManager.frequencyLimit("orderlist-" + acceptData.getDevice(), 8, 4)||count==0L) {// 8秒内请求3次触发
|
| | | orderFindUrl = configService.get("order_find_notify_url");
|
| | | orderFindUrl = configService.get(ConfigKeyEnum.orderFindNotifyUrl.getKey());
|
| | | }
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(list));
|
| | | data.put("helpUrl", configService.get("order_list_help"));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.orderListHelp.getKey()));
|
| | |
|
| | | if (type != null && type == 1) {
|
| | | data.put("todayMoney", "预估返利总额 ¥" + todayMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | 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.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | |
| | | }
|
| | |
|
| | | // 领券帮助链接,1.5.2后生效
|
| | | String couponHelp = configService.get("taobao_coupon_help");
|
| | | String couponHelp = configService.get(ConfigKeyEnum.taobaoCouponHelp.getKey());
|
| | | data.put("couponHelpUrl", couponHelp);
|
| | |
|
| | | // 底部网页链接
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equalsIgnoreCase(platform)) {
|
| | | data.put("htmlLink", configService.get("index_html_link_android"));
|
| | | data.put("htmlLink", configService.get(ConfigKeyEnum.indexHtmlLinkAndroid.getKey()));
|
| | | }
|
| | |
|
| | | // 判断新老用户
|
| | |
| | | data.put("userTimeType", 1);
|
| | | }
|
| | | data.put("hotFuctionLink",
|
| | | configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));
|
| | | configService.getByVersion(ConfigKeyEnum.hotFunctionUrl.getKey(), platform, Integer.parseInt(acceptData.getVersion())));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("listAD", JsonUtil.getApiCommonGson().toJson(listVO));
|
| | | data.put("protocol", configService.get("user_protocol_home_data"));
|
| | | data.put("protocol", configService.get(ConfigKeyEnum.userProtocolHomeData.getKey()));
|
| | |
|
| | | // 领券帮助链接,1.5.2后生效
|
| | | String couponHelp = configService.get("taobao_coupon_help");
|
| | | String couponHelp = configService.get(ConfigKeyEnum.taobaoCouponHelp.getKey());
|
| | | data.put("couponHelpUrl", couponHelp);
|
| | |
|
| | | // 判断新老用户 显示热门功能按钮滑动
|
| | |
| | | // 是否显示热门功能按钮
|
| | | String platform = acceptData.getPlatform();
|
| | | data.put("hotFuctionLink",
|
| | | configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));
|
| | | configService.getByVersion(ConfigKeyEnum.hotFunctionUrl.getKey(), platform, Integer.parseInt(acceptData.getVersion())));
|
| | | if (StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | else
|
| | |
| | | }
|
| | |
|
| | | // 是否需要购物城转链
|
| | | boolean convert = "0".equalsIgnoreCase(configService.get("show_taobao_cart_convert")) ? false : true;
|
| | | boolean convert = "0".equalsIgnoreCase(configService.get(ConfigKeyEnum.showTaobaoCartConvert.getKey())) ? false : true;
|
| | |
|
| | | if (!"cart".equalsIgnoreCase(position) && !convert) {
|
| | | out.print(JsonUtil.loadFalseResult(""));
|
| | |
| | | clientTBPid = tbPidService.getAndroidDefault();
|
| | | }
|
| | |
|
| | | String cartJS = configService.get("taobao_cart_js");
|
| | | String cartUrl = configService.get("taobao_cart_link");
|
| | | String cartJS = configService.get(ConfigKeyEnum.taobaoCartJS.getKey());
|
| | | String cartUrl = configService.get(ConfigKeyEnum.taobaoCartLink.getKey());
|
| | | if (!convert)// 不转链
|
| | | {
|
| | | cartUrl = "http://";
|
| | |
| | |
|
| | | @RequestMapping(value = "getBindAccountConfig", method = RequestMethod.POST)
|
| | | public void getBindAccountConfig(AcceptData acceptData, PrintWriter out) {
|
| | | String alipayHelpUrl = configService.get("alipay_help");// 支付宝帮助
|
| | | String alipayBindFailUrl = configService.get("alipay_bind_fail_reason");// 支付宝绑定失败原因
|
| | | String alipayHelpUrl = configService.get(ConfigKeyEnum.alipayHelp.getKey());// 支付宝帮助
|
| | | String alipayBindFailUrl = configService.get(ConfigKeyEnum.alipayBindFailReason.getKey());// 支付宝绑定失败原因
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("alipayHelp", alipayHelpUrl);
|
| | | data.put("alipayBindFailReason", alipayBindFailUrl);
|
| | |
| | | public void getUserConfig(AcceptData acceptData, PrintWriter out) {
|
| | | try {
|
| | | // 用户协议链接
|
| | | String serviceProtocol = configService.get("service_protocol_link");
|
| | | String serviceProtocol = configService.get(ConfigKeyEnum.serviceProtocolLink.getKey());
|
| | | // 隐私条款链接
|
| | | String privacyProtocol = configService.get("privacy_protocol_link");
|
| | | 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("taobao_cart_jump_detail"));
|
| | | JSONObject source = JSONObject.fromObject(configService.get(ConfigKeyEnum.taobaoCartJumpDetail.getKey()));
|
| | | data.put("taoBaoCart", source);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | |
| | |
|
| | | switch (type) {
|
| | | case Constant.SOURCE_TYPE_TAOBAO:
|
| | | if ("0".equalsIgnoreCase(configService.get("auto_find_taobao_order")))
|
| | | if ("0".equalsIgnoreCase(configService.get(ConfigKeyEnum.autoFindTaobaoOrder.getKey())))
|
| | | out.print(JsonUtil.loadFalseResult(1, "暂不支持"));
|
| | | else {
|
| | | String orderJS = configService.get("taobao_order_parse_js");
|
| | | String orderJS = configService.get(ConfigKeyEnum.taobaoOrderParseJS.getKey());
|
| | | JSONObject data = new JSONObject();
|
| | | try {
|
| | | data.put("orderJS", DESUtil.encode(orderJS, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | |
| | | public void getOrderConfig(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | // 测试
|
| | | data.put("showTaoBaoOrder", "0".equalsIgnoreCase(configService.get("show_taobao_order").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));
|
| | | }
|
| | |
| | | @RequestMapping(value = "getKeFuConfig", method = RequestMethod.POST)
|
| | | public void getKeFuConfig(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("meiqia", "1".equalsIgnoreCase(configService.get("kefu_meiqia")) ? true : false);// 是否跳转美洽,不跳转美洽就用原来的
|
| | | data.put("meiqia", "1".equalsIgnoreCase(configService.get(ConfigKeyEnum.kefuMeiqia.getKey())) ? true : false);// 是否跳转美洽,不跳转美洽就用原来的
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | // 设置消息已读
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
| | | @RequestMapping(value = "getInviteCodeInputHelp", method = RequestMethod.POST)
|
| | | public void getInviteCodeInputHelp(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("helpUrl", configService.get("invite_code_input_help"));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.inviteCodeInputHelp.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.dynamic.DynamicInfo;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.dynamic.ArticleOfficialService;
|
| | |
| | | @RequestMapping(value = "getArticleHot", method = RequestMethod.POST)
|
| | | public void getArticleHot(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("words", configService.get("article_hot_words"));
|
| | | data.put("words", configService.get(ConfigKeyEnum.articleHotWords.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoodsClass;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.entity.taobao.ClientTBPid;
|
| | | import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
|
| | |
| | | "¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
|
| | | if (TaoBaoUtil.isYUShou(goods)) {
|
| | | if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
|
| | |
| | | moneyType = 2;
|
| | | fanliValid = true;
|
| | | shareValid = false;
|
| | | helpLink = configService.get("zigoulijian_nofanli_help");
|
| | | helpLink = configService.get(ConfigKeyEnum.zigoulijianNofanliHelp.getKey());
|
| | |
|
| | | BigDecimal tljHongBao = TaoBaoUtil.getGoodsHongBaoMoney(goods, TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE);
|
| | |
|
| | |
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
|
| | | else
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | | rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | |
| | |
|
| | | // 分享路径
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | // 分享路径
|
| | |
| | | .setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
|
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | |
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
|
| | | else
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | |
|
| | |
| | | List<ShamUser> listShareUser = new ArrayList<ShamUser>();
|
| | |
|
| | | // 京东开启分享
|
| | | String open = configService.get("share_jd_open");
|
| | | String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
|
| | | if ("1".equals(open.trim())) {
|
| | | extraVO.setShareValid(true);
|
| | | MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
|
| | |
| | | extraVO.setFanliValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get(ConfigKeyEnum.goodsDetailFanliRateHelpUrl.getKey()));
|
| | |
|
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | |
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | params1.put("url", configService.get(ConfigKeyEnum.specialGuideRewardCouponLink.getKey()));
|
| | | else
|
| | | params1.put("url", userVipConfigService.getValueByKey("vip_link"));
|
| | |
|
| | |
| | | extraVO.setShareValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | public void changeSex(AcceptData acceptData, Integer sex, PrintWriter out) {
|
| | | try {
|
| | | // 获取设备定义性别
|
| | | int deviceSex = deviceSexService.changeDeviceSex(sex, acceptData.getDevice());
|
| | | deviceSexService.save(acceptData.getDevice(), sex);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("sex", deviceSex);
|
| | | data.put("sex", sex);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("切换失败"));
|
| | |
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | |
|
| | | // 设置为通用
|
| | | deviceSexService.changeDeviceSex(0, acceptData.getDevice());
|
| | | deviceSexService.save(acceptData.getDevice(), 0);
|
| | |
|
| | | } catch (HomeNavbarUserException e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | // 设置为通用
|
| | | deviceSexService.changeDeviceSex(0, acceptData.getDevice());
|
| | | deviceSexService.save(acceptData.getDevice(), 0);
|
| | |
|
| | | } catch (HomeNavbarUserException e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
|
| | |
| | | import com.yeshi.fanli.entity.integral.IntegralTask.TaskUniqueKeyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskClass.UniqueKeyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.integral.IntegralExchangeException;
|
| | | import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | | data.put("list", getGson().toJson(list));
|
| | | data.put("helpLink", configService.get("publish_list_help_link"));
|
| | | data.put("helpLink", configService.get(ConfigKeyEnum.publishListHelpLink.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "获取失败"));
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInviteSeparate;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | |
| | |
|
| | | long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
|
| | | resultData.put("boss", bossData);
|
| | | resultData.put("helpLink", configService.get("team_help_url"));
|
| | | resultData.put("helpLink", configService.get(ConfigKeyEnum.teamHelpUrl.getKey()));
|
| | | resultData.put("firstTeam", firstTeam);
|
| | | resultData.put("firstTeamTotal", threeSaleSerivce.countFirstTeam(uid, null));
|
| | | resultData.put("secondTeam", threeSaleSerivce.countSecondTeam(uid, 1));
|
| | |
| | | boolean hasTeam = true;
|
| | | if (firstTeam <= 0) {
|
| | | hasTeam = false;
|
| | | resultData.put("invitelink", configService.get("invite_activation_url"));
|
| | | resultData.put("invitelink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | }
|
| | | resultData.put("hasTeam", hasTeam);
|
| | |
|
| | |
| | | resultData.put("hasCode", hasCode);
|
| | | if (!hasCode) {
|
| | | List<String> tipCode = new ArrayList<String>();
|
| | | resultData.put("helpLinkActivate", configService.get("team_help_url"));
|
| | | resultData.put("helpLinkActivate", configService.get(ConfigKeyEnum.teamHelpUrl.getKey()));
|
| | | tipCode.add("激活邀请功能后才可以邀请粉丝,直接粉丝是由你直接邀请,间接粉丝是由你的直接粉丝邀请。");
|
| | | tipCode.add("邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
|
| | | resultData.put("tipCode", tipCode);
|
| | |
| | | bossData.put("inviteTime", "你于 " + sdf.format(inviteTime) + "接受了TA的邀请");
|
| | | } else {
|
| | | bossData.put("hasBoss", false);
|
| | | bossData.put("helpLink", configService.get("invite_code_hlep_link"));
|
| | | bossData.put("helpLink", configService.get(ConfigKeyEnum.inviteCodeHlepLink.getKey()));
|
| | | bossData.put("weiXinTip", "恭喜你,我们的优质用户;\r\n你并没有邀请人,但你的邀请激活功能是被默认开启的;\r\n你拥有独特的无邀请人激活码。");
|
| | | }
|
| | | return bossData;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", spreadImgService.countAll());
|
| | | data.put("inviteCode", inviteCode);
|
| | | data.put("helpLink", configService.get("invite_help_link"));
|
| | | 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");
|
| | |
| | | package com.yeshi.fanli.controller.client.v2;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.jd.JDGoodsException;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | public void getJDClass(AcceptData acceptData, PrintWriter out) {
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("list", jdGoodsService.getSpecialClass());
|
| | | root.put("jdLink", configService.get("jingdong_h5_link"));
|
| | | root.put("jdLink", configService.get(ConfigKeyEnum.jingdongH5Link.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | |
| | | // 4、IOS的底部网页链接
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("ios".equalsIgnoreCase(platform)) {
|
| | | root.put("htmlLink", configService.get("index_html_link_ios"));
|
| | | root.put("htmlLink", configService.get(ConfigKeyEnum.indexHtmlLinkIos.getKey()));
|
| | | }
|
| | |
|
| | | root.put("spikeGoods", getSpikeGoodsContent(acceptData));
|
| | |
| | | GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, configParamsDTO);
|
| | |
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link") + "?id=" + taoBaoGoodsBrief.getAuctionId());
|
| | | params.put("url", configService.get(ConfigKeyEnum.spikeGoodsLink.getKey()) + "?id=" + taoBaoGoodsBrief.getAuctionId());
|
| | |
|
| | | JSONObject goods = new JSONObject();
|
| | | goods.put("goods", gson.toJson(detailVO));
|
| | |
| | | }
|
| | | root.put("imgList", imgArray);
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link"));
|
| | | params.put("url", configService.get(ConfigKeyEnum.spikeGoodsLink.getKey()));
|
| | | root.put("params", params);
|
| | | root.put("jumpDetail", jumpDetail);
|
| | | root.put("name", "限时秒杀");
|
| | |
| | | root.put("endTime", endTime > 0 ? endTime : 0);
|
| | | root.put("listgoods", array);
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("spike_goods_link"));
|
| | | params.put("url", configService.get(ConfigKeyEnum.spikeGoodsLink.getKey()));
|
| | | root.put("params", params);
|
| | | root.put("jumpDetail", jumpDetail);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("search_discovery_h5_link"));
|
| | | params.put("url", configService.get(ConfigKeyEnum.searchDiscoveryH5Link.getKey()));
|
| | |
|
| | | JSONObject root = new JSONObject();
|
| | | root.put("picture", "http://img.flqapp.com/resource/home_search_found.png");
|
| | |
| | | public void getGuide(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | String tips = null;
|
| | | if (uid == null || uid <= 0) {
|
| | | tips = configService.get("tip_guide_new_user");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey());
|
| | | } else {
|
| | | long rebateOrder = hongBaoV2CountService.countRebateOrder(uid);
|
| | | long shareOrInviteOrder = hongBaoV2CountService.countShareOrInviteOrder(uid);
|
| | |
| | | // 熟客版
|
| | | } else if (rebateOrder <= 0 && shareOrInviteOrder <= 0) {
|
| | | // 新人版
|
| | | tips = configService.get("tip_guide_new_user");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey());
|
| | | } else if (rebateOrder > 0 && shareOrInviteOrder <= 0) {
|
| | | // 省钱版
|
| | | tips = configService.get("tip_guide_save_money");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideSaveMoney.getKey());
|
| | | } else {
|
| | | // 赚钱版
|
| | | tips = configService.get("tip_guide_share_invite");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideShareInvite.getKey());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | String desc = configService.get("super-hongbao-share-desc");
|
| | | String desc = configService.get(ConfigKeyEnum.superHongBaoShareDesc.getKey());
|
| | | desc = desc.replace("[淘口令]", token);
|
| | | if (!StringUtil.isNullOrEmpty(callback))
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(desc)));
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.SearchFilter;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | |
| | |
|
| | | JDSearchResult result = null;
|
| | | boolean hasCoupon = false;
|
| | | String way = configService.get("jd_api_search_key");
|
| | | String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey());
|
| | | if ("1".equals(way)) {
|
| | | JDFilter filterAPI = new JDFilter();
|
| | | filterAPI.setKeyword(SearchFilterUtil.filterSearchContent(key));
|
| | |
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.goods.ShareGoodsTextTemplate;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink;
|
| | | import com.yeshi.fanli.entity.taobao.TaoKeAppInfo;
|
| | |
| | |
|
| | | shareInfo.setClickUrl(url);
|
| | | shareInfo.setToken(TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
|
| | | shareInfo.setRule(configService.get("share_single_goods_rule"));
|
| | | shareInfo.setRule(configService.get(ConfigKeyEnum.shareSingleGoodsRule.getKey()));
|
| | | shareInfo.setPictUrl(TbImgUtil.getTBSizeImg(taoBaoLink.getGoods().getPictUrl(), 500));
|
| | |
|
| | | String commentTextStr = configService.get("share_single_goods_comment_text");
|
| | | String commentTextStr = configService.get(ConfigKeyEnum.shareSingleGoodsCommentText.getKey());
|
| | | List<String> commentTexts = new ArrayList<>();
|
| | | if (!StringUtil.isNullOrEmpty(commentTextStr)) {
|
| | | JSONArray array = JSONArray.fromObject(commentTextStr);
|
| | |
| | | if (StringUtil.isNullOrEmpty(taoBaoLink.getGoods().getCouponInfo())) {
|
| | | String text = shareGoodsTextTemplateService.getCommonTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(text))
|
| | | text = configService.get("goods_share_text_nocoupon");
|
| | | text = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey());
|
| | | shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle()).replace("{商品原价}",
|
| | | MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "");
|
| | | } else// 有券
|
| | | {
|
| | | String text = shareGoodsTextTemplateService.geteCouponTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(text))
|
| | | text = configService.get("goods_share_text_coupon");
|
| | | text = configService.get(ConfigKeyEnum.goodsShareTextCoupon.getKey());
|
| | |
|
| | | shareText = text.replace("{标题}", taoBaoLink.getGoods().getTitle())
|
| | | .replace("{商品原价}", MoneyBigDecimalUtil.getWithNoZera(taoBaoLink.getGoods().getZkPrice()) + "")
|
| | |
| | | // 测试
|
| | | // 2.0.2之前
|
| | | if (!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | shareInfo.setClickUrl(getERCodeContent(configService.get("taobao_share_qrcode_text"),
|
| | | shareInfo.setClickUrl(getERCodeContent(configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()),
|
| | | taoBaoLink.getGoods(), shareInfo.getToken()));
|
| | |
|
| | | shareInfo.setWxErCode(getERCodeContent(configService.get("taobao_share_qrcode_text"), taoBaoLink.getGoods(),
|
| | | shareInfo.setWxErCode(getERCodeContent(configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()), taoBaoLink.getGoods(),
|
| | | shareInfo.getToken()));
|
| | |
|
| | | // 提示图文内容
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | | shareInfo.setNotifyDesc(configService.get("goods_share_notify"));
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | | // 分享金额
|
| | | BigDecimal rate = hongBaoManageService.getShareRate();
|
| | |
| | | }
|
| | | }
|
| | | shareInfo.setToken(TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
|
| | | shareInfo.setRule(configService.get("share_single_goods_rule"));
|
| | | shareInfo.setRule(configService.get(ConfigKeyEnum.shareSingleGoodsRule.getKey()));
|
| | | shareInfo.setPictUrl(TbImgUtil.getTBSizeImg(goods.getPictUrl(), 500));
|
| | |
|
| | | // 无券
|
| | |
| | | if (StringUtil.isNullOrEmpty(goods.getCouponInfo())) {
|
| | | String text = shareGoodsTextTemplateService.getCommonTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(text))
|
| | | text = configService.get("goods_share_text_nocoupon");
|
| | | text = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey());
|
| | | shareText = text.replace("{标题}", goods.getTitle()).replace("{商品原价}",
|
| | | MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice()) + "");
|
| | | } else// 有券
|
| | |
| | |
|
| | | shareInfo.setDescText(descText);
|
| | |
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | | shareInfo.setNotifyDesc(configService.get("goods_share_notify"));
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotify.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | | BigDecimal rate = hongBaoManageService.getShareRate();
|
| | |
| | | ShareInfoVO shareInfo = new ShareInfoVO();
|
| | | shareInfo.setClickUrl(jumpLink);
|
| | | shareInfo.setWxErCode(jumpLink);
|
| | | shareInfo.setRule(configService.get("share_rule_link_jd"));
|
| | | shareInfo.setRule(configService.get(ConfigKeyEnum.shareRuleLinkJD.getKey()));
|
| | | shareInfo.setPictUrl(jdGoods.getPicUrl());
|
| | | shareInfo.setCommentTexts(new ArrayList<>());
|
| | |
|
| | |
| | | shareText = textTemplate.getShareJDTextTemplate();
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(shareText))
|
| | | shareText = configService.get("goods_share_text_nocoupon_jd");
|
| | | shareText = configService.get(ConfigKeyEnum.goodsShareTextNoCouponJD.getKey());
|
| | | } else { // 有券模板
|
| | | hasCoupon = true;
|
| | | if (textTemplate != null)
|
| | | shareText = textTemplate.getShareJDTextTemplateCoupon();
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(shareText))
|
| | | shareText = configService.get("goods_share_text_coupon_jd");
|
| | | shareText = configService.get(ConfigKeyEnum.goodsShareTextCouponJD.getKey());
|
| | | }
|
| | | shareText = shareGoodsTextTemplateService.createContentByTemplateJD(shareText, uid, jdGoods, jumpLink,
|
| | | hasCoupon);
|
| | |
| | | }
|
| | | shareInfo.setDescText(descText);
|
| | |
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | | shareInfo.setNotifyDesc(configService.get("goods_share_notify_jd"));
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyJD.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | |
| | | shareInfo.setClickUrl(jumpLink);
|
| | | shareInfo.setWxErCode(jumpLink);
|
| | | shareInfo.setCommentTexts(new ArrayList<>());
|
| | | shareInfo.setRule(configService.get("share_rule_link_pdd"));
|
| | | shareInfo.setRule(configService.get(ConfigKeyEnum.shareRuleLinkPDD.getKey()));
|
| | | shareInfo.setPictUrl(goods.getGoodsImageUrl());
|
| | | if (needGoods) {
|
| | | shareInfo
|
| | |
| | | template = textTemplate.getSharePDDTextTemplate();
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(template))
|
| | | template = configService.get("goods_share_text_nocoupon_pdd");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNocouponPDD.getKey());
|
| | | } else {
|
| | | hasCoupon = true;
|
| | | if (textTemplate != null)
|
| | | template = textTemplate.getSharePDDTextTemplateCoupon();
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(template))
|
| | | template = configService.get("goods_share_text_coupon_pdd");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCouponPDD.getKey());
|
| | | }
|
| | |
|
| | | // 创建口令
|
| | |
| | | shareInfo.setDescText(descText);
|
| | |
|
| | | //
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | | String imgs = configService.get(ConfigKeyEnum.goodsShareNotifyImgs.getKey());
|
| | | JSONArray array = JSONArray.fromObject(imgs);
|
| | | int p = (int) (array.size() * Math.random());
|
| | | if (p < array.size()) {
|
| | | shareInfo.setNotifyPicture(array.optString(p));
|
| | | }
|
| | | shareInfo.setNotifyDesc(configService.get("goods_share_notify_pdd"));
|
| | | shareInfo.setNotifyDesc(configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
|
| | |
|
| | | // 添加分享记录
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | |
| | | } else {
|
| | | template = shareGoodsTextTemplateService.geteCouponTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(template))
|
| | | template = configService.get("goods_share_text_coupon");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCoupon.getKey());
|
| | | }
|
| | |
|
| | | } else {
|
| | | template = shareGoodsTextTemplateService.getCommonTemplate(uid);
|
| | | if (StringUtil.isNullOrEmpty(template))
|
| | | template = configService.get("goods_share_text_nocoupon");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNoCoupon.getKey());
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | ShareGoodsTextTemplate textTemplate = shareGoodsTextTemplateService.getShareGoodsTextTemplate(uid);
|
| | |
| | | template = textTemplate.getShareJDTextTemplateCoupon();
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get("goods_share_text_coupon_jd");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCouponJD.getKey());
|
| | | }
|
| | | } else {
|
| | | if (textTemplate != null) {
|
| | |
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get("goods_share_text_nocoupon_jd");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNoCouponJD.getKey());
|
| | | }
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
|
| | |
| | | template = textTemplate.getSharePDDTextTemplateCoupon();
|
| | | }
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get("goods_share_text_coupon_pdd");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextCouponPDD.getKey());
|
| | | }
|
| | | } else {
|
| | | if (textTemplate != null) {
|
| | |
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(template)) {
|
| | | template = configService.get("goods_share_text_nocoupon_pdd");
|
| | | template = configService.get(ConfigKeyEnum.goodsShareTextNocouponPDD.getKey());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | out.print(
|
| | | JsonUtil.loadTrueResult(configTaoLiJinService.getValueByKey("share_goods_rules", new Date())));
|
| | | } else {
|
| | | out.print(JsonUtil.loadTrueResult(configService.get("share_goods_template_rules")));
|
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRules.getKey())));
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | out.print(JsonUtil.loadTrueResult(configService.get("share_goods_template_rules_jd")));
|
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRulesJD.getKey())));
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
|
| | | out.print(JsonUtil.loadTrueResult(configService.get("share_goods_template_rules_pdd")));
|
| | | out.print(JsonUtil.loadTrueResult(configService.get(ConfigKeyEnum.shareGoodsTemplateRulesPDD.getKey())));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserGoodsStorage;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException;
|
| | |
| | | JSONObject data = new JSONObject();
|
| | |
|
| | | if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | String open = configService.get("share_jd_open");
|
| | | String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
|
| | | if (!"1".equals(open.trim())) {
|
| | | data.put("count", 0);
|
| | | data.put("result_list", array);
|
| | |
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinDetail.TaoLiJinDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.tlj.UserTaoLiJinNewbies;
|
| | | import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.ShareHotGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TLJBuyGoods;
|
| | | import com.yeshi.fanli.entity.taobao.TLJFreeBuyGoods;
|
| | |
| | | else
|
| | | data.put("topPicture", "");
|
| | |
|
| | | data.put("ruleUrl", configService.get("zigoulijian_rule"));
|
| | | data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
| | | else
|
| | | data.put("topPicture", "");
|
| | |
|
| | | data.put("ruleUrl", configService.get("zigoulijian_rule"));
|
| | | data.put("ruleUrl", configService.get(ConfigKeyEnum.zigoulijianRule.getKey()));
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | String rule = configTaoLiJinService.getValueByKey("new_user_free_buy_list_rule");
|
| | | rule = rule.replace("{链接}", configService.get("customer_service_link"));
|
| | | rule = rule.replace("{链接}", configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
|
| | |
|
| | | data.put("state", state);
|
| | | data.put("balance","新人红包:" + balance.setScale(2) + "元");
|
| | |
| | | import com.yeshi.fanli.entity.push.DeviceActive;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopOrder;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.exception.user.vip.UserVIPInfoException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | vo.setNickName(userInfo.getNickName());
|
| | | vo.setPortrait(userInfo.getPortrait());
|
| | | vo.setHelpLink(userVipConfigService.getValueByKey("help_link_vip_h5"));
|
| | | vo.setCsdLink(configService.get("customer_service_link"));
|
| | | vo.setCsdLink(configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
|
| | |
|
| | | Date now = new Date();
|
| | | Date start = new Date(0);
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.user.UserSystemCouponException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("helpLink", configService.get("reward_coupon_help"));
|
| | | data.put("helpLink", configService.get(ConfigKeyEnum.rewardCouponHelp.getKey()));
|
| | | data.put("count", resultList.size());
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(resultList));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.DateUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.order.ESOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.order.CommonOrderException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | |
|
| | | // 搜索内容、订单号
|
| | | if (!StringUtil.isNullOrEmpty(orderNo) && VersionUtil.greaterThan_2_0_6(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | searchOrder(orderNo, page, uid, out);
|
| | | searchOrder(acceptData, orderNo, page, uid, out);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | String orderFindUrl = null;
|
| | | if (state ==null && page == 1) {
|
| | | if (redisManager.frequencyLimit("orderlist-" + acceptData.getDevice(), 8, 4)||count==0L) {
|
| | | orderFindUrl = configService.get("order_find_notify_url");
|
| | | orderFindUrl = configService.get(ConfigKeyEnum.orderFindNotifyUrl.getKey());
|
| | | }
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(list));
|
| | | data.put("helpUrl", configService.get("order_list_help"));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.orderListHelp.getKey()));
|
| | | data.put("validMoney", "¥ " + validMoney);
|
| | | data.put("invalidMoney", "¥ " + invalidMoney);
|
| | | data.put("findOrderHelpUrl", orderFindUrl);
|
| | |
| | | * @param key
|
| | | * @param out
|
| | | */
|
| | | private void searchOrder(String key, Integer page, Long uid, PrintWriter out) {
|
| | | private void searchOrder(AcceptData acceptData, String key, Integer page, Long uid, PrintWriter out) {
|
| | | try {
|
| | | long count = 0;
|
| | | List<CommonOrderVO> list = null;
|
| | | List<ESOrder> listES = esOrderService.query(key, uid.toString(), null);
|
| | | if (NumberUtil.isNumeric(key.replace("-", ""))) {
|
| | | list = commonOrderService.getOrderByUid(acceptData, page, uid, null, null, null, key, null, null, null, null);
|
| | | } |
| | |
|
| | | if (listES.size() != 0) {
|
| | | list = commonOrderService.searchOrderByUid(page, Constant.PAGE_SIZE, uid, listES);
|
| | | count = commonOrderService.countSearchOrderByUid(uid, listES);
|
| | | if (list == null || list.size() == 0) {
|
| | | List<ESOrder> listES = esOrderService.query(key, uid.toString(), null);
|
| | | if (listES.size() != 0) {
|
| | | list = commonOrderService.searchOrderByUid(page, Constant.PAGE_SIZE, uid, listES);
|
| | | count = commonOrderService.countSearchOrderByUid(uid, listES);
|
| | | }
|
| | | } else {
|
| | | count = list.size();
|
| | | }
|
| | |
|
| | | if (list == null) {
|
| | |
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | String desc = configService.get("super-hongbao-share-desc");
|
| | | String desc = configService.get(ConfigKeyEnum.superHongBaoShareDesc.getKey());
|
| | | desc = desc.replace("[淘口令]", TaoBaoUtil.filterTaoToken(token));
|
| | | try {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(StringUtil.getBase64String(desc))));
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | String desc = configService.get("super-yushou-share-desc");
|
| | | String desc = configService.get(ConfigKeyEnum.superYuShouShareDesc.getKey());
|
| | | desc = desc.replace("[淘口令]", TaoBaoUtil.filterTaoToken(token));
|
| | | try {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(StringUtil.getBase64String(desc))));
|
| | |
| | | import com.yeshi.fanli.entity.bus.su.recommend.SuperRecommendBanner;
|
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig;
|
| | |
| | | }
|
| | | taoBaoGoodsBriefExtra.setAuctionUrl(null);
|
| | | data.put("taobao", gson.toJson(taoBaoGoodsBriefExtra));
|
| | | String info = configService.get("detail_prompt");
|
| | | String info = configService.get(ConfigKeyEnum.detailPrompt.getKey());
|
| | | data.put("info", info);
|
| | | String onlyInfo = configService.get("only_info");
|
| | | String onlyInfo = configService.get(ConfigKeyEnum.onlyInfo.getKey());
|
| | | data.put("only", onlyInfo);
|
| | | int showType = taoBaoGoodsBriefExtra.getShowType();
|
| | | String price = "";
|
| | |
| | | data.put("shareTitle", taoBaoGoodsBriefExtra.getTitle());
|
| | | data.put("shareContent", "¥" + price + "元");
|
| | | data.put("shareImg", taoBaoGoodsBriefExtra.getPictUrl());
|
| | | String html = configService.get("downAPP");
|
| | | String html = configService.get(ConfigKeyEnum.downAPP.getKey());
|
| | | data.put("downAPP", html);
|
| | | String shareSinaContent = configService.get("shareSinaContent");
|
| | | data.put("shareSina",
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.push.DeviceActive;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | public void getUserConfig(AcceptData acceptData, PrintWriter out) {
|
| | | try {
|
| | | // 用户协议链接
|
| | | String serviceProtocol = configService.get("service_protocol_link");
|
| | | String serviceProtocol = configService.get(ConfigKeyEnum.serviceProtocolLink.getKey());
|
| | | // 隐私条款链接
|
| | | String privacyProtocol = configService.get("privacy_protocol_link");
|
| | | String privacyProtocol = configService.get(ConfigKeyEnum.privacyProtocolLink.getKey());
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("serviceProtocolLink", serviceProtocol);
|
| | | data.put("privacyProtocolLink", privacyProtocol);
|
| | |
| | | import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoodsClass;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | @RequestMapping(value = "getTopCategory", method = RequestMethod.POST)
|
| | | public void getTopCategory(WXMPAcceptData acceptData, PrintWriter out) {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("list", configService.get("jd_wxmp_class"));
|
| | | data.put("list", configService.get(ConfigKeyEnum.jdWXMPClass.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | List<ShamUser> listShareUser = new ArrayList<ShamUser>();
|
| | |
|
| | | // 京东开启分享
|
| | | String open = configService.get("share_jd_open");
|
| | | String open = configService.get(ConfigKeyEnum.shareOpenJD.getKey());
|
| | | if ("1".equals(open.trim())) {
|
| | | extraVO.setShareValid(true);
|
| | | MoneyInfoVO moneyInfo = goodsDetail.getMoneyInfo();
|
| | |
| | | extraVO.setFanliValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | extraVO.setShareValid(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | | helpLink = configService.get("no_rebate_help_link");
|
| | | helpLink = configService.get(ConfigKeyEnum.noRebateHelpLink.getKey());
|
| | | }
|
| | |
|
| | | ShareVO shareInfoVO = new ShareVO();
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInviteSeparate;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInviteSeparateService;
|
| | |
| | |
|
| | | JSONObject resultData = new JSONObject();
|
| | |
|
| | | String helpLink = configService.get("team_help_url");
|
| | | String helpLink = configService.get(ConfigKeyEnum.teamHelpUrl.getKey());
|
| | | if (helpLink == null) {
|
| | | helpLink = "";
|
| | | }
|
| | |
| | | hasCode = true; // 已有邀请码
|
| | | } else {
|
| | | // 邀请激活链接
|
| | | resultData.put("activationlink", configService.get("invite_activation_url"));
|
| | | resultData.put("activationlink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | }
|
| | | resultData.put("hasCode", hasCode);
|
| | |
|
| | |
| | | bossData.put("inviteTime", "你于 " + sdf.format(inviteTime) + "接受了TA的邀请");
|
| | | } else {
|
| | | bossData.put("hasBoss", false);
|
| | | bossData.put("helpLink", configService.get("invite_code_hlep_link"));
|
| | | bossData.put("helpLink", configService.get(ConfigKeyEnum.inviteCodeHlepLink.getKey()));
|
| | | bossData.put("weiXinTip", "恭喜你,我们的优质用户;\r\n你并没有邀请人,但你的邀请激活功能是被默认开启的;\r\n你拥有独特的无邀请人激活码。");
|
| | | }
|
| | | return bossData;
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.order.ESOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.order.CommonOrderException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | String orderFindUrl = null;
|
| | | if (state ==null && page == 1) {
|
| | | if (redisManager.frequencyLimit("orderlist-" + acceptData.getDevice(), 8, 4)||count==0L) {
|
| | | orderFindUrl = configService.get("order_find_notify_url");
|
| | | orderFindUrl = configService.get(ConfigKeyEnum.orderFindNotifyUrl.getKey());
|
| | | }
|
| | | }
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | | data.put("list", JsonUtil.getApiCommonGson().toJson(list));
|
| | | data.put("helpUrl", configService.get("order_list_help"));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.orderListHelp.getKey()));
|
| | | data.put("validMoney", "¥ " + validMoney);
|
| | | data.put("invalidMoney", "¥ " + invalidMoney);
|
| | | data.put("findOrderHelpUrl", orderFindUrl);
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | | public void getGuide(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | String tips = null;
|
| | | if (uid == null || uid <= 0) {
|
| | | tips = configService.get("tip_guide_new_user");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey());
|
| | | } else {
|
| | | long rebateOrder = hongBaoV2CountService.countRebateOrder(uid);
|
| | | long shareOrInviteOrder = hongBaoV2CountService.countShareOrInviteOrder(uid);
|
| | |
| | | // 熟客版
|
| | | } else if (rebateOrder <= 0 && shareOrInviteOrder <= 0) {
|
| | | // 新人版
|
| | | tips = configService.get("tip_guide_new_user");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey());
|
| | | } else if (rebateOrder > 0 && shareOrInviteOrder <= 0) {
|
| | | // 省钱版
|
| | | tips = configService.get("tip_guide_save_money");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideSaveMoney.getKey());
|
| | | } else {
|
| | | // 赚钱版
|
| | | tips = configService.get("tip_guide_share_invite");
|
| | | tips = configService.get(ConfigKeyEnum.tipGuideShareInvite.getKey());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.brand.BrandInfoService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | |
|
| | | JDSearchResult result = null;
|
| | | boolean hasCoupon = false;
|
| | | String way = configService.get("jd_api_search_key");
|
| | | String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey());
|
| | | if ("1".equals(way)) {
|
| | | JDFilter filterAPI = new JDFilter();
|
| | | filterAPI.setKeyword(SearchFilterUtil.filterSearchContent(key));
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.user.UserAccountException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.exception.user.vip.UserVIPInfoException;
|
| | |
| | | vo.setNickName(userInfo.getNickName());
|
| | | vo.setPortrait(userInfo.getPortrait());
|
| | | vo.setHelpLink(userVipConfigService.getValueByKey("help_link_vip_h5"));
|
| | | vo.setCsdLink(configService.get("customer_service_link"));
|
| | | vo.setCsdLink(configService.get(ConfigKeyEnum.customerServiceLink.getKey()));
|
| | |
|
| | | Date now = new Date();
|
| | | Date start = new Date(0);
|
| | |
| | | import java.util.List;
|
| | | import java.util.concurrent.TimeUnit;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.apache.http.HttpHost;
|
| | | import org.elasticsearch.action.delete.DeleteRequest;
|
| | | import org.elasticsearch.action.get.GetRequest;
|
| | | import org.elasticsearch.action.get.GetResponse;
|
| | |
| | | import org.elasticsearch.action.search.SearchRequest;
|
| | | import org.elasticsearch.action.search.SearchResponse;
|
| | | import org.elasticsearch.action.update.UpdateRequest;
|
| | | //import org.elasticsearch.action.update.UpdateRequest;
|
| | | import org.elasticsearch.client.RequestOptions;
|
| | | import org.elasticsearch.client.RestClient;
|
| | | import org.elasticsearch.client.RestHighLevelClient;
|
| | | import org.elasticsearch.common.unit.TimeValue;
|
| | | import org.elasticsearch.common.xcontent.XContentType;
|
| | | import org.elasticsearch.index.query.QueryBuilders;
|
| | | import org.elasticsearch.search.SearchHit;
|
| | | import org.elasticsearch.search.SearchHits;
|
| | | import org.elasticsearch.search.builder.SearchSourceBuilder;
|
| | | import org.springframework.data.elasticsearch.annotations.Document;
|
| | | import org.springframework.stereotype.Repository;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | |
|
| | | import org.springframework.data.elasticsearch.annotations.Document;
|
| | | import com.yeshi.fanli.service.manger.ElasticManger;
|
| | |
|
| | |
|
| | |
|
| | | @Repository
|
| | | public abstract class ElasticBaseDao<T> {
|
| | | // 地址
|
| | | private static String host = "192.168.1.200";
|
| | | // 端口
|
| | | private static Integer port = 9200;
|
| | |
|
| | | @Resource |
| | | protected ElasticManger elasticManger;
|
| | |
|
| | | // 初始化api客户端
|
| | | public static RestHighLevelClient client = new RestHighLevelClient(RestClient.builder(new HttpHost(host, port,"http")));;
|
| | |
|
| | | /**
|
| | | * 获取index
|
| | |
| | | public String getDocument(Class<?> entityClass) {
|
| | | if (entityClass.isAnnotationPresent(Document.class)) {
|
| | | Document doc = (Document)entityClass.getAnnotation(Document.class);
|
| | | System.out.println(doc.indexName());
|
| | | return doc.indexName();
|
| | | }
|
| | | |
| | | String name = entityClass.getName();
|
| | | return name.substring(name.lastIndexOf(".") + 1, name.length());
|
| | | }
|
| | |
| | | */
|
| | | public void save(T bean) {
|
| | | String document = getDocument(bean.getClass());
|
| | | |
| | | String json = JsonUtil.getSimpleGson().toJson(bean);
|
| | | IndexRequest request = new IndexRequest(document);
|
| | | request.source(json, XContentType.JSON);
|
| | | // 同步执行
|
| | | try {
|
| | | client.index(request, RequestOptions.DEFAULT);
|
| | | elasticManger.getClient().index(request, RequestOptions.DEFAULT);
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | request.source(json, XContentType.JSON);
|
| | | // 同步执行
|
| | | try {
|
| | | client.index(request, RequestOptions.DEFAULT);
|
| | | elasticManger.getClient().index(request, RequestOptions.DEFAULT);
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | String json = new GsonBuilder().create().toJson(bean);
|
| | | request.doc(json, XContentType.JSON);
|
| | | try {
|
| | | client.update(request, RequestOptions.DEFAULT);
|
| | | elasticManger.getClient().update(request, RequestOptions.DEFAULT);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | String document = getDocument(entityClass);
|
| | | DeleteRequest request = new DeleteRequest(document, id);
|
| | | try {
|
| | | client.delete(request, RequestOptions.DEFAULT);
|
| | | elasticManger.getClient().delete(request, RequestOptions.DEFAULT);
|
| | | } catch (IOException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | String document = getDocument(entityClass);
|
| | | GetRequest request = new GetRequest(document, id);
|
| | | try {
|
| | | GetResponse getResponse = client.get(request, RequestOptions.DEFAULT);
|
| | | GetResponse getResponse = elasticManger.getClient().get(request, RequestOptions.DEFAULT);
|
| | | if (getResponse.isExists()) {
|
| | | String content = getResponse.getSourceAsString();
|
| | | return new Gson().fromJson(content, entityClass);
|
| | |
| | | searchRequest.indices(index);
|
| | | searchRequest.source(sourceBuilder);
|
| | | try {
|
| | | SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
|
| | | SearchResponse searchResponse = elasticManger.getClient().search(searchRequest, RequestOptions.DEFAULT);
|
| | | SearchHits hits = searchResponse.getHits();
|
| | | SearchHit[] searchHits = hits.getHits();
|
| | |
|
| | |
| | | import org.elasticsearch.action.search.SearchRequest;
|
| | | import org.elasticsearch.action.search.SearchResponse;
|
| | | import org.elasticsearch.client.RequestOptions;
|
| | | import org.elasticsearch.common.unit.Fuzziness;
|
| | | import org.elasticsearch.index.query.BoolQueryBuilder;
|
| | | import org.elasticsearch.index.query.MatchQueryBuilder;
|
| | | import org.elasticsearch.index.query.QueryBuilders;
|
| | | import org.elasticsearch.index.query.TermQueryBuilder;
|
| | | import org.elasticsearch.search.SearchHit;
|
| | | import org.elasticsearch.search.SearchHits;
|
| | | import org.elasticsearch.search.builder.SearchSourceBuilder;
|
| | |
| | | */
|
| | | public List<ESOrder> query(String key, String uid, List<Integer> listPlatform) {
|
| | | List<ESOrder> list = new ArrayList<ESOrder>();
|
| | | // 商品名称匹配
|
| | | BoolQueryBuilder should1 = QueryBuilders.boolQuery().should(QueryBuilders.matchPhraseQuery("orderNo", key))
|
| | | .should(QueryBuilders.matchPhraseQuery("goodsName", key));
|
| | | // 商品名称模糊全词匹配
|
| | | BoolQueryBuilder should1 = QueryBuilders.boolQuery().should(QueryBuilders.wildcardQuery("orderNo.keyword", "*" + key + "*"))
|
| | | .should(QueryBuilders.wildcardQuery("goodsName.keyword", "*" + key + "*"));
|
| | | // 用户id匹配
|
| | | BoolQueryBuilder should2 = QueryBuilders.boolQuery().should(QueryBuilders.termQuery("uid", uid))
|
| | | .should(QueryBuilders.termQuery("uidDirect", uid)).should(QueryBuilders.termQuery("uidDirect", uid));
|
| | | BoolQueryBuilder should2 = QueryBuilders.boolQuery().should(QueryBuilders.termQuery("uid", uid));
|
| | | //.should(QueryBuilders.termQuery("uidDirect", uid)).should(QueryBuilders.termQuery("uidDirect", uid));
|
| | |
|
| | | // 查询创建
|
| | | SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
|
| | |
| | | searchRequest.indices(getDocument(ESOrder.class));
|
| | | searchRequest.source(sourceBuilder);
|
| | | try {
|
| | | SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
|
| | | SearchResponse searchResponse = elasticManger.getClient().search(searchRequest, RequestOptions.DEFAULT);
|
| | | SearchHits hits = searchResponse.getHits();
|
| | | SearchHit[] searchHits = hits.getHits();
|
| | | Gson gson = new Gson();
|
| | |
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
| | | package com.yeshi.fanli.entity.system;
|
| | |
|
| | | public enum ConfigKeyEnum {
|
| | | shareMessage("share_message", "短信分享编辑内容"),
|
| | | helpName("help_name", "帮助客服名称"),
|
| | | helpNumber("help_number", "帮助客服号码"),
|
| | | passwordErrorMAX("password_max_error", "用户每天最多输错密码次数"),
|
| | |
|
| | | // 提现相关
|
| | | extractWay("extract_way", "是否手动提现"),
|
| | | extractDayCount("extract_count_day", "用户每天最大提现次数"),
|
| | | extractMoneyMin("extract_min_money", "单笔提现最小金额"),
|
| | | extractMoneyMAX("extract_max_money", "单笔提现最大金额"),
|
| | | extractMoneyDay("extract_money_day", "用户每天最大提现金额"),
|
| | | extractCodeEmailFrom("extract_code_email_from", "发送提现验证码的邮箱"),
|
| | |
|
| | | detailPrompt("detail_prompt", "商品详情提示语"),
|
| | | newUserHongBao("new_user_hongbao", "新手红包是否开启"),
|
| | | newUserIsOrder("new_user_isorder", "新手红包是否下单生效"),
|
| | | recommendDetails("recommend_details", "动态推荐详情页面"),
|
| | | onlyInfo("only_info", "返回前端的"),
|
| | | shareSina("shareSina", "分享商品到新浪的前缀内容"),
|
| | | downAPP("downAPP", "下载APP链接"),
|
| | | xcxSetting("xcx_setting", "小程序更新设置"),
|
| | | h5Url("h5_url", "H5网页域名"),
|
| | | iosOnlingVersion("ios_onling_version", "IOS正在上线的版本"),
|
| | |
|
| | | rewardRankRange("reward_rank_range", "奖金榜金额上下幅度最大范围"),
|
| | | goodsShareTextCoupon("goods_share_text_coupon", "单个商品分享文案(有券)"),
|
| | | goodsShareTextNoCoupon("goods_share_text_nocoupon", "单个商品分享文案(无券)"),
|
| | | convertTaoBaoLinkInServer("convert_taobao_link_in_server", "是否在服务端转链"),
|
| | | homeWeexUrl("home_weex_url", "首页weex链接"),
|
| | | appFloatImg("app_float_img", "首页悬浮大图"),
|
| | | oldGoodsDetailHelpUrl("old_goods_detail_help_url", "老版商品详情页的帮助中心"),
|
| | | shareBonusPicture("shareBonusPicture", "1.4.0版本商品详情 分享奖金图片"),
|
| | | teamList("team_list", "我的队员链接"),
|
| | | lostOrderHelpWhat("lost_order_help_what", "订单找回-订单找回是什么"),
|
| | |
|
| | | lostOrderHelpReason("lost_order_help_reason", "订单找回-找回失败原因"),
|
| | | taobaoCartJS("taobao_cart_js", "淘宝购物车脚本"),
|
| | | tkRateRange("tkRate_range", "前端筛选比例范围"),
|
| | | adminMinSameGoodsOrderCount("admin_min_same_goods_order_count", "提现审核列表高危标识同商品订单数量最小值"),
|
| | | adminMinSameShopOrderCount("admin_min_same_shop_order_count", "提现审核列表高危标识同店铺订单数量最小值"),
|
| | | alipayHelp("alipay_help", "支付宝帮助"),
|
| | | alipayBindFailReason("alipay_bind_fail_reason", "支付宝绑定失败可能原因"),
|
| | | pushGoodsDetails("push_goods_details", "推送页面"),
|
| | | teamHelpUrl("team_help_url", "我的队员 问号 跳转链接"),
|
| | | goodsShareNotify("goods_share_notify", "单个商品分享提醒"),
|
| | |
|
| | | // 分享商品
|
| | | h5Url("h5_url", "H5网页域名"),
|
| | | shareSina("shareSina", "分享商品到新浪的前缀内容"), // 未找到对应Call
|
| | | shareRuleLinkJD("share_rule_link_jd", "京东分享规则(帮助中心)"),
|
| | | shareRuleLinkPDD("share_rule_link_pdd", "拼多多分享规则(帮助中心)"),
|
| | | shareSingleGoodsRule("share_single_goods_rule", "单品分享规则"),
|
| | | shareGoodsTemplateRules("share_goods_template_rules", "分享模板规则"), // 存在2个相同 内容不同、版本但一样
|
| | | shareGoodsTemplateRulesJD("share_goods_template_rules_jd", "京东模板规则"),
|
| | | shareGoodsTemplateRulesPDD("share_goods_template_rules_pdd", "拼多多模板规则"),
|
| | | goodsShareNotifyImgs("goods_share_notify_imgs", "单个商品分享的券提示图片"),
|
| | | goodsShareMultipleNotify("goods_share_multiple_notify", "多个商品分享提醒"),
|
| | | goodsShareNotify("goods_share_notify", "单个商品分享提醒"),
|
| | | goodsShareNotifyJD("goods_share_notify_jd", "京东分享提醒"),
|
| | | goodsShareNotifyPDD("goods_share_notify_pdd", "拼多多分享提醒"),
|
| | | goodsShareTextCoupon("goods_share_text_coupon", "单个商品分享文案(有券)"),
|
| | | goodsShareTextCouponJD("goods_share_text_coupon_jd", "京东单个商品分享模板-有券"),
|
| | | goodsShareTextCouponPDD("goods_share_text_coupon_pdd", "拼多多单个商品分享模板-有券"),
|
| | | goodsShareTextNoCoupon("goods_share_text_nocoupon", "单个商品分享文案(无券)"),
|
| | | goodsShareTextNoCouponJD("goods_share_text_nocoupon_jd", "京东单个商品分享模板-无券"),
|
| | | goodsShareTextNocouponPDD("goods_share_text_nocoupon_pdd", "拼多多单个商品分享模板-无券"),
|
| | | shareSingleGoodsCommentText("share_single_goods_comment_text", "单品分享评论区文案"),
|
| | | shareGoodsActivityOpen("share_goods_activity_open", "分享商品订单活动"),
|
| | | superHongBaoShareDesc("super-hongbao-share-desc", "双12红包分享语"),
|
| | | superYuShouShareDesc("super-yushou-share-desc", "双11预售分享语"),
|
| | |
|
| | | taobaoProxyIP("taobao_proxy_ip", "淘宝商品详情代理IP"),
|
| | |
|
| | | inviteTopBanner("invite_top_banner", "邀请页顶部大图"),
|
| | | inviteDesc("invite_desc", "邀请有奖特别说明"),
|
| | | orderListHelp("order_list_help", "订单列表帮助链接"),
|
| | | userRankTip("user_rank_tip", "用户等级页面特别提醒"),
|
| | | // 邀请好友
|
| | | inviteCodeHlepLink("invite_code_hlep_link", "邀请激活页面-特别提醒"),
|
| | | inviteActivationTip("invite_activation_tip", "邀请激活页面-特别提醒"),
|
| | | inviteActivationSuccessTip("invite_activation_success_tip", "邀请激活成功页面-特别提醒"),
|
| | | inviteActivationUrl("invite_activation_url", "邀请码激活页面"),
|
| | | inviteActivationSuccessUrl("invite_activation_success_url", "邀请码激活成功页面"),
|
| | | userRankContrast("user_rank_contrast", "用户等级对照图片url"),
|
| | | openSpeicalAndRelationApply("open_speical_and_relation_apply", "开启会员运营ID与渠道ID申请"),
|
| | | homeFloatNotifyImg("home_float_notify_img", "首页悬浮提示大图"),
|
| | | shareGoodsActivityOpen("share_goods_activity_open", "分享商品订单活动"),
|
| | | homeFloatImgNew("home_float_img_new", "首页悬浮广告位"),
|
| | | rewardCouponHelp("reward_coupon_help", "订单奖励券弹出框位置问号"),
|
| | | freeCouponHelp("free_coupon_help", "商品详情弹框免单券问号链接"),
|
| | | freeCouponTip("free_coupon_tip", "商品详情弹框免单券提示"),
|
| | | rewardCouponRemark("reward_coupon_remark", "奖励券备注"),
|
| | | freeCouponBackRemark("free_coupon_back_remark", "免单券退回页面备注"),
|
| | | freeCouponRemark("free_coupon_remark", "免单券进度使用中、成功备注"),
|
| | | lotteryRuleNewbies("lottery_rule_newbies", "新人抽奖界面规则内容"),
|
| | | freeGoodsList("free_goods_list", "免单商品列表"),
|
| | | freeCouponUsingHelp("free_coupon_using-help", "免单券使用中说明"),
|
| | | taobaoCartLink("taobao_cart_link", "购物车链接"),
|
| | |
|
| | | freeGoodsRule("free_goods_rule", "免单商品活动规则"),
|
| | | homeInviteBanner("home_invite_banner", "首页邀请有奖大图"),
|
| | | taobaoCouponHelp("taobao_coupon_help", "券帮助"),
|
| | | shareGoodsTemplateRules("share_goods_template_rules", "分享模板规则"), // 存在2个相同 内容不同、版本但一样
|
| | | indexHtmlLinkIos("index_html_link_ios", "首页-限时秒杀(IOS)网页链接"),
|
| | | indexHtmlLinkAndroid("index_html_link_android", "首页-限时秒杀(安卓)网页链接"),
|
| | | serviceProtocolLink("service_protocol_link", "服务协议"),
|
| | | privacyProtocolLink("privacy_protocol_link", "隐私协议"),
|
| | | lotteryRuleDailyRebate("lottery_rule_daily_rebate", "奖励券天天抽-抽奖规则"),
|
| | | taobaoOrderParseJS("taobao_order_parse_js", "淘宝订单解析脚本"),
|
| | | orderAppealCountDay("order_appeal_count_day", "每天最大申诉订单数量"),
|
| | | spikeGoodsLink("spike_goods_link", "限时秒杀跳转的网页链接"),
|
| | | inviteTopBanner("invite_top_banner", "邀请页顶部大图"), // 未找到对应Call
|
| | | inviteDesc("invite_desc", "邀请有奖特别说明"),
|
| | | teamList("team_list", "我的队员链接"),
|
| | | teamHelpUrl("team_help_url", "我的队员 问号 跳转链接"),
|
| | | rewardRankRange("reward_rank_range", "奖金榜金额上下幅度最大范围"),
|
| | | inviteHelpLink("invite_help_link", "邀请好友帮助链接"),
|
| | | noRebateHelpLink("no_rebate_help_link", "商品详情无返利问号"),
|
| | | msgConfigZhushou("msg-config-zhushou", "消息-返利券小助手"),
|
| | | msgConfigGuanxuan("msg-config-guanxuan", "消息-官宣任务"),
|
| | | showTaobaoOrder("show_taobao_order", "是否显示淘宝订单"),
|
| | | showTaobaoCartConvert("show_taobao_cart_convert", "购物车是否转链"),
|
| | | autoFindTaobaoOrder("auto_find_taobao_order", "是否开启淘宝自动找单"),
|
| | | canSendEmergency_msg("can_send_emergency_msg", "是否发送服务器告警短信"),
|
| | | kefuMeiqia("kefu_meiqia", "美洽客服是否开启(0-关闭 1-开启)"),
|
| | | taobaoCartJumpDetail("taobao_cart_jump_detail", "我的购物车跳转方式"), // 存在2个相同 存在版本区分
|
| | | zigoulijianRule("zigoulijian_rule", "自购立减活动规则"),
|
| | | zigoulijianNofanliHelp("zigoulijian_nofanli_help", "自购立减无返利帮助"),
|
| | | hotFunctionUrl("hot_function_url", "热门功能链接"), // 存在2个相同 存在版本区分
|
| | | inviteSeparateLimitDays("invite_separate_limit_days", "会员脱离期限"),
|
| | | inviteCodeInputHelp("invite_code_input_help", "邀请码填写帮助"),
|
| | | shareSingleGoodsRule("share_single_goods_rule", "单品分享规则"),
|
| | | msgConfigNotify("msg-config-notify", "消息-大图通知"),
|
| | |
|
| | | shareOpenJD("share_jd_open", "京东商品是否开启分享"),
|
| | | jdApiSearchKey("jd_api_search_key", "京东API是否搜索"),
|
| | | jingdongH5Link("jingdong_h5_link", "京东跳转地址"),
|
| | | goodsShareTextCouponJD("goods_share_text_coupon_jd", "京东单个商品分享模板-有券"),
|
| | | goodsShareTextNoCouponJD("goods_share_text_nocoupon_jd", "京东单个商品分享模板-无券"),
|
| | | goodsShareNotifyJD("goods_share_notify_jd", "京东分享提醒"),
|
| | | shareGoodsTemplateRulesJD("share_goods_template_rules_jd", "京东模板规则"),
|
| | | goodsShareTextCouponPDD("goods_share_text_coupon_pdd", "拼多多单个商品分享模板-有券"),
|
| | | goodsShareTextNocouponPDD("goods_share_text_nocoupon_pdd", "拼多多单个商品分享模板-无券"),
|
| | | goodsShareNotifyPDD("goods_share_notify_pdd", "拼多多分享提醒"),
|
| | | shareGoodsTemplateRulesPDD("share_goods_template_rules_pdd", "拼多多模板规则"),
|
| | | shareRuleLinkJD("share_rule_link_jd", "京东分享规则(帮助中心)"),
|
| | | shareRuleLinkPDD("share_rule_link_pdd", "拼多多分享规则(帮助中心)"),
|
| | | tljOwnBuyNogoods("tlj_own_buy_nogoods", "自购立减无商品页面"),
|
| | | inviteCodeHlepLink("invite_code_hlep_link", "邀请码帮助中心-上级"),
|
| | | publishListHelpLink("publish_list_help_link", "邀请码发布帮助链接"),
|
| | | appDownLink("app_down_link", "APP下载地址"),
|
| | | giveFreeCouponTips("give_free_coupon_tips", "免单券赠送口令提示语"),
|
| | | giveRebatePercentCouponTips("give_rebate_percent_coupon_tips", "奖励券赠送口令提示"),
|
| | |
|
| | | exchangeRebatePercent("exchange_rebate_percent", "兑换奖励券比例"),
|
| | | freeCouponActivateNum("free_coupon_activate_num", "免单券激活订单数量"),
|
| | | firstOrderRewardBoss("first_order_reward_boss", "一级队员首单,奖励上级金币"),
|
| | | firstOrderRewardBossSuper("first_order_reward_boss_super", "二级队员首次下单,系统奖励金币 "),
|
| | | firstShareOrderReward("first_share_order_reward", "首笔分享订单,系统奖励金币"),
|
| | | firstShareOrderRewardBoss("first_share_order_reward_boss", "一级队员首笔分享订单,系统奖励金币 "),
|
| | | searchDiscoveryKeys("search_discovery_keys", "搜索发现关键词"),
|
| | | searchDiscoveryH5Link("search_discovery_h5_link", "搜索发现h5连接"),
|
| | | autoExtractHelpUrl("auto_extract_help_url", "自动提现帮助链接"),
|
| | |
|
| | | elemeHongbaoLink("eleme_hongbao_link", "饿了么红包链接"),
|
| | | elemeGoodsLink("eleme_goods_link", "饿了么商品链接"),
|
| | | // 免单券、奖励券
|
| | | exchangeRebatePercent("exchange_rebate_percent", "兑换奖励券比例"),
|
| | | freeCouponActivateNum("free_coupon_activate_num", "免单券激活订单数量"),
|
| | | freeCouponHelp("free_coupon_help", "商品详情弹框免单券问号链接"),
|
| | | freeCouponTip("free_coupon_tip", "商品详情弹框免单券提示"),
|
| | | freeCouponBackRemark("free_coupon_back_remark", "免单券退回页面备注"),
|
| | | freeCouponRemark("free_coupon_remark", "免单券进度使用中、成功备注"),
|
| | | freeGoodsList("free_goods_list", "免单商品列表"),
|
| | | freeCouponUsingHelp("free_coupon_using-help", "免单券使用中说明"),
|
| | | freeGoodsRule("free_goods_rule", "免单商品活动规则"),
|
| | | rewardCouponHelp("reward_coupon_help", "订单奖励券弹出框位置问号"),
|
| | | rewardCouponRemark("reward_coupon_remark", "奖励券备注"),
|
| | | specialGuideRewardCouponLink("special_guide_reward_coupon_link", "返利奖励券引导页"),
|
| | | giveFreeCouponTips("give_free_coupon_tips", "免单券赠送口令提示语"),
|
| | | giveRebatePercentCouponTips("give_rebate_percent_coupon_tips", "奖励券赠送口令提示"),
|
| | | publishListHelpLink("publish_list_help_link", "邀请码发布帮助链接"),
|
| | | lotteryRuleNewbies("lottery_rule_newbies", "新人抽奖界面规则内容"),
|
| | | lotteryRuleDailyRebate("lottery_rule_daily_rebate", "奖励券天天抽-抽奖规则"),
|
| | |
|
| | | // 商品相关
|
| | | taobaoProxyIP("taobao_proxy_ip", "淘宝商品详情代理IP"),
|
| | | taobaoCartJS("taobao_cart_js", "淘宝购物车脚本"),
|
| | | taobaoCartLink("taobao_cart_link", "购物车链接"),
|
| | | taobaoCartJumpDetail("taobao_cart_jump_detail", "我的购物车跳转方式"), // 存在2个相同 存在版本区分
|
| | | taobaoCouponHelp("taobao_coupon_help", "券帮助"),
|
| | | convertTaoBaoLinkInServer("convert_taobao_link_in_server", "是否在服务端转链"),
|
| | | showTaobaoCartConvert("show_taobao_cart_convert", "购物车是否转链"),
|
| | | taobaoShareQrcodeText("taobao_share_qrcode_text", "淘宝商品二维码识别文字"),
|
| | | noRebateHelpLink("no_rebate_help_link", "商品详情无返利问号"),
|
| | | goodsDetailFanliRateHelpUrl("goods_detail_fanli_rate_help_url", "商品详情返利比例说明"),
|
| | | detailPrompt("detail_prompt", "商品详情提示语"),
|
| | | oldGoodsDetailHelpUrl("old_goods_detail_help_url", "老版商品详情页的帮助中心"),
|
| | | shareBonusPicture("shareBonusPicture", "1.4.0版本商品详情 分享奖金图片"),
|
| | |
|
| | | tljOwnBuyNogoods("tlj_own_buy_nogoods", "自购立减无商品页面"),
|
| | | zigoulijianRule("zigoulijian_rule", "自购立减活动规则"),
|
| | | zigoulijianNofanliHelp("zigoulijian_nofanli_help", "自购立减无返利帮助"),
|
| | |
|
| | | // 订单相关
|
| | | showTaobaoOrder("show_taobao_order", "是否显示淘宝订单"),
|
| | | taobaoOrderParseJS("taobao_order_parse_js", "淘宝订单解析脚本"),
|
| | | autoFindTaobaoOrder("auto_find_taobao_order", "是否开启淘宝自动找单"),
|
| | | orderListHelp("order_list_help", "订单列表帮助链接"),
|
| | | lostOrderHelpWhat("lost_order_help_what", "订单找回-订单找回是什么"),
|
| | | lostOrderHelpReason("lost_order_help_reason", "订单找回-找回失败原因"),
|
| | | orderFindNotifyUrl("order_find_notify_url", "订单列表-订单找回帮助链接"),
|
| | | orderAppealCountDay("order_appeal_count_day", "每天最大申诉订单数量"),
|
| | |
|
| | | // 消息信息
|
| | | shareMessage("share_message", "短信分享编辑内容"),
|
| | | helpName("help_name", "帮助客服名称"), // 未找到对应Call
|
| | | helpNumber("help_number", "帮助客服号码"), // 未找到对应Call
|
| | | msgConfigZhushou("msg-config-zhushou", "消息-返利券小助手"),
|
| | | msgConfigGuanxuan("msg-config-guanxuan", "消息-官宣任务"),
|
| | | msgConfigNotify("msg-config-notify", "消息-大图通知"),
|
| | | kefuMeiqia("kefu_meiqia", "美洽客服是否开启(0-关闭 1-开启)"),
|
| | | customerServiceLink("customer_service_link", "人工客服链接"),
|
| | | canSendEmergencyMsg("can_send_emergency_msg", "是否发送服务器告警短信"),
|
| | |
|
| | | // 首页
|
| | | newUserHongBao("new_user_hongbao", "新手红包是否开启"), // 未找到对应Call
|
| | | newUserIsOrder("new_user_isorder", "新手红包是否下单生效"), // 未找到对应Call
|
| | | recommendDetails("recommend_details", "动态推荐详情页面"), // 未找到对应Call
|
| | | homeWeexUrl("home_weex_url", "首页weex链接"),
|
| | | appFloatImg("app_float_img", "首页悬浮大图"),
|
| | | homeFloatImgNew("home_float_img_new", "首页悬浮广告位"), // 未找到对应Call
|
| | | homeFloatNotifyImg("home_float_notify_img", "首页悬浮提示大图"),
|
| | | homeInviteBanner("home_invite_banner", "首页邀请有奖大图"),
|
| | | spikeGoodsLink("spike_goods_link", "限时秒杀跳转的网页链接"),
|
| | | indexHtmlLinkIos("index_html_link_ios", "首页-限时秒杀(IOS)网页链接"),
|
| | | indexHtmlLinkAndroid("index_html_link_android", "首页-限时秒杀(安卓)网页链接"),
|
| | | tipGuideNewUser("tip_guide_new_user", "首页新人版/未登录版"),
|
| | | tipGuideSaveMoney("tip_guide_save_money", "首页省钱版"),
|
| | | tipGuideShareInvite("tip_guide_share_invite", "首页赚钱版"),
|
| | | adminMinSameGoodsOrderCount("admin_min_same_goods_order_count", "提现审核列表高危标识同商品订单数量最小值"),
|
| | | adminMinSameShopOrderCount("admin_min_same_shop_order_count", "提现审核列表高危标识同店铺订单数量最小值"),
|
| | | superHongBaoShareDesc("super-hongbao-share-desc", "双12红包分享语"),
|
| | | superYuShouShareDesc("super-yushou-share-desc", "双11预售分享语"),
|
| | | orderFindNotifyUrl("order_find_notify_url", "订单列表-订单找回帮助链接"),
|
| | | shareSingleGoodsCommentText("share_single_goods_comment_text", "单品分享评论区文案"),
|
| | | |
| | | searchDiscoveryKeys("search_discovery_keys", "搜索发现关键词"),
|
| | | searchDiscoveryH5Link("search_discovery_h5_link", "搜索发现h5连接"),
|
| | | autoExtractHelpUrl("auto_extract_help_url", "自动提现帮助链接"),
|
| | | // 协议
|
| | | userProtocolHomeData("user_protocol_home_data", "用户协议首页内容"),
|
| | | inviteSeparateLimitDays("invite_separate_limit_days", "会员脱离期限"),
|
| | | customerServiceLink("customer_service_link", "人工客服链接"),
|
| | | |
| | | taobaoShareQrcodeText("taobao_share_qrcode_text", "淘宝商品二维码识别文字"),
|
| | | brandBackgroundPicture("brand_background_picture", "品牌背景图片"),
|
| | | serviceProtocolLink("service_protocol_link", "服务协议"),
|
| | | privacyProtocolLink("privacy_protocol_link", "隐私协议"),
|
| | |
|
| | | shareOpenJD("share_jd_open", "京东商品是否开启分享"),
|
| | | jdApiSearchKey("jd_api_search_key", "京东API是否搜索"),
|
| | | jingdongH5Link("jingdong_h5_link", "京东跳转地址"),
|
| | | jdWXMPClass("jd_wxmp_class", "京东小程序分类"),
|
| | | goodsDetailFanliRateHelpUrl("goods_detail_fanli_rate_help_url", "商品详情返利比例说明"),
|
| | | elemeHongbaoLink("eleme_hongbao_link", "饿了么红包链接"), // 未找到对应Call
|
| | | elemeGoodsLink("eleme_goods_link", "饿了么商品链接"), // 未找到对应Call
|
| | |
|
| | | passwordErrorMAX("password_max_error", "用户每天最多输错密码次数"), // 未找到对应Call
|
| | | userRankTip("user_rank_tip", "用户等级页面特别提醒"),
|
| | | userRankContrast("user_rank_contrast", "用户等级对照图片url"),
|
| | | tkRateRange("tkRate_range", "前端筛选比例范围"),
|
| | | onlyInfo("only_info", "返回前端的"),
|
| | | downAPP("downAPP", "下载APP链接"),
|
| | | appDownLink("app_down_link", "APP下载地址"),
|
| | | xcxSetting("xcx_setting", "小程序更新设置"),
|
| | | iosOnlingVersion("ios_onling_version", "IOS正在上线的版本"),
|
| | | openSpeicalAndRelationApply("open_speical_and_relation_apply", "开启会员运营ID与渠道ID申请"),
|
| | | hotFunctionUrl("hot_function_url", "热门功能链接"), // 存在2个相同 存在版本区分
|
| | | pushGoodsDetails("push_goods_details", "推送页面"),
|
| | | brandBackgroundPicture("brand_background_picture", "品牌背景图片"),
|
| | | articleHotWords("article_hot_words", "动态-学院文章热搜词"),
|
| | | |
| | | vipLink("vip_link", "超级会员升级链接"), // 转移至VIPConfig 已废弃
|
| | | helpLinkVipInfo("help_link_vip_info", "超级会员详情页帮助链接"), // 已废弃
|
| | | vipLink("vip_link", "超级会员升级链接"), // 转移至VIPConfig 已废弃
|
| | | helpLinkVipInfo("help_link_vip_info", "超级会员详情页帮助链接"), // 已废弃
|
| | | ;
|
| | | |
| | | |
| | | |
| | |
|
| | | private final String key;
|
| | | private final String desc;
|
| | |
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.entity.common.ImageInfo;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
|
| | |
| | | };
|
| | | if (list.size() > 0) {
|
| | | Collections.sort(list, cm);
|
| | | Config conf = configService.getConfig("taobao_proxy_ip");
|
| | | Config conf = configService.getConfig(ConfigKeyEnum.taobaoProxyIP.getKey());
|
| | | conf.setValue(list.get(0).ip.trim());
|
| | | configService.update(conf);
|
| | | }
|
| | |
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.UserRankings;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService;
|
| | |
| | |
|
| | | // 上下 浮动金额范围
|
| | | double rangeAmount = 100;
|
| | | String range = configService.get("reward_rank_range");
|
| | | String range = configService.get(ConfigKeyEnum.rewardRankRange.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(range)) {
|
| | | rangeAmount = Double.parseDouble(range);
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.activity.RecommendActivityInviteInfo;
|
| | | import com.yeshi.fanli.entity.bus.activity.RecommendActivityTaoBaoGoods;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.ActivityException;
|
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | |
| | | data.put("fanMoney", shareMoney);
|
| | | data.put("shareId", shareRecord.getRedisKey());
|
| | | data.put("shareImg", loadResult);
|
| | | data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
|
| | |
|
| | | return data;
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.brand.BrandGoodsCahe;
|
| | | import com.yeshi.fanli.entity.brand.BrandInfo;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.SearchFilter;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
|
| | |
| | | int count = 0;
|
| | | int countShop = 0;
|
| | | JDSearchResult result = null;
|
| | | String way = configService.get("jd_api_search_key");
|
| | | String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey());
|
| | |
|
| | | // 删除店铺
|
| | | brandShopCaheService.removeByDateAndType(brandInfo.getId(), 20, date);
|
| | |
| | | import com.yeshi.fanli.dao.mybatis.ConfigMapper;
|
| | | import com.yeshi.fanli.entity.common.Config;
|
| | | import com.yeshi.fanli.entity.config.AppHomeFloatImg;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.xcx.XCXSettingConfig;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | if (version == null)
|
| | | return false;
|
| | |
|
| | | String value = get("xcx_setting");
|
| | | String value = get(ConfigKeyEnum.xcxSetting.getKey());
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return false;
|
| | | JSONArray array = JSONArray.fromObject(value);
|
| | |
| | |
|
| | | @Override
|
| | | public XCXSettingConfig getXCXInfoByGhId(String ghId) {
|
| | | String value = get("xcx_setting");
|
| | | String value = get(ConfigKeyEnum.xcxSetting.getKey());
|
| | | JSONArray array = JSONArray.fromObject(value);
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | XCXSettingConfig config = new Gson().fromJson(array.optJSONObject(i).toString(), XCXSettingConfig.class);
|
| | |
| | |
|
| | | @Override
|
| | | public String getH5Host() {
|
| | | String value = get("h5_url");
|
| | | String value = get(ConfigKeyEnum.h5Url.getKey());
|
| | | String[] sts = value.split(",");
|
| | | value = sts[(int) (sts.length * Math.random())];
|
| | | return value.trim();
|
| | |
| | | @Cacheable(value = "config", key = "'iosOnLining'+#version")
|
| | | @Override
|
| | | public boolean iosOnLining(int version) {
|
| | | String value = get("ios_onling_version");
|
| | | String value = get(ConfigKeyEnum.iosOnlingVersion.getKey());
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return false;
|
| | | return version >= Integer.parseInt(value);
|
| | |
| | | @Cacheable(value = "config", key = "'isConvertTaoBaoLinkInServer'")
|
| | | @Override
|
| | | public boolean isConvertTaoBaoLinkInServer() {
|
| | | String value = get("convert_taobao_link_in_server");
|
| | | String value = get(ConfigKeyEnum.convertTaoBaoLinkInServer.getKey());
|
| | | if (StringUtil.isNullOrEmpty(value))
|
| | | return false;
|
| | | if ("1".equalsIgnoreCase(value.trim()))
|
| | |
| | | @Cacheable(value = "config", key = "'getAppHomeFloatImg'")
|
| | | @Override
|
| | | public AppHomeFloatImg getAppHomeFloatImg() {
|
| | | String value = get("app_float_img");
|
| | | String value = get(ConfigKeyEnum.appFloatImg.getKey());
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | Gson gson = new Gson();
|
| | | AppHomeFloatImg appHomeFloatImg = gson.fromJson(value, AppHomeFloatImg.class);
|
| | |
| | | @Cacheable(value = "config", key = "'getHomeWEEXUrl'")
|
| | | @Override
|
| | | public String getHomeWEEXUrl() {
|
| | | String value = get("home_weex_url");
|
| | | String value = get(ConfigKeyEnum.homeWeexUrl.getKey());
|
| | | return value;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | public ProxyIP getTaoBaoProxyIP() {
|
| | | String value = get("taobao_proxy_ip");
|
| | | String value = get(ConfigKeyEnum.taobaoProxyIP.getKey());
|
| | | try {
|
| | | String[] sts = value.split(":");
|
| | | return new ProxyIP(sts[0], Integer.parseInt(sts[1]));
|
| | |
| | |
|
| | | @Override
|
| | | public String getAppHomeFloatNotifyImg() {
|
| | |
|
| | | return get("home_float_notify_img");
|
| | | return get(ConfigKeyEnum.homeFloatNotifyImg.getKey());
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | @Cacheable(value = "config", key = "'getSearchDiscoveryKeys'")
|
| | | @Override
|
| | | public String getSearchDiscoveryKeys() {
|
| | | List<Config> list = configMapper.listByKey("search_discovery_keys", null, null);
|
| | | List<Config> list = configMapper.listByKey(ConfigKeyEnum.searchDiscoveryKeys.getKey(), null, null);
|
| | | if (list == null || list.size() == 0)
|
| | | return null;
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public Integer getSex(String device) {
|
| | | DeviceSex deviceSex = deviceSexDao.get(device);
|
| | | if (deviceSex != null) {
|
| | | return deviceSex.getSex();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void deleteSex(String device) {
|
| | | deviceSexDao.delete(device);
|
| | | }
|
| | | |
| | | @Override
|
| | | public int changeDeviceSex(Integer sex, String device) {
|
| | | if (sex == null || sex < 0 || sex > 2) {
|
| | | sex = 0;
|
| | | }
|
| | | |
| | | Integer sexDevice = getSex(device);
|
| | | if (sexDevice == null) {
|
| | | sexDevice = 0;
|
| | | }
|
| | | |
| | | if (sex == 0 && sexDevice != 0) {
|
| | | deleteSex(device);
|
| | | } |
| | | |
| | | if(sex > 0 && sex != sexDevice) {
|
| | | save(device, sex);
|
| | | }
|
| | | return sex;
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public int getDeviceSex(String device) {
|
| | | Integer sexDevice = getSex(device);
|
| | | if (sexDevice == null) {
|
| | | sexDevice = 0;
|
| | | DeviceSex deviceSex = deviceSexDao.get(device);
|
| | | if (deviceSex == null || deviceSex.getSex() == null) {
|
| | | return 0;
|
| | | }
|
| | | return sexDevice;
|
| | | return deviceSex.getSex();
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.AdActivityVersionControl.AdActivityType;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.Special;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.banner.SwiperPictureException;
|
| | | import com.yeshi.fanli.exception.homemodule.HomeNavbarException;
|
| | | import com.yeshi.fanli.exception.homemodule.SpecialException;
|
| | |
| | | if (hour < 6) {// 0-6点之间不进入自购立减的页面
|
| | | s.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("url", configService.get("tlj_own_buy_nogoods"));
|
| | | params.put("url", configService.get(ConfigKeyEnum.tljOwnBuyNogoods.getKey()));
|
| | | s.setParams(params.toString());
|
| | | } else {
|
| | | // 查询专题详情
|
| | |
| | | import com.yeshi.fanli.dto.jd.JDSearchResult;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.jd.JDGoodsException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.jd.JDGoodsService;
|
| | |
| | |
|
| | | private List<JDGoods> search(int page, int pageSize, String jdcid) {
|
| | | JDSearchResult result = null;
|
| | | String way = configService.get("jd_api_search_key");
|
| | | String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey());
|
| | | if ("1".equals(way)) { // API搜索
|
| | | JDFilter filterAPI = new JDFilter();
|
| | | filterAPI.setPageIndex(page);
|
| | |
| | | @Override
|
| | | public JDSearchResult getIndexJDGoods(int page) {
|
| | | JDSearchResult result = null;
|
| | | String way = configService.get("jd_api_search_key");
|
| | | String way = configService.get(ConfigKeyEnum.jdApiSearchKey.getKey());
|
| | | // TODO 需要调整规则
|
| | | way = "0";
|
| | | if ("1".equals(way)) {
|
| | |
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.ExtractException;
|
| | | import com.yeshi.fanli.exception.NotExistObjectException;
|
| | | import com.yeshi.fanli.exception.ObjectStateException;
|
| | |
| | | && (System.currentTimeMillis() - history.getCreateTime().getTime()) < 1000 * 60 * 60 * 24 * 7L)
|
| | | return 111;
|
| | |
|
| | | final String autoExtract = configService.get("extract_way"); // 是否自动转账
|
| | | final String maxCount = configService.get("extract_count_day");
|
| | | final String maxMoney = configService.get("extract_money_day");
|
| | | final String autoExtract = configService.get(ConfigKeyEnum.extractWay.getKey()); // 是否自动转账
|
| | | final String maxCount = configService.get(ConfigKeyEnum.extractDayCount.getKey());
|
| | | final String maxMoney = configService.get(ConfigKeyEnum.extractMoneyDay.getKey());
|
| | |
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKeyForUpdate(extract.getUserInfo().getId());
|
| | | // 余额不足
|
| | |
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.monitor.BusinessEmergent110Service;
|
| | | import com.yeshi.fanli.util.EmergencyUtil;
|
| | |
| | | if (!exist)
|
| | | stList.add(identifyCode);
|
| | | if (stList.size() >= limitCount) {// 触发报警
|
| | | if ("1".equalsIgnoreCase(configService.get("can_send_emergency_msg")))
|
| | | if ("1".equalsIgnoreCase(configService.get(ConfigKeyEnum.canSendEmergencyMsg.getKey())))
|
| | | EmergencyUtil.baoJin(key, "板栗快省【分享赚】", phones);
|
| | | }
|
| | | }
|
| | |
| | | if (!exist)
|
| | | stList.add(identifyCode);
|
| | | if (stList.size() >= limitCount) {// 触发报警
|
| | | if ("1".equalsIgnoreCase(configService.get("can_send_emergency_msg")))
|
| | | if ("1".equalsIgnoreCase(configService.get(ConfigKeyEnum.canSendEmergencyMsg.getKey())))
|
| | | EmergencyUtil.baoJin(key, "板栗快省【领券返利】", phones);
|
| | | }
|
| | | }
|
| | |
| | | if (!exist)
|
| | | stList.add(identifyCode);
|
| | | if (stList.size() >= limitCount) {// 触发报警
|
| | | if ("1".equalsIgnoreCase(configService.get("can_send_emergency_msg")))
|
| | | if ("1".equalsIgnoreCase(configService.get(ConfigKeyEnum.canSendEmergencyMsg.getKey())))
|
| | | EmergencyUtil.baoJin(key, "淘宝APPKey请求限制【" + appKey + "】", phones);
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.order.CommonOrderGoods;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | | import com.yeshi.fanli.entity.order.ShareGoodsActivityOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
| | | import com.yeshi.fanli.exception.order.HongBaoException;
|
| | | import com.yeshi.fanli.exception.order.ShareGoodsActivityOrderException;
|
| | |
| | | shareRate = hongBaoManageService.getShareRate(commonOrder.getCreateTime().getTime());
|
| | |
|
| | | // 判断订单分享活动是否开启
|
| | | if ("1".equalsIgnoreCase(configService.get("share_goods_activity_open"))) {
|
| | | if ("1".equalsIgnoreCase(configService.get(ConfigKeyEnum.shareGoodsActivityOpen.getKey()))) {
|
| | | // 没有订单,并且是渠道ID来的,并且
|
| | | UserExtraTaoBaoInfo taoBaoExtraInfo = userExtraTaoBaoInfoService
|
| | | .getByUid(commonOrder.getUserInfo().getId());
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.LostOrder;
|
| | | import com.yeshi.fanli.entity.bus.user.Order;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.LostOrderService;
|
| | |
| | |
|
| | | // 次数限制
|
| | | long count = lostOrderMapper.countTodayAppeal(lostOrder.getUserInfo().getId());
|
| | | String countMax = configService.get("order_appeal_count_day");
|
| | | String countMax = configService.get(ConfigKeyEnum.orderAppealCountDay.getKey());
|
| | | if (countMax != null && countMax.trim().length() > 0 && count >= Long.parseLong(countMax)) {
|
| | | return -7;
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.push.PushGoods;
|
| | | import com.yeshi.fanli.entity.push.PushGoodsGroup;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.exception.push.PushGoodsException;
|
| | |
| | |
|
| | | } else {
|
| | | /* 多个商品推送 */
|
| | | String url = configService.get("push_goods_details");
|
| | | String url = configService.get(ConfigKeyEnum.pushGoodsDetails.getKey());
|
| | | if (StringUtil.isNullOrEmpty(url)) {
|
| | | throw new PushGoodsException(1, "推送页面链接不存在");
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackDetail.RedPackDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackGiveRecord;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.redpack.RedPackGiveRecordException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.money.msg.UserMoneyMsgNotificationService;
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.TokenRecord.TokenTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoKeAppInfo;
|
| | | import com.yeshi.fanli.exception.taobao.TaoKeApiException;
|
| | |
| | | while (tips.contains("{APP名称}")) {
|
| | | tips = tips.replace("{APP名称}", projectChineseName);
|
| | | }
|
| | | tips = tips.replace("{口令}", token).replace("{下载链接}", configService.get("app_down_link")).replace("{面额}",
|
| | | tips = tips.replace("{口令}", token).replace("{下载链接}", configService.get(ConfigKeyEnum.appDownLink.getKey())).replace("{面额}",
|
| | | amount.setScale(0).toString());
|
| | |
|
| | | executor.execute(new Runnable() {
|
| | |
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.user.ShamUserMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.ShamUser;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | }
|
| | |
|
| | | List<String> imgList = new ArrayList<String>();
|
| | | String value = configService.get("shareBonusPicture");
|
| | | String value = configService.get(ConfigKeyEnum.shareBonusPicture.getKey());
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(value)) {
|
| | | JSONArray array = JSONArray.fromObject(value);
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserGoodsStorage;
|
| | | import com.yeshi.fanli.entity.goods.CommonGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.goods.CommonGoodsException;
|
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | |
| | | data.put("revenue", listGoodsBrief.size() + "个商品预估分享奖金:¥" + totalMoney);
|
| | | data.put("shareId", shareRecord.getRedisKey());
|
| | | data.put("shareImg", uploadResult);
|
| | | data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
|
| | | return data;
|
| | | }
|
| | |
|
| | |
| | | // 提示语不同
|
| | | if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | // 京东
|
| | | data.put("notifyDesc", configService.get("goods_share_notify_jd"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyJD.getKey()));
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
|
| | | // 拼多多
|
| | | data.put("notifyDesc", configService.get("goods_share_notify_pdd"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareNotifyPDD.getKey()));
|
| | | } else {
|
| | | data.put("notifyDesc", configService.get("goods_share_multiple_notify"));
|
| | | data.put("notifyDesc", configService.get(ConfigKeyEnum.goodsShareMultipleNotify.getKey()));
|
| | | }
|
| | | return data;
|
| | | }
|
| | |
| | | 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.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.user.ThreeSaleException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | }
|
| | |
|
| | | // 等级对照表
|
| | | String contrast = configService.get("user_rank_contrast");
|
| | | String contrast = configService.get(ConfigKeyEnum.userRankContrast.getKey());
|
| | | extraVO.setRankContrast(contrast);
|
| | | // 特别提醒
|
| | | String rankTip = configService.get("user_rank_tip");
|
| | | String rankTip = configService.get(ConfigKeyEnum.userRankTip.getKey());
|
| | | extraVO.setRankTip(rankTip);
|
| | |
|
| | | Integer rankOrderNum = extraVO.getRankOrderNum();
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserLotteryRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | |
| | | }
|
| | |
|
| | | // 抽奖规则
|
| | | String lotteryRule = configService.get("lottery_rule_newbies");
|
| | | String lotteryRule = configService.get(ConfigKeyEnum.lotteryRuleNewbies.getKey());
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | |
| | | }
|
| | |
|
| | | // 抽奖规则
|
| | | String lotteryRule = configService.get("lottery_rule_daily_rebate");
|
| | | String lotteryRule = configService.get(ConfigKeyEnum.lotteryRuleDailyRebate.getKey());
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", count);
|
| | |
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | |
| | | // 免单券、 福利免单券
|
| | |
|
| | | // 免单商品列表
|
| | | jumpLink.put("url", configService.get("free_goods_list"));
|
| | | jumpLink.put("url", configService.get(ConfigKeyEnum.freeGoodsList.getKey()));
|
| | |
|
| | | jumpBtn = new HashMap<String, Object>();
|
| | | jumpBtn.put("params", jumpLink);
|
| | |
| | |
|
| | | } else if (UserSystemCoupon.STATE_IN_USE == state) {
|
| | | // 使用中
|
| | | userCouponVO.setInUseExplain(configService.get("free_coupon_using-help"));
|
| | | userCouponVO.setInUseExplain(configService.get(ConfigKeyEnum.freeCouponUsingHelp.getKey()));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | userRecordVO.setJumpWelfare(jumpWelfare);
|
| | |
|
| | | // 跳转奖励券规则
|
| | | userRecordVO.setRuleLink(configService.get("reward_coupon_help"));
|
| | | userRecordVO.setRuleLink(configService.get(ConfigKeyEnum.rewardCouponHelp.getKey()));
|
| | |
|
| | | String rewardCouponRemark = configService.get("reward_coupon_remark");
|
| | | String rewardCouponRemark = configService.get(ConfigKeyEnum.rewardCouponRemark.getKey());
|
| | | if (rewardCouponRemark != null && rewardCouponRemark.trim().length() > 0) {
|
| | | userRecordVO.setRemark(JSONObject.fromObject(rewardCouponRemark));
|
| | | }
|
| | |
| | | String progressMsg = "";
|
| | | String progressColor = "";
|
| | | // 跳转奖励券规则
|
| | | userRecordVO.setRuleLink(configService.get("free_coupon_help"));
|
| | | userRecordVO.setRuleLink(configService.get(ConfigKeyEnum.freeCouponHelp.getKey()));
|
| | |
|
| | | // 进度: 1 灰色 2 红色 3 绿色
|
| | | String progressState1 = "3";
|
| | |
| | |
|
| | | jumpDetail = jumpDetailV2Service.getByTypeCache("welfareCore");
|
| | |
|
| | | rewardCouponRemark = configService.get("free_coupon_back_remark");
|
| | | rewardCouponRemark = configService.get(ConfigKeyEnum.freeCouponBackRemark.getKey());
|
| | |
|
| | | } else if (UserSystemCouponRecord.STATE_FAIL_DRAWBACK == stateRecord) {
|
| | | // 退款
|
| | |
| | |
|
| | | jumpDetail = jumpDetailV2Service.getByTypeCache("welfareCore");
|
| | |
|
| | | rewardCouponRemark = configService.get("free_coupon_back_remark");
|
| | | rewardCouponRemark = configService.get(ConfigKeyEnum.freeCouponBackRemark.getKey());
|
| | |
|
| | | } else if (UserSystemCouponRecord.STATE_FREE_ON == stateRecord) {
|
| | | // 免单中
|
| | |
| | | progressMsg = "免单发起,等待收货";
|
| | | }
|
| | |
|
| | | rewardCouponRemark = configService.get("free_coupon_remark");
|
| | | rewardCouponRemark = configService.get(ConfigKeyEnum.freeCouponRemark.getKey());
|
| | |
|
| | | } else if (UserSystemCouponRecord.STATE_SUCCESS == stateRecord) {
|
| | | // 免单成功
|
| | |
| | |
|
| | | jumpDetail = jumpDetailV2Service.getByTypeCache("capitalDetails");
|
| | |
|
| | | rewardCouponRemark = configService.get("free_coupon_remark");
|
| | | rewardCouponRemark = configService.get(ConfigKeyEnum.freeCouponRemark.getKey());
|
| | | }
|
| | | userRecordVO.setProgressState(progressState);
|
| | | userRecordVO.setPayMoney(payMoney);
|
| | |
| | | throws Exception {
|
| | | // 添加奖励券
|
| | | insertUserCoupon(uid, CouponTypeEnum.rebatePercentCoupon.name(), "系统赠送",
|
| | | new BigDecimal(configService.get("exchange_rebate_percent")), false);
|
| | | new BigDecimal(configService.get(ConfigKeyEnum.exchangeRebatePercent.getKey())), false);
|
| | | // 添加奖励券消息
|
| | | userOtherMsgNotificationService.systemGiveRewardCoupon(uid, null, MsgOtherSystemGiveDTOFactory
|
| | | .createRewardCouponGive(num, "请按照返利奖励券规则使用", "返利奖励券", orderId, orderType, reason));
|
| | |
| | | // 统计待激活数量
|
| | | if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | int activateCount = userSystemCouponActivateService.getActivateCount(userCouponVO.getId());
|
| | | String activateNum = configService.get("free_coupon_activate_num");
|
| | | String activateNum = configService.get(ConfigKeyEnum.freeCouponActivateNum.getKey());
|
| | | userCouponVO.setCouponEffect(
|
| | | "(" + activateCount + "/" + Integer.parseInt(activateNum) + ")待激活");
|
| | | }
|
| | |
| | | userCouponVO.setState(UserSystemCoupon.STATE_GIVE_ONLY);
|
| | | } else if (CouponTypeEnum.freeCoupon == type || CouponTypeEnum.welfareFreeCoupon == type
|
| | | || CouponTypeEnum.freeCouponBuy == type) {
|
| | | jumpLink.put("url", configService.get("free_goods_list"));
|
| | | jumpLink.put("url", configService.get(ConfigKeyEnum.freeGoodsList.getKey()));
|
| | | jumpBtn = new HashMap<String, Object>();
|
| | | jumpBtn.put("params", jumpLink);
|
| | | jumpBtn.put("jumpDetail", jumpDetailV2Service.getByTypeCache("web"));
|
| | |
| | | TokenTypeEnum tokenType = null;
|
| | | if (CouponTypeEnum.freeCouponGive == type) {
|
| | | userCouponVO.setState(UserSystemCoupon.STATE_GIVE_IN);
|
| | | tips = configService.get("give_free_coupon_tips");
|
| | | tips = configService.get(ConfigKeyEnum.giveFreeCouponTips.getKey());
|
| | | tokenType = TokenTypeEnum.freeCoupon;
|
| | | }
|
| | |
|
| | | if (CouponTypeEnum.rebatePercentCoupon == type) {
|
| | | userCouponVO.setState(UserSystemCoupon.STATE_GIVE_IN);
|
| | | tips = configService.get("give_rebate_percent_coupon_tips");
|
| | | tips = configService.get(ConfigKeyEnum.giveRebatePercentCouponTips.getKey());
|
| | | tokenType = TokenTypeEnum.rebatePercentCoupon;
|
| | | }
|
| | |
|
| | |
| | | tips = tips.replace("{APP名称}", projectChineseName);
|
| | | }
|
| | | tips = tips.replace("{口令}", tokenRecord.getToken()).replace("{下载链接}",
|
| | | configService.get("app_down_link"));
|
| | | configService.get(ConfigKeyEnum.appDownLink.getKey()));
|
| | | userCouponVO.setGiveTips(tips);
|
| | | }
|
| | |
|
| | |
| | | TokenTypeEnum tokenTypeEnum = null;
|
| | | if (type == CouponTypeEnum.freeCouponGive) {
|
| | | tokenTypeEnum = TokenTypeEnum.freeCoupon;
|
| | | tips = configService.get("give_free_coupon_tips");
|
| | | tips = configService.get(ConfigKeyEnum.giveFreeCouponTips.getKey());
|
| | | } else if (type == CouponTypeEnum.rebatePercentCoupon) {
|
| | | tokenTypeEnum = TokenTypeEnum.rebatePercentCoupon;
|
| | | tips = configService.get("give_rebate_percent_coupon_tips");
|
| | | tips = configService.get(ConfigKeyEnum.giveRebatePercentCouponTips.getKey());
|
| | | } else {
|
| | | throw new UserSystemCouponException(1, "该券不支持赠送");
|
| | | }
|
| | |
| | | tips = tips.replace("{APP名称}", projectChineseName);
|
| | | }
|
| | | tips = tips.replace("{口令}", tokenRecord.getToken()).replace("{下载链接}",
|
| | | configService.get("app_down_link"));
|
| | | configService.get(ConfigKeyEnum.appDownLink.getKey()));
|
| | |
|
| | | return createUserCouponVOo(userSystemCoupon, systemCoupon, record, tips);
|
| | | }
|
| | |
| | | while (tips.contains("{APP名称}")) {
|
| | | tips = tips.replace("{APP名称}", projectChineseName);
|
| | | }
|
| | | tips = tips.replace("{口令}", token).replace("{下载链接}", configService.get("app_down_link"));
|
| | | tips = tips.replace("{口令}", token).replace("{下载链接}", configService.get(ConfigKeyEnum.appDownLink.getKey()));
|
| | |
|
| | | UserSystemCouponVO couponVO = createUserCouponVOo(userSystemCoupon, systemCoupon, giveRecord, tips);
|
| | |
|
| | |
| | |
|
| | | // 激活数量
|
| | | boolean result = false;
|
| | | int limitNum = Integer.parseInt(configService.get("free_coupon_activate_num"));
|
| | | int limitNum = Integer.parseInt(configService.get(ConfigKeyEnum.freeCouponActivateNum.getKey()));
|
| | |
|
| | | Integer state = couponActivate.getState();
|
| | | int count = couponActivate.getCount();
|
| | |
| | | import com.yeshi.fanli.entity.integral.IntegralExchange;
|
| | | import com.yeshi.fanli.entity.integral.IntegralExchange.ExchangeTypeEnum;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.exception.integral.IntegralExchangeException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | } else if (ExchangeTypeEnum.rebatePercentCoupon == type) {
|
| | | thing = "返利奖励券";
|
| | | thingNum = "1张";
|
| | | String percent = configService.get("exchange_rebate_percent");
|
| | | String percent = configService.get(ConfigKeyEnum.exchangeRebatePercent.getKey());
|
| | | userSystemCouponService.exchangeCoupon(uid, CouponTypeEnum.rebatePercentCoupon.name(),
|
| | | UserSystemCoupon.SOURCE_EXCHANGE, new BigDecimal(percent));
|
| | | couponNews = 1;
|
| | |
| | | import com.yeshi.fanli.entity.integral.IntegralTaskClass;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskClass.UniqueKeyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | if (uid == null || originUid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_order_reward_boss");
|
| | | String reward = configService.get(ConfigKeyEnum.firstOrderRewardBoss.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, originUid, Integer.parseInt(reward), "一", beizu);
|
| | |
| | | if (uid == null || originUid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_order_reward_boss_super");
|
| | | String reward = configService.get(ConfigKeyEnum.firstOrderRewardBossSuper.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, originUid, Integer.parseInt(reward), "二", beizu);
|
| | |
| | | if (uid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_share_order_reward");
|
| | | String reward = configService.get(ConfigKeyEnum.firstShareOrderReward.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, null, Integer.parseInt(reward), null, beizu);
|
| | |
| | | if (uid == null || originUid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_share_order_reward_boss");
|
| | | String reward = configService.get(ConfigKeyEnum.firstShareOrderRewardBoss.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, originUid, Integer.parseInt(reward), "一", beizu);
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.vip.UserVIPInfo;
|
| | | import com.yeshi.fanli.entity.integral.IntegralDetail;
|
| | | import com.yeshi.fanli.entity.shop.BanLiShopOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum;
|
| | | import com.yeshi.fanli.exception.user.vip.UserVIPInfoException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | |
| | |
|
| | | try {
|
| | | // 奖励券
|
| | | BigDecimal percent = new BigDecimal(configService.get("exchange_rebate_percent"));
|
| | | BigDecimal percent = new BigDecimal(configService.get(ConfigKeyEnum.exchangeRebatePercent.getKey()));
|
| | | for (int i = 0; i < Constant.VIP_COUPON_REWARD_NUM; i++) {
|
| | | userSystemCouponService.insertUserCoupon(uid, CouponTypeEnum.rebatePercentCoupon.name(),
|
| | | UserSystemCoupon.SOURCE_SYSTEM_PUSH, percent, false);
|
| | |
| | | userInviteSeparateService.updateStateByWorkerIdAndBossId(uid, bossId, UserInviteSeparate.STATE_INVALID);
|
| | |
|
| | | // 限制时间
|
| | | int limitDays = Integer.parseInt(configService.get("invite_separate_limit_days"));
|
| | | int limitDays = Integer.parseInt(configService.get(ConfigKeyEnum.inviteSeparateLimitDays.getKey()));
|
| | | UserInviteSeparate inviteSeparate = new UserInviteSeparate();
|
| | | inviteSeparate.setBossId(bossId);
|
| | | inviteSeparate.setWorkerId(uid);
|
| | |
| | | // 脱离邀请关系
|
| | | threeSaleSerivce.inviteSeparate(workerId, bossId);
|
| | |
|
| | | int limitDays = Integer.parseInt(configService.get("invite_separate_limit_days"));
|
| | | int limitDays = Integer.parseInt(configService.get(ConfigKeyEnum.inviteSeparateLimitDays.getKey()));
|
| | | // 消息
|
| | | UserInfo userInfo = userInfoService.selectByPKey(workerId);
|
| | | MsgOtherVIPDTO msgboss = new MsgOtherVIPDTO();
|
| | |
| | | */
|
| | | public void save(String device, Integer sex);
|
| | |
|
| | | /**
|
| | | * 获取设置
|
| | | * @param device
|
| | | * @return
|
| | | */
|
| | | public Integer getSex(String device);
|
| | |
|
| | |
|
| | | /**
|
| | | * 删除
|
| | | * @param device
|
| | | */
|
| | | public void deleteSex(String device);
|
| | |
|
| | | /**
|
| | | * 获取设备性别
|
| | |
| | | * @return
|
| | | */
|
| | | public int getDeviceSex(String device);
|
| | |
|
| | | /**
|
| | | * 改变设备信息
|
| | | * @param sex
|
| | | * @param device
|
| | | * @return
|
| | | */
|
| | | public int changeDeviceSex(Integer sex, String device);
|
| | |
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.msg;
|
| | |
|
| | | import com.yeshi.fanli.dto.msg.MsgCommonDTO;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.config.ConfigException;
|
| | |
|
| | | public interface MsgConfigService {
|
| | |
|
| | | public String KEY_ZHUSHOU = "msg-config-zhushou";
|
| | | public String KEY_GUANXUAN = "msg-config-guanxuan";
|
| | | public String KEY_NOTIFY = "msg-config-notify";
|
| | | public String KEY_ZHUSHOU = ConfigKeyEnum.msgConfigZhushou.getKey();
|
| | | public String KEY_GUANXUAN = ConfigKeyEnum.msgConfigGuanxuan.getKey();
|
| | | public String KEY_NOTIFY = ConfigKeyEnum.msgConfigNotify.getKey();
|
| | |
|
| | | /**
|
| | | * 添加小助手消息
|
| | |
| | | public static String Extract_Activty;
|
| | | public static String HB_Activity;
|
| | |
|
| | | public static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | | public static final String MYLIKE = "mylike";
|
| | | public static final String MYDYNAMIC = "mydynamic";
|
| | |
|