Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-webapp-plug
Commits
32c312c6
Commit
32c312c6
authored
Jan 28, 2021
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码结构调整
parent
90ce1e53
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
0 deletions
+101
-0
ScreeningController.java
...java/com/gic/plug/web/controller/ScreeningController.java
+12
-0
WidgetValuesNewVO.java
src/main/java/com/gic/plug/web/vo/WidgetValuesNewVO.java
+49
-0
WidgetValuesOldVO.java
src/main/java/com/gic/plug/web/vo/WidgetValuesOldVO.java
+40
-0
No files found.
src/main/java/com/gic/plug/web/controller/ScreeningController.java
View file @
32c312c6
package
com
.
gic
.
plug
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.plug.web.vo.WidgetValuesNewVO
;
import
com.gic.plug.web.vo.WidgetValuesOldVO
;
import
com.gic.widget.screening.api.dto.EsScreeningChainDetailDTO
;
import
com.gic.widget.screening.api.dto.EsScreeningEnterpriseCategorySceneInfoDTO
;
import
com.gic.widget.screening.api.dto.EsScreeningTemplateDTO
;
import
com.gic.widget.screening.api.service.EsScreeningInitService
;
import
com.gic.widget.screening.api.service.EsScreeningTemplateService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -21,6 +26,7 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -88,6 +94,12 @@ public class ScreeningController {
for
(
EsScreeningEnterpriseCategorySceneInfoDTO
dto
:
list
)
{
String
categoryId
=
dto
.
getSceneCategoryId
();
EsScreeningChainDetailDTO
item
=
this
.
esScreeningInitService
.
findRootChainByCategoryId
(
categoryId
);
String
widgetValues
=
item
.
getWidget
().
getWidgetValues
();
if
(
StringUtils
.
isNotBlank
(
widgetValues
))
{
List
<
WidgetValuesOldVO
>
oldVOS
=
JSONObject
.
parseArray
(
widgetValues
,
WidgetValuesOldVO
.
class
);
List
<
WidgetValuesNewVO
>
newVOList
=
oldVOS
.
stream
().
map
(
data
->
new
WidgetValuesNewVO
(
data
.
getKey
(),
data
.
getValue
(),
data
.
getName
())).
collect
(
Collectors
.
toList
());
item
.
getWidget
().
setWidgetValues
(
JSON
.
toJSONString
(
newVOList
));
}
all
.
add
(
item
);
}
return
RestResponse
.
success
(
all
);
...
...
src/main/java/com/gic/plug/web/vo/WidgetValuesNewVO.java
0 → 100644
View file @
32c312c6
package
com
.
gic
.
plug
.
web
.
vo
;
import
java.io.Serializable
;
/**
*
* @Description:
* @author zhiwj
* @date 2021-01-28 9:55
*/
public
class
WidgetValuesNewVO
implements
Serializable
{
private
String
key
;
private
String
label
;
private
String
value
;
public
WidgetValuesNewVO
()
{
}
public
WidgetValuesNewVO
(
String
key
,
String
label
,
String
value
)
{
this
.
key
=
key
;
this
.
label
=
label
;
this
.
value
=
value
;
}
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getLabel
()
{
return
label
;
}
public
void
setLabel
(
String
label
)
{
this
.
label
=
label
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
}
src/main/java/com/gic/plug/web/vo/WidgetValuesOldVO.java
0 → 100644
View file @
32c312c6
package
com
.
gic
.
plug
.
web
.
vo
;
import
java.io.Serializable
;
/**
*
* @Description:
* @author zhiwj
* @date 2021-01-28 9:55
*/
public
class
WidgetValuesOldVO
implements
Serializable
{
private
String
key
;
private
String
value
;
private
String
name
;
public
String
getKey
()
{
return
key
;
}
public
void
setKey
(
String
key
)
{
this
.
key
=
key
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment