Commit c1722b1c by zhangkb

修改导出标签类型和标签分析遇到id不存在的情况跳过

parent f763d7ba
......@@ -40,7 +40,7 @@ public class Tag implements Serializable, IExcelModel, IExcelDataModel{
@Excel(name = "排序权重", orderNum = "4", width=30)
private Integer order;
private Integer level;
@Excel(name = "标签类型", replace = { "系统标签_0", "自定义标签_1" }, orderNum = "5", width=30)
@Excel(name = "标签类型", replace = { "系统标签_0", "维度标签_1" }, orderNum = "5", width=30)
private String tagType; //0, 系统标签, 1 ,自定义标签
private String idPath;
......
......@@ -362,7 +362,12 @@ public class TagService {
//获取标签id
String tagId = map.get("_id").toString();
//根据标签id获取标签
Tag tag = this.getTagById(tagId);
Tag tag = null;
try {
tag = this.getTagById(tagId);
}catch(Exception e) {
tag = null;
}
if(tag!=null) {
tagMap.put("total",map.get("total"));
tagMap.put("name", tag.getName());
......@@ -383,7 +388,12 @@ public class TagService {
//获取标签id
String tagId = map.get("_id").toString();
//根据标签id获取标签
Tag tag = this.getTagById(tagId);
Tag tag = null;
try {
tag = this.getTagById(tagId);
}catch(Exception e) {
tag = null;
}
if(tag!=null) {
tagMap.put("total",map.get("total"));
tagMap.put("name", tag.getName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment