Merge remote-tracking branch 'origin/master'
| | |
| | | }
|
| | |
|
| | | private void closeWebPage(PrintWriter out) {
|
| | | String script = "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href = 'yestv://toast#%s';setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.finishPage();}</script>";
|
| | | String script = "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.finishPage();}</script>";
|
| | | out.print(script);
|
| | | }
|
| | |
|
| | |
| | | */
|
| | | @RequestMapping(value = "getOrderParseConfig", method = RequestMethod.POST)
|
| | | public void getOrderParseConfig(AcceptData acceptData, PrintWriter out) {
|
| | | String orderJS = configService.get("taobao_order_parse_js");
|
| | | JSONObject data = new JSONObject();
|
| | | try {
|
| | | data.put("orderJS", DESUtil.encode(orderJS, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | StringUtil.getBase64String("*M#34f?,")));
|
| | | data.put("orderUrl", DESUtil.encode("https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm",
|
| | | StringUtil.getBase64String("YeShiFANLI889*+"), StringUtil.getBase64String("*M#34f?,")));
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | out.print(JsonUtil.loadFalseResult(1, "暂不支持"));
|
| | | |
| | | // String orderJS = configService.get("taobao_order_parse_js");
|
| | | // JSONObject data = new JSONObject();
|
| | | // try {
|
| | | // data.put("orderJS", DESUtil.encode(orderJS, StringUtil.getBase64String("YeShiFANLI889*+"),
|
| | | // StringUtil.getBase64String("*M#34f?,")));
|
| | | // data.put("orderUrl", DESUtil.encode("https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm",
|
| | | // StringUtil.getBase64String("YeShiFANLI889*+"), StringUtil.getBase64String("*M#34f?,")));
|
| | | // } catch (Exception e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.help.AppPageNotification;
|
| | | import com.yeshi.fanli.service.inter.help.AppPageNotificationService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | |
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | @Controller
|
| | |
| | | }
|
| | |
|
| | | AppPageNotification ap = appPageNotificationService.getAppPageNotificationByTypeCache(type);
|
| | | if ("home".equalsIgnoreCase(type)
|
| | | && VersionUtil.smallerThan_1_5_1(acceptData.getPlatform(), acceptData.getVersion()) && ap != null) {
|
| | | ap.setCanClose(false);
|
| | | ap.setContent("尊敬的用户,为更加准确高效的为你返利、省钱,请升级到返利券最新版本");
|
| | | Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
|
| | | out.print(JsonUtil.loadTrueResult(gson.toJson(ap)));
|
| | | return;
|
| | | }
|
| | |
|
| | | // 没有通知
|
| | | if (ap == null || !ap.getShow()) {
|
| | | out.print(JsonUtil.loadFalseResult(2, "无通知"));
|
| | |
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | | import org.yeshi.utils.BigDecimalUtil;
|
| | | import org.yeshi.utils.HttpUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.goods.ShareGoodsTextTemplateMapper;
|
| | |
| | | String shortLink, boolean hasCoupon) {
|
| | |
|
| | | if (!hasCoupon) {
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", goods.getZkPrice().toString())
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", BigDecimalUtil.getWithNoZera(goods.getZkPrice()).toString())
|
| | | .replace("{月销量}", TaoBaoUtil.getSaleCount(goods.getBiz30day())).replace("{短链}", shortLink)
|
| | | .replace("{淘口令}", "").replace("{店铺类型}", goods.getUserType() == 1 ? "天猫价"
|
| | | : "淘宝价");
|
| | | } else {
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", goods.getZkPrice().toString())
|
| | | return template.replace("{标题}", goods.getTitle()).replace("{商品原价}", BigDecimalUtil.getWithNoZera( goods.getZkPrice()).toString())
|
| | | .replace("{月销量}", TaoBaoUtil.getSaleCount(goods.getBiz30day())).replace("{领券短链}", shortLink)
|
| | | .replace("{淘口令}", token).replace("{优惠券面额}", goods.getCouponAmount().toString())
|
| | | .replace("{优惠券价}", TaoBaoUtil.getAfterUseCouplePrice(goods).toString())
|
| | | .replace("{淘口令}", token).replace("{优惠券面额}", BigDecimalUtil.getWithNoZera(goods.getCouponAmount()).toString())
|
| | | .replace("{优惠券价}", BigDecimalUtil.getWithNoZera( TaoBaoUtil.getAfterUseCouplePrice(goods)).toString())
|
| | | .replace("{店铺类型}", goods.getUserType() == 1 ? "天猫价" : "淘宝价");
|
| | | }
|
| | | }
|
| | |
| | | else
|
| | | return false;
|
| | | }
|
| | | |
| | | |
| | | public static boolean smallerThan_1_5_1(String platform, String versionCode) {
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) < 36))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) < 44)))
|
| | | return true;
|
| | | else
|
| | | return false;
|
| | | }
|
| | |
|
| | | }
|