mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-22 18:36:52 +08:00
adding productsearchTag select
This commit is contained in:
@@ -70,27 +70,27 @@ public class GoodController {
|
||||
List<String> brandNameList = new ArrayList<>();
|
||||
List<String> tagNameList = new ArrayList<>();
|
||||
int count = 0;
|
||||
String categoryName = "";
|
||||
for (String categoryKey : paramMap.keySet()) {
|
||||
if(categoryKey == "categoryName" || categoryKey == "tagFunction" || categoryKey == "tagUsedAge" || categoryKey == "tagBreed") {
|
||||
if(categoryKey == "categoryName" || categoryKey == "tagFunction" || categoryKey == "tagUsedAge" || categoryKey == "tagBreed" || categoryKey == "tagStatus") {
|
||||
switch (categoryKey) {
|
||||
case "categoryName":
|
||||
categoryName = "专区";
|
||||
brandNameList.add("专区");
|
||||
break;
|
||||
case "tagFunction":
|
||||
categoryName = "功能";
|
||||
brandNameList.add("功能");
|
||||
break;
|
||||
case "tagUsedAge":
|
||||
categoryName = "年龄";
|
||||
brandNameList.add("年龄");
|
||||
break;
|
||||
case "tagBreed":
|
||||
categoryName = "品种";
|
||||
brandNameList.add("品种");
|
||||
break;
|
||||
}
|
||||
brandNameList.add(categoryName);
|
||||
count++;
|
||||
for (String tagName : paramMap.get(categoryKey).split(",")) {
|
||||
tagNameList.add(tagName);
|
||||
if (categoryKey != "tagStatus") {
|
||||
tagNameList.add(tagName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,14 +103,19 @@ public class GoodController {
|
||||
String tagCode = String.join(",", tagCodeList);
|
||||
productQueryEntity.setTags(tagCode);
|
||||
}
|
||||
if(productQueryEntity.getTagStatus() != null && productQueryEntity.getTagStatus() != "") {
|
||||
if (productQueryEntity.getTagStatus().equals("1") || productQueryEntity.getTagStatus().equals("0")) {
|
||||
productQueryEntity.setCount("4");
|
||||
}else{
|
||||
if(brandNameList.size() == 0 && productQueryEntity.getTagStatus() != null && productQueryEntity.getTagStatus() != "") {
|
||||
productQueryEntity.setCount("1");
|
||||
}
|
||||
}else{
|
||||
productQueryEntity.setCount(StringUtil.toString(count));
|
||||
if (productQueryEntity.getTagStatus() != null && productQueryEntity.getTagStatus() != "" && brandNameList.size() != 0) {
|
||||
if(productQueryEntity.getCategoryName() != "" &&productQueryEntity.getCategoryName() != null) {
|
||||
productQueryEntity.setCount(StringUtil.toString(count -1));
|
||||
}else{
|
||||
productQueryEntity.setCount(StringUtil.toString(count));
|
||||
}
|
||||
}else{
|
||||
productQueryEntity.setCount(StringUtil.toString(count));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ public class GoodService {
|
||||
|
||||
public String brandQuery(ProductQueryEntity productQueryEntity) throws Exception {
|
||||
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(productQueryEntity);
|
||||
// paramMap.remove("petType");
|
||||
paramMap.remove("categoryName");
|
||||
paramMap.remove("tagUsedAge");
|
||||
paramMap.remove("tagFunction");
|
||||
|
||||
Reference in New Issue
Block a user