| | |
| | | for (String c : filter.getCateIds().split(",")) |
| | | cateList.add(Long.parseLong(c)); |
| | | } |
| | | return TaoKeApiUtil.searchWuLiao(filter, specialId, relationId); |
| | | return TaoKeApiUtil.searchWuLiaoNew(filter, specialId, relationId); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | if (1 > 0) |
| | | return TaoKeApiUtil.searchWuLiao(filter, null, null); |
| | | return TaoKeApiUtil.searchWuLiaoNew(filter, null, null); |
| | | |
| | | Map<String, String> params = new HashMap<String, String>(); |
| | | String key = filter.getKey(); |
| | |
| | | */ |
| | | public static TaoBaoGoodsBrief convert(CommonGoods commonGoods) { |
| | | TaoBaoGoodsBrief taoBaoGoods = new TaoBaoGoodsBrief(); |
| | | taoBaoGoods.setAuctionId(commonGoods.getGoodsId()); |
| | | if(!StringUtil.isNullOrEmpty(commonGoods.getGoodsSign())) { |
| | | taoBaoGoods.setAuctionId(commonGoods.getGoodsSign()); |
| | | }else{ |
| | | taoBaoGoods.setAuctionId(commonGoods.getGoodsId()); |
| | | } |
| | | taoBaoGoods.setBiz30day(commonGoods.getSales()); |
| | | taoBaoGoods.setCouponAmount(commonGoods.getCouponAmount()); |
| | | taoBaoGoods.setCouponInfo(commonGoods.getCouponInfo()); |
| | |
| | | if (StringUtil.isNullOrEmpty(relationId)) |
| | | return url; |
| | | if (!url.contains("&relationId=")) |
| | | return url + "&relationId=" + relationId; |
| | | if(url.contains("?")) { |
| | | return url + "&relationId=" + relationId; |
| | | }else{ |
| | | return url + "?relationId=" + relationId; |
| | | } |
| | | else |
| | | return url; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * @author hxh |
| | | * @return org.springframework.data.mongodb.core.query.Criteria |
| | | * @author hxh |
| | | * @description 获取mongodb商品ID相同的条件 |
| | | * @date 16:05 2022/8/24 |
| | | * @param: key |
| | | * @param: auctionId |
| | | * @return org.springframework.data.mongodb.core.query.Criteria |
| | | **/ |
| | | public static Criteria getAuctionIdEqualCriteria(String key, String auctionId) { |
| | | if (!isNewAuctionId(auctionId)) { |
| | | return Criteria.where(key).is(auctionId); |
| | | } else { |
| | | return Criteria.where(key).regex("*-" + getAuctionId(auctionId)); |
| | | return Criteria.where(key).regex("-" + getAuctionId(auctionId)); |
| | | } |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * @return java.lang.String |
| | | * @author hxh |
| | | * @description 获取淘宝的商品标题 |
| | | * @date 11:36 2022/9/9 |
| | | **/ |
| | | public static String getGoodsTitleFromTokenText(String text) { |
| | | String reg = "「.*」"; |
| | | Pattern p = Pattern.compile(reg); |
| | | Matcher matcher = p.matcher(text); |
| | | if (matcher.find()) { |
| | | String title = matcher.group(); |
| | | if(title!=null&&title.length()>0) { |
| | | return title.replace("「","").replace("」",""); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(isHaveNewVersionTaoBaoToken("復至\uD83D\uDC8B9.0₪sDO0X7l3Twm₪/ 去táo寶抢")); |
| | | // String reg = "「.*」"; |
| | | // Pattern p = Pattern.compile(reg); |
| | | // Matcher matcher = p.matcher("【淘宝】https://m.tb.cn/h.Ub3d7Kb?tk=g2Az2EmdcIX CZ3457 「造梦【蔷薇少女】复古碎花牛奶绒羊羔绒毛毯秋冬保暖休闲毯沙发毯」\n" + |
| | | // "点击链接直接打开"); |
| | | // if (matcher.find()) { |
| | | // String title = matcher.group(); |
| | | // System.out.println(title); |
| | | // } |
| | | String relationId = "1222"; |
| | | String url="http://123id=123"; |
| | | if(url.contains("?")) { |
| | | System.out.println(url + "&relationId=" + relationId); |
| | | }else{ |
| | | System.out.println(url + "?relationId=" + relationId); |
| | | } |
| | | } |
| | | |
| | | } |