🐛 【视频号】修正店铺主页展示的商品分类报错

This commit is contained in:
Zeyes Lee 2024-12-18 12:39:27 +08:00 committed by Binary Wang
parent 8891b68e79
commit 6b5d69667f
2 changed files with 1 additions and 59 deletions

View File

@ -28,5 +28,5 @@ public class CatTreeNode implements Serializable {
/** 是否在用户端展示该分类。1为是0为否 */
@JsonProperty("is_displayed")
private Integer displayed;
private Boolean displayed;
}

View File

@ -1,6 +1,5 @@
package me.chanjar.weixin.channel.bean.home.tree;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import java.util.List;
@ -43,61 +42,4 @@ public class TreeShowInfo implements Serializable {
}
return tree;
}
/**
* 创建一级分类节点
*
* @return 一级分类节点
*/
protected OneLevelTreeNode createLevel1() {
this.createTree();
if (tree.getLevel1() == null) {
tree.setLevel1(new OneLevelTreeNode());
}
return tree.getLevel1();
}
/**
* 创建二级分类节点
*
* @return 二级分类节点
*/
protected CatTreeNode createLevel2() {
OneLevelTreeNode level1 = this.createLevel1();
if (level1.getLevel2() == null) {
level1.setLevel2(new CatTreeNode());
}
return level1.getLevel2();
}
@JsonIgnore
public void setLevel1Id(Integer id) {
createLevel1().setId(id);
}
@JsonIgnore
public void setLevel1Name(String name) {
createLevel1().setName(name);
}
@JsonIgnore
public void setLevel1Displayed(Integer displayed) {
createLevel1().setDisplayed(displayed);
}
@JsonIgnore
public void setLevel2Id(Integer id) {
createLevel2().setId(id);
}
@JsonIgnore
public void setLevel2Name(String name) {
createLevel2().setName(name);
}
@JsonIgnore
public void setLevel2Displayed(Integer displayed) {
createLevel2().setDisplayed(displayed);
}
}