Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d61785e6
authored
Jun 13, 2023
by
wangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现tags字段
1 parent
eeda320f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/EngineerInfo.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/EngineerServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/EngineerInfo.java
View file @
d61785e
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.
Fastj
sonTypeHandler
;
import
com.baomidou.mybatisplus.extension.handlers.
Jack
sonTypeHandler
;
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
;
...
...
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/EngineerServiceImpl.java
View file @
d61785e
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment