Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
1
Merge Requests
1
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
haoban3.0
haoban-manage3.0
Commits
6687cea8
Commit
6687cea8
authored
Aug 07, 2023
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cms迁移
parent
d8cf1016
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
MaterialDataAdaptor.java
.../service/service/content/adaptor/MaterialDataAdaptor.java
+6
-7
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialDataAdaptor.java
View file @
6687cea8
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
adaptor
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.DataApiUtils
;
import
com.gic.haoban.manage.api.enums.content.MaterialReportType
;
import
com.gic.haoban.manage.service.util.DataTargetHttpUtils
;
import
lombok.AllArgsConstructor
;
...
...
@@ -76,17 +78,16 @@ public class MaterialDataAdaptor {
if
(
MaterialReportType
.
MONTH
.
getCode
().
equals
(
reportType
))
{
apolloKey
=
CLERK_MONTH_DATA
;
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
params
.
put
(
"inFields"
,
inlineParams
);
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
clerkId
))
{
inlineParams
.
put
(
"clerkId"
,
clerkId
);
}
inlineParams
.
put
(
"enterpriseId"
,
enterpriseId
);
inlineParams
.
put
(
"bizDate"
,
bizDate
);
inlineParams
.
put
(
"storeId"
,
storeId
);
inlineParams
.
put
(
"orderByField"
,
"storeId asc"
);
Map
<
String
,
Object
>
result
=
this
.
doHttp
(
JSON
.
toJSONString
(
params
),
apolloKey
);
inlineParams
.
put
(
"orderByFields"
,
2
);
inlineParams
.
put
(
"orderByType"
,
1
);
Map
<
String
,
Object
>
result
=
DataApiUtils
.
http
(
inlineParams
.
toString
(),
apolloKey
);
if
(
result
.
get
(
"data"
)
==
null
)
{
return
null
;
}
...
...
@@ -124,9 +125,7 @@ public class MaterialDataAdaptor {
if
(
MaterialReportType
.
MONTH
.
getCode
().
equals
(
reportType
))
{
apolloKey
=
AREA_MONTH_DATA
;
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
params
.
put
(
"inFields"
,
inlineParams
);
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
clerkId
))
{
inlineParams
.
put
(
"clerkId"
,
clerkId
);
}
...
...
@@ -136,7 +135,7 @@ public class MaterialDataAdaptor {
if
(
CollectionUtils
.
isNotEmpty
(
storeIds
))
{
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
}
Map
<
String
,
Object
>
result
=
this
.
doHttp
(
JSON
.
toJSONString
(
params
),
apolloKey
);
Map
<
String
,
Object
>
result
=
DataApiUtils
.
http
(
inlineParams
.
toString
(
),
apolloKey
);
if
(
result
.
get
(
"data"
)
==
null
)
{
return
null
;
}
...
...
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