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;
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 java.sql.Timestamp;
......@@ -22,7 +24,8 @@ public class EngineerInfo {
private String vehicle;
private String vehicleNo;
private String beanStatus;
private JsonNode tags;
@TableField(typeHandler = FastjsonTypeHandler.class)
private JSONObject tags;
private String memo;
private Timestamp createTime;
private Timestamp updateTime;
......
......@@ -382,17 +382,12 @@ public class EngineerServiceImpl implements EngineerService {
// 标签
List<String> tags = new ArrayList<>();
if (e.getTags() != null) {
Iterator<Map.Entry<String, JsonNode>> it = e.getTags().fields();
while(it.hasNext()){
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()));
for(Map.Entry<String, Object> entry: e.getTags().entrySet()){
tags.add(String.format("%s+%d", entry.getKey(), entry.getValue()));
}
} else {
item.setTags(tags);
}
items.add(item);
}
return items;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!