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
d6e901d7
Commit
d6e901d7
authored
Aug 25, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
观云台小程序 See merge request
!21
parents
c9014764
9b8fc061
Show 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 @
d6e901d7
package
com
.
gic
.
cloud
.
web
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.web.auth.DataAuthUtils
;
...
...
@@ -20,6 +21,8 @@ import com.gic.store.dto.ClerkDTO;
import
com.gic.store.service.ClerkApiService
;
import
org.apache.commons.collections.CollectionUtils
;
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.stereotype.Component
;
...
...
@@ -30,6 +33,7 @@ import java.util.stream.Collectors;
@Component
public
class
GoDownComponent
{
private
Logger
log
=
LogManager
.
getLogger
(
GoDownComponent
.
class
);
@Autowired
private
ShopApiService
shopApiService
;
@Autowired
...
...
@@ -187,9 +191,12 @@ public class GoDownComponent {
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
return
baseSalesDTO
.
getAreaId
()
==
null
?
baseSalesDTO
.
getId
()
:
baseSalesDTO
.
getAreaId
();
}).
collect
(
Collectors
.
toList
());
log
.
info
(
"clerkIdList:{}"
,
JSON
.
toJSONString
(
clerkIdList
));
clerkDTOS
=
this
.
clerkApiService
.
listClerkByIds
(
enterpriseId
,
StringUtils
.
join
(
clerkIdList
,
","
)).
getResult
();
log
.
info
(
"clerkDtos:{}"
,
clerkDTOS
);
}
final
Map
<
String
,
ClerkDTO
>
clerkDTOMap
=
CollectionUtil
.
toMap
(
clerkDTOS
,
"clerkId"
);
log
.
info
(
"clerkDTOMap:{}"
,
JSON
.
toJSONString
(
clerkDTOMap
));
page
.
getResult
().
stream
().
forEach
(
b
->
{
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
baseSalesDTO
.
setLevel
(
level
);
...
...
@@ -208,4 +215,18 @@ public class GoDownComponent {
}
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 @
d6e901d7
...
...
@@ -70,12 +70,6 @@ public class StoreSearchUtils {
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
){
String
key
=
"1:"
+
enterpriseId
+
":"
+
userId
+
":"
+
(
StringUtils
.
isNotBlank
(
searchJson
)
?
searchJson
.
hashCode
()
:
"searchJSON"
.
hashCode
());
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