Commit c56baac5 by 王力

Merge branch 'feature_mvp616_wangl' into 'develop'

Feature mvp616 wangl

See merge request !67
2 parents a52c3581 6d224b56
package com.alibaba.cloud.integration.order.entity; package com.alibaba.cloud.integration.order.entity;
import com.fasterxml.jackson.databind.JsonNode; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
...@@ -22,7 +24,8 @@ public class EngineerInfo { ...@@ -22,7 +24,8 @@ public class EngineerInfo {
private String vehicle; private String vehicle;
private String vehicleNo; private String vehicleNo;
private String beanStatus; private String beanStatus;
private JsonNode tags; @TableField(typeHandler = FastjsonTypeHandler.class)
private JSONObject tags;
private String memo; private String memo;
private Timestamp createTime; private Timestamp createTime;
private Timestamp updateTime; private Timestamp updateTime;
......
...@@ -382,17 +382,12 @@ public class EngineerServiceImpl implements EngineerService { ...@@ -382,17 +382,12 @@ public class EngineerServiceImpl implements EngineerService {
// 标签 // 标签
List<String> tags = new ArrayList<>(); List<String> tags = new ArrayList<>();
if (e.getTags() != null) { if (e.getTags() != null) {
Iterator<Map.Entry<String, JsonNode>> it = e.getTags().fields(); for(Map.Entry<String, Object> entry: e.getTags().entrySet()){
while(it.hasNext()){ tags.add(String.format("%s+%d", entry.getKey(), entry.getValue()));
Map.Entry<String, JsonNode> field = it.next();
String name = field.getKey();
JsonNode value = field.getValue();
tags.add(String.format("%s+%d",field.getKey(), field.getValue().intValue()));
} }
} else { } else {
item.setTags(tags); item.setTags(tags);
} }
items.add(item); items.add(item);
} }
return items; return items;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!