Commit 473ccf3b by 王力

Merge branch 'feature_mvp616_wangl' into 'develop'

实现tags字段

See merge request !71
2 parents 62e07ea3 d61785e6
package com.alibaba.cloud.integration.order.entity;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import java.sql.Timestamp;
import java.util.HashMap;
@Data
@TableName(autoResultMap = true)
......@@ -26,8 +26,10 @@ public class EngineerInfo {
private String vehicle;
private String vehicleNo;
private String beanStatus;
@TableField(typeHandler = FastjsonTypeHandler.class)
private JSONObject tags;
@TableField(typeHandler = JacksonTypeHandler.class)
private HashMap<String, Object> tags;
private String memo;
private Timestamp createTime;
private Timestamp updateTime;
......
......@@ -337,7 +337,7 @@ public class EngineerServiceImpl implements EngineerService {
// 标签
List<String> tags = new ArrayList<>();
if (e.getTags() != null && e.getTags().isEmpty()) {
for (JSONObject.Entry<String, Object> entry : e.getTags().entrySet()) {
for (Map.Entry<String, Object> entry : e.getTags().entrySet()) {
tags.add(String.format("%s+%s", entry.getKey(), entry.getValue().toString()));
}
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!