yj
2020-03-05 b795e890ab9d1c4636b58eac238721aa738baf58
fanli/src/main/java/com/yeshi/fanli/controller/admin/GoodsEvaluateAdminController.java
@@ -29,6 +29,7 @@
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.exception.dynamic.GoodsEvaluateException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.service.manger.ClipboardAnalysisManager;
@@ -135,9 +136,9 @@
    * @param out
    */
   @RequestMapping(value = "saveGoodsCoupon")
   public void saveGoodsCoupon(String callback, String pid, String tags, String tagDesc, PrintWriter out) {
   public void saveGoodsCoupon(String callback, String pid, String content, PrintWriter out) {
      try {
         goodsEvaluateService.saveGoodsCoupon(pid, tags, tagDesc);
         goodsEvaluateService.saveGoodsCoupon(pid, content);
         JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("保存成功"));
      } catch (GoodsEvaluateException e) {
         JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
@@ -239,7 +240,7 @@
                  && goodsEvaluate.getComments().size() > 0) {
               for (CommentInfo info : goodsEvaluate.getComments()) {
                  if (info != null)
                     if (CommentInfoEnum.currencyCoupon == info.getType()) {
                     if (CommentInfoEnum.currencyCoupon == info.getTypeEnum()) {
                        commentInfo = info;
                     }
               }
@@ -270,7 +271,7 @@
                  && goodsEvaluate.getComments().size() > 0) {
               for (CommentInfo info : goodsEvaluate.getComments()) {
                  if (info != null)
                     if (CommentInfoEnum.goodsCoupon == info.getType()) {
                     if (CommentInfoEnum.goodsCoupon == info.getTypeEnum()) {
                        commentInfo = info;
                     }
               }
@@ -440,6 +441,8 @@
      } catch (Exception e) {
         JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("保存失败"));
         e.printStackTrace();
         LogHelper.errorDetailInfo(e);
         LogHelper.test(e);
      }
   }
@@ -689,6 +692,20 @@
         if (commonGoods.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) {
            try {
               TaoBaoGoodsBrief goodsBrief = redisManager.getTaoBaoGoodsBrief(commonGoods.getGoodsId());
               String pictUrlWhite = goodsBrief.getPictUrlWhite();
               if (!StringUtil.isNullOrEmpty(pictUrlWhite)) {
                  goodsBrief.setPictUrl(pictUrlWhite);
                  List<String> picList = new ArrayList<>();
                  picList.add(pictUrlWhite);
                  List<String> imgList = goodsBrief.getImgList();
                  if (imgList != null) {
                     picList.addAll(imgList);
                  }
                  goodsBrief.setImgList(picList);
               }
               goodsDetail = GoodsDetailVOFactory.convertTaoBao(goodsBrief, params);
            } catch (TaobaoGoodsDownException e) {
               JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该商品已下架"));