Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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-store
Commits
fe110048
Commit
fe110048
authored
Mar 17, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导购查询bug
parent
d2e7cdc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+17
-17
dubbo-gic-store-service.xml
...re-service/src/main/resources/dubbo-gic-store-service.xml
+0
-1
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
fe110048
package
com
.
gic
.
store
.
service
.
outer
.
impl
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.dto.EnterpriseDTO
;
import
com.gic.enterprise.service.EnterpriseApiService
;
import
com.gic.store.entity.TabStoreRegion
;
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.Service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.CollectionUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.enterprise.service.EnterpriseApiService
;
import
com.gic.store.constant.ClerkLogReasonEnum
;
import
com.gic.store.constant.ImportClerkBatchResultEnum
;
import
com.gic.store.constant.StoreLogTypeEnum
;
...
...
@@ -29,7 +17,17 @@ import com.gic.store.dto.*;
import
com.gic.store.dto.clerk.ProcessBatchClerkDTO
;
import
com.gic.store.entity.TabClerk
;
import
com.gic.store.entity.TabStoreGroup
;
import
com.gic.store.entity.TabStoreRegion
;
import
com.gic.store.service.*
;
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.Service
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author zhiwj
...
...
@@ -181,7 +179,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
if
(
CollectionUtils
.
isEmpty
(
groupIds
)
||
CollectionUtils
.
isEmpty
(
storeInfoIdsBySearch
))
{
return
ServiceResponse
.
success
(
new
Page
<>());
}
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
);
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
clerkSearchDTO
.
getSearch
()
);
}
else
{
storeIdByClerkSearch
=
""
;
}
...
...
@@ -243,7 +241,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
if
(
CollectionUtils
.
isEmpty
(
groupIds
)
||
CollectionUtils
.
isEmpty
(
storeInfoIdsBySearch
))
{
return
ServiceResponse
.
success
();
}
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
);
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
clerkSearchDTO
.
getSearch
()
);
}
else
{
storeIdByClerkSearch
=
""
;
}
...
...
@@ -261,9 +259,11 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return
ServiceResponse
.
success
(
totalClerk
);
}
private
String
getStoreIdByStoreInfoIds
(
List
<
Integer
>
storeInfoIdsBySearch
)
{
private
String
getStoreIdByStoreInfoIds
(
List
<
Integer
>
storeInfoIdsBySearch
,
String
search
)
{
StoreSearchDBDTO
storeSearchDBDTO
=
new
StoreSearchDBDTO
();
storeSearchDBDTO
.
setStoreInfoIdList
(
storeInfoIdsBySearch
);
storeSearchDBDTO
.
setStoreName
(
search
);
storeSearchDBDTO
.
setStoreCode
(
search
);
List
<
StoreDTO
>
dtos
=
storeService
.
listStore
(
storeSearchDBDTO
,
1
,
Integer
.
MAX_VALUE
);
return
Optional
.
ofNullable
(
dtos
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
e
->
e
.
getStoreId
().
toString
())
.
reduce
((
x
,
y
)
->
x
+
" "
+
y
).
orElse
(
""
);
...
...
gic-store-service/src/main/resources/dubbo-gic-store-service.xml
View file @
fe110048
...
...
@@ -63,5 +63,4 @@
<dubbo:service
interface=
"com.gic.store.service.StoreTagApiService"
ref=
"storeTagApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.store.service.StoreTagTmpApiService"
ref=
"storeTagTmpApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.store.service.StoreOpenApiService"
ref=
"storeOpenApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.marketing.process.api.service.tmpl.WxTemplateRouterApiService"
id=
"wxTemplateRouterApiService"
timeout=
"60000"
/>
</beans>
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