瀏覽代碼

修改showlist新需求,图片问题解决

zhangqiang 9 月之前
父節點
當前提交
03500b90a4

+ 14 - 3
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/okki/showlist/service/impl/OkkiShowlistServiceImpl.java

@@ -300,12 +300,12 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 			PushShowlistParam pushShowlistParam = new PushShowlistParam();
 			String queryStr = HttpClientUtils.buildQueryString(query);
 			pushShowlistParam.setShowlist_id(id);
-			pushShowlistParam.setUrl(okkiShowlist.getUrl());
 			pushShowlistParam.setJson_ld(okkiShowlist.getJsonLd());
 			// overview
 			OverviewParam overviewParam = new OverviewParam();
 			overviewParam.setOverview_type(okkiOverviews.get(0).getOverviewType());
 			overviewParam.setTitle(okkiOverviews.get(0).getTitle());
+			pushShowlistParam.setUrl(okkiOverviews.get(0).getTitle());
 			overviewParam.setContent(okkiOverviews.get(0).getContent());
 			overviewParam.setPic(okkiOverviews.get(0).getPic());
 			ButtonParam buttonParam = new ButtonParam();
@@ -332,8 +332,10 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 			pushShowlistParam.setProduct_list(productListParam);
 			// highlight
 			HighlightParam highlightParam = new HighlightParam();
-			highlightParam.setTitle(okkiShowlist.getHighlightTitle());
-			highlightParam.setContent(okkiShowlist.getHighlightContent());
+//			highlightParam.setTitle(okkiShowlist.getHighlightTitle());
+//			highlightParam.setContent(okkiShowlist.getHighlightContent());
+			highlightParam.setTitle("Title");
+			highlightParam.setContent("Content");
 			LayoutParam highlightLayoutParam = new LayoutParam();
 			highlightLayoutParam.setAlignment(okkiShowlist.getHighlightLayoutAlignment());
 			highlightLayoutParam.setColumns_per_row(okkiShowlist.getHighlightLayoutColumnsPerRow());
@@ -353,6 +355,15 @@ public class OkkiShowlistServiceImpl extends ServiceImpl<OkkiShowlistMapper, Okk
 			}
 			highlightParam.setBlock(highlightBlockParams);
 			// advantage
+			if (okkiAdvantages.size()>0) {
+				for (OkkiAdvantage okkiAdvantage : okkiAdvantages) {
+					if (!"".equals(okkiAdvantage.getBlockPic()) && okkiAdvantage.getBlockPic() != null) {
+						String imgUrl = uploadService.uploadImage(imageBaseUrl + okkiAdvantage.getBlockPic(), String.valueOf(okkiShowlist.getSiteId()));
+						System.out.println(imgUrl);
+						okkiAdvantage.setBlockPic(imgUrl);
+					}
+				}
+			}
 			ArrayList<AdvantageParam> advantageParams = new ArrayList<>();
 			AdvantageParam advantageParam = new AdvantageParam();
 			advantageParam.setTitle(okkiShowlist.getAdvantageTitle());