Logo增加白色图标

前台分类、标签数据处理去重
master
rong.liu 4 months ago
parent 44b9be9c6f
commit 7ea5d11708
  1. 13
      src/main/java/com/huoran/iasf/controller/CategoryController.java
  2. 3
      src/main/java/com/huoran/iasf/entity/Logo.java

@ -19,7 +19,9 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* 产品与课程分类表控制类 * 产品与课程分类表控制类
@ -100,12 +102,14 @@ public class CategoryController {
public R hasBeenCitedInTheArticle(@ApiParam(value = "类型标识") @RequestParam(required = false) Integer type, public R hasBeenCitedInTheArticle(@ApiParam(value = "类型标识") @RequestParam(required = false) Integer type,
@ApiParam(value = "站点id") @RequestParam(required = false) Integer siteId) { @ApiParam(value = "站点id") @RequestParam(required = false) Integer siteId) {
List<Category> categories = new ArrayList<>(); Set<Category> categories = new HashSet<>();
if (type == 0) { if (type == 0) {
// 类型 // 类型
List<Category> categoriesList = service.lookUpTheTypeOfReferenceBySite(siteId);
categories = service.lookUpTheTypeOfReferenceBySite(siteId); // 将List转换为Set
categories.addAll(categoriesList);
} else { } else {
// 分类、标签 // 分类、标签
@ -119,14 +123,13 @@ public class CategoryController {
categories.add(category); categories.add(category);
} }
} }
} }
} }
return R.success(categories); return R.success(categories);
} }
/** /**
* 查询分类详情 * 查询分类详情
* *

@ -31,6 +31,9 @@ public class Logo implements Serializable {
@ApiModelProperty(value = "图标") @ApiModelProperty(value = "图标")
private String logoUrl; private String logoUrl;
@ApiModelProperty(value = "白底图标")
private String whiteUrl;
@ApiModelProperty(value = "站点id") @ApiModelProperty(value = "站点id")
private Integer siteId; private Integer siteId;

Loading…
Cancel
Save