|
@@ -24,6 +24,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.net.URLDecoder;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@@ -651,6 +652,12 @@ public class PageServiceImpl implements PageService {
|
|
|
// 设置售罄标记
|
|
|
Integer flag = priceMapper.getSaleOutFlag(product.getProductId()) > 0 ? 0 : 1;
|
|
|
product.setSaleOutFlag(flag);
|
|
|
+ // 关联标签库字符串
|
|
|
+ if (StringUtils.isNotBlank(product.getRelatedLabels())) {
|
|
|
+ String replaceAll = product.getRelatedLabels().replaceAll("##", ",");
|
|
|
+ product.setRelatedLabels(replaceAll);
|
|
|
+ }
|
|
|
+
|
|
|
return ResponseJson.success(product);
|
|
|
}
|
|
|
|
|
@@ -1142,6 +1149,22 @@ public class PageServiceImpl implements PageService {
|
|
|
fileArchive.setFileUrl(fileUrl);
|
|
|
}
|
|
|
});
|
|
|
+ // 获取标签
|
|
|
+ ArrayList<String> item = new ArrayList();
|
|
|
+ if (StringUtils.isNotBlank(archive.getLabelIds())) {
|
|
|
+ if (archive.getLabelIds().contains(",")) {
|
|
|
+ for (String s : archive.getLabelIds().split(",")) {
|
|
|
+ item.add(s);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ item.add(archive.getLabelIds());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<String> keyWordList = pageMapper.keyWordList(item);
|
|
|
+ item.clear();
|
|
|
+ for (String s : keyWordList) {
|
|
|
+ item.add(s);
|
|
|
+ }
|
|
|
ArchiveDetailVo archiveDetail = new ArchiveDetailVo();
|
|
|
archiveDetail.setImageArchiveList(imageArchiveList);
|
|
|
archiveDetail.setVideoArchiveList(videoArchiveList);
|
|
@@ -1151,6 +1174,7 @@ public class PageServiceImpl implements PageService {
|
|
|
archiveDetail.setProductName(archive.getProductName());
|
|
|
archiveDetail.setProductType(archive.getProductType());
|
|
|
archiveDetail.setShopName(archive.getShopName());
|
|
|
+ archiveDetail.setRelatedLabels(StringUtils.strip(item.toString(),"[]"));
|
|
|
return ResponseJson.success(archiveDetail);
|
|
|
}
|
|
|
|