| | |
| | | import com.yeshi.fanli.entity.taobao.TaoBaoLink; |
| | | import com.yeshi.fanli.exception.dynamic.ActivityUserException; |
| | | import com.yeshi.fanli.exception.dynamic.GoodsEvaluateException; |
| | | import com.yeshi.fanli.exception.goods.ConvertLinkExceptionException; |
| | | import com.yeshi.fanli.exception.goods.ConvertLinkException; |
| | | import com.yeshi.fanli.exception.taobao.TaoBaoConvertLinkException; |
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException; |
| | | import com.yeshi.fanli.lijin.manager.GoodsLijinMnager; |
| | |
| | | if (!StringUtil.isNullOrEmpty(content) && commentInfo.getNeedSpin()) { |
| | | try { |
| | | convertLinkManager.convertLinkFromText(system, content, Constant.LINK_TOKEN_VERIFY_UID, true, false); |
| | | } catch (ConvertLinkExceptionException e) { |
| | | if (ConvertLinkExceptionException.CODE_NONE != e.getCode()) { |
| | | } catch (ConvertLinkException e) { |
| | | if (ConvertLinkException.CODE_NONE != e.getCode()) { |
| | | throw new GoodsEvaluateException(1, "包含不可转链的口令与链接"); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | for (String st : activityIdList) |
| | | content = content.replace(st, ""); |
| | | content = content.replace("{relationId}", ""); |
| | | if (system == SystemEnum.yhqjx) { |
| | | if (system == SystemEnum.yhqjx || system == SystemEnum.hsb) { |
| | | content = content.replace("\n", "<br>"); |
| | | } |
| | | commentInfoNew.setContent(content); |
| | |
| | | simpleGoods.setState(1); |
| | | simpleGoods.setRemarks("评论验证下架"); |
| | | } |
| | | if (system == SystemEnum.yhqjx) { |
| | | if (system == SystemEnum.yhqjx || system == SystemEnum.hsb) { |
| | | imgInfo.setGoods(null); |
| | | } |
| | | } |
| | |
| | | |
| | | Date limitDate = DateUtil.reduceDay(new Date(), 7); |
| | | |
| | | String identifyCode = "dataoke-" + StringUtil.Md5(DaTaoKeTipOffUtil.getRecoomendDesc(dto)) + "-" + dto.getUpdateTime().getTime(); |
| | | String identifyCode = "dataoke-" + StringUtil.Md5(DaTaoKeTipOffUtil.getRecoomendDesc(dto)); |
| | | |
| | | GoodsEvaluate evaluate = goodsEvaluateDao.selectExistLimitTime(identifyCode, limitDate); |
| | | if (evaluate != null) |
| | |
| | | Set<String> imgSet = new HashSet<>(); |
| | | imgSet.addAll(imgs); |
| | | String id = dto.getIdList().get(0); |
| | | String source = dto.getSource(); |
| | | String source = dto.getPlatformType(); |
| | | switch (source) { |
| | | case "tmall": |
| | | case "taobao": |
| | | case "tb": |
| | | try { |
| | | TaoBaoGoodsBrief goodsBrief = TaoKeApiUtil.getSimpleGoodsInfo(Long.parseLong(id)); |
| | | TaoBaoGoodsBrief goodsBrief = TaoKeApiUtil.searchGoodsDetail(Long.parseLong(id)); |
| | | if (goodsBrief != null && goodsBrief.getImgList() != null) { |
| | | GoodsMoneyConfigParamsDTO params = orderHongBaoMoneyComputeService.getShowComputeRate("android", "55", system); |
| | | goods = GoodsDetailVOFactory.convertTaoBao(goodsBrief, params); |
| | | goods = goodsLijinMnager.loadTBMoneyInfo(system, null, goodsBrief, goods); |
| | | goods = goodsLijinMnager.loadTBMoneyInfo(system, null, goodsBrief, goods, false); |
| | | for (String img : goodsBrief.getImgList()) { |
| | | if (!imgSet.contains(img) && imgs.size() < 9) { |
| | | imgSet.add(img); |
| | |
| | | goodsEvaluate.setPublishTime(new Date()); |
| | | goodsEvaluate.setCreateTime(new Date()); |
| | | goodsEvaluate.setUpdateTime(new Date()); |
| | | goodsEvaluate.setGoods(goods); |
| | | //线报不显示商品 |
| | | if (goods != null && goods.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { |
| | | goods.setCreatetime(null); |
| | | goodsEvaluate.setGoods(goods); |
| | | } |
| | | goodsEvaluate.setLineNum(lineNum); |
| | | goodsEvaluate.setImgList(imgList); |
| | | goodsEvaluate.setComments(null); |