Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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-data-cloud
Commits
9b8fc061
Commit
9b8fc061
authored
Aug 25, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
d1c0eac3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
GoDownComponent.java
...in/java/com/gic/cloud/web/controller/GoDownComponent.java
+21
-0
StoreSearchUtils.java
...n/java/com/gic/cloud/web/controller/StoreSearchUtils.java
+0
-6
No files found.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/GoDownComponent.java
View file @
9b8fc061
package
com
.
gic
.
cloud
.
web
.
controller
;
package
com
.
gic
.
cloud
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.web.auth.DataAuthUtils
;
import
com.gic.cloud.web.auth.DataAuthUtils
;
...
@@ -20,6 +21,8 @@ import com.gic.store.dto.ClerkDTO;
...
@@ -20,6 +21,8 @@ import com.gic.store.dto.ClerkDTO;
import
com.gic.store.service.ClerkApiService
;
import
com.gic.store.service.ClerkApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
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
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -30,6 +33,7 @@ import java.util.stream.Collectors;
...
@@ -30,6 +33,7 @@ import java.util.stream.Collectors;
@Component
@Component
public
class
GoDownComponent
{
public
class
GoDownComponent
{
private
Logger
log
=
LogManager
.
getLogger
(
GoDownComponent
.
class
);
@Autowired
@Autowired
private
ShopApiService
shopApiService
;
private
ShopApiService
shopApiService
;
@Autowired
@Autowired
...
@@ -187,9 +191,12 @@ public class GoDownComponent {
...
@@ -187,9 +191,12 @@ public class GoDownComponent {
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
return
baseSalesDTO
.
getAreaId
()
==
null
?
baseSalesDTO
.
getId
()
:
baseSalesDTO
.
getAreaId
();
return
baseSalesDTO
.
getAreaId
()
==
null
?
baseSalesDTO
.
getId
()
:
baseSalesDTO
.
getAreaId
();
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
log
.
info
(
"clerkIdList:{}"
,
JSON
.
toJSONString
(
clerkIdList
));
clerkDTOS
=
this
.
clerkApiService
.
listClerkByIds
(
enterpriseId
,
StringUtils
.
join
(
clerkIdList
,
","
)).
getResult
();
clerkDTOS
=
this
.
clerkApiService
.
listClerkByIds
(
enterpriseId
,
StringUtils
.
join
(
clerkIdList
,
","
)).
getResult
();
log
.
info
(
"clerkDtos:{}"
,
clerkDTOS
);
}
}
final
Map
<
String
,
ClerkDTO
>
clerkDTOMap
=
CollectionUtil
.
toMap
(
clerkDTOS
,
"clerkId"
);
final
Map
<
String
,
ClerkDTO
>
clerkDTOMap
=
CollectionUtil
.
toMap
(
clerkDTOS
,
"clerkId"
);
log
.
info
(
"clerkDTOMap:{}"
,
JSON
.
toJSONString
(
clerkDTOMap
));
page
.
getResult
().
stream
().
forEach
(
b
->
{
page
.
getResult
().
stream
().
forEach
(
b
->
{
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setLevel
(
level
);
...
@@ -208,4 +215,18 @@ public class GoDownComponent {
...
@@ -208,4 +215,18 @@ public class GoDownComponent {
}
}
return
page
;
return
page
;
}
}
public
static
void
main
(
String
[]
args
){
List
<
ClerkDTO
>
list
=
new
ArrayList
<>();
ClerkDTO
clerkDTO
=
new
ClerkDTO
();
clerkDTO
.
setClerkId
(
1
);
ClerkDTO
clerkDTO1
=
new
ClerkDTO
();
clerkDTO1
.
setClerkId
(
2
);
list
.
add
(
clerkDTO
);
list
.
add
(
clerkDTO1
);
List
<
Integer
>
collect
=
list
.
stream
().
map
(
clerkDTO2
->
{
return
clerkDTO2
.
getClerkId
();
}).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
JSON
.
toJSONString
(
collect
));
}
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreSearchUtils.java
View file @
9b8fc061
...
@@ -70,12 +70,6 @@ public class StoreSearchUtils {
...
@@ -70,12 +70,6 @@ public class StoreSearchUtils {
return
0
;
return
0
;
}
}
public
static
void
main
(
String
[]
args
){
System
.
out
.
println
(
1
&
1
);
System
.
out
.
println
(
1
&
0
);
System
.
out
.
println
(
0
&
0
);
}
public
List
<
Integer
>
storeSearch
(
Integer
userId
,
Integer
enterpriseId
,
String
searchJson
){
public
List
<
Integer
>
storeSearch
(
Integer
userId
,
Integer
enterpriseId
,
String
searchJson
){
String
key
=
"1:"
+
enterpriseId
+
":"
+
userId
+
":"
+
(
StringUtils
.
isNotBlank
(
searchJson
)
?
searchJson
.
hashCode
()
:
"searchJSON"
.
hashCode
());
String
key
=
"1:"
+
enterpriseId
+
":"
+
userId
+
":"
+
(
StringUtils
.
isNotBlank
(
searchJson
)
?
searchJson
.
hashCode
()
:
"searchJSON"
.
hashCode
());
StoreAuth
storeAuth
=
this
.
dataAuthUtils
.
getStoreAuth
(
userId
,
enterpriseId
);
StoreAuth
storeAuth
=
this
.
dataAuthUtils
.
getStoreAuth
(
userId
,
enterpriseId
);
...
...
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