|
@@ -436,7 +436,8 @@ public class ShopServiceImpl implements ShopService {
|
|
|
// 供应商文章
|
|
|
ShopArticleVo shopArticle = articleMapper.getShopArticleById(articleId);
|
|
|
// 文章分类列表
|
|
|
- List<ArticleTypeVo> articleTypeList = articleMapper.getArticleTypeList();
|
|
|
+ List<ArticleTypeVo> articleTypeList = articleMapper.getArticleTypeList("0");
|
|
|
+ infoTypes(articleTypeList);
|
|
|
// 文章标签列表
|
|
|
String articleLabels = articleMapper.getArticleLabelList();
|
|
|
// 文章关联的标签库
|
|
@@ -551,10 +552,19 @@ public class ShopServiceImpl implements ShopService {
|
|
|
|
|
|
@Override
|
|
|
public ResponseJson<List<ArticleTypeVo>> getArticleTypeList() {
|
|
|
- List<ArticleTypeVo> articleTypeList = articleMapper.getArticleTypeList();
|
|
|
+ List<ArticleTypeVo> articleTypeList = articleMapper.getArticleTypeList("0");
|
|
|
+ infoTypes(articleTypeList);
|
|
|
return ResponseJson.success(articleTypeList);
|
|
|
}
|
|
|
-
|
|
|
+ public void infoTypes(List<ArticleTypeVo> articleTypes ) {
|
|
|
+ articleTypes.forEach(type->{
|
|
|
+ List<ArticleTypeVo> articleTypes1 = articleMapper.getArticleTypeList(type.getTypeId().toString());
|
|
|
+ if(articleTypes1.size()>0){
|
|
|
+ type.setArticleTypes(articleTypes1);
|
|
|
+ infoTypes(articleTypes1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
@Override
|
|
|
public ResponseJson<Void> deleteArticle(Integer articleId) {
|
|
|
articleMapper.deleteArticle(articleId);
|