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
d781a14c
Commit
d781a14c
authored
Apr 30, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/base_platform_enterprise/gic-store
into developer
parents
3a4871e4
1f58e380
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
24 deletions
+39
-24
CreateTypeEnum.java
.../src/main/java/com/gic/store/constant/CreateTypeEnum.java
+5
-5
ClerkSearchDTO.java
...e-api/src/main/java/com/gic/store/dto/ClerkSearchDTO.java
+5
-5
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+28
-10
StoreGroupApiServiceImpl.java
...ic/store/service/outer/impl/StoreGroupApiServiceImpl.java
+1
-4
No files found.
gic-store-api/src/main/java/com/gic/store/constant/CreateTypeEnum.java
View file @
d781a14c
...
...
@@ -7,12 +7,12 @@ package com.gic.store.constant;
public
enum
CreateTypeEnum
{
BACKGROUND_ADD
(
1
,
"后台新增"
),
BATCH_IMPORT
(
2
,
"批量导入"
),
ORDER
(
3
,
"
订单生成
"
),
ERP
(
4
,
"
erp
同步"
),
ORDER
(
3
,
"
增量订单同步
"
),
ERP
(
4
,
"
ERP
同步"
),
API
(
5
,
"API接口"
),
MEMBER
(
6
,
"
会员生成
"
),
BULKORDER
(
7
,
"批量
导入订单
"
),
BULKMEMBER
(
8
,
"批量
导入会员
"
)
MEMBER
(
6
,
"
增量会员同步
"
),
BULKORDER
(
7
,
"批量
订单同步
"
),
BULKMEMBER
(
8
,
"批量
会员同步
"
)
;
...
...
gic-store-api/src/main/java/com/gic/store/dto/ClerkSearchDTO.java
View file @
d781a14c
...
...
@@ -13,7 +13,7 @@ public class ClerkSearchDTO implements Serializable {
private
static
final
long
serialVersionUID
=
7888454039825986790L
;
private
String
search
;
private
Integer
storeGroupId
;
private
String
se
lect
Json
;
private
String
se
arch
Json
;
private
Integer
enterpriseId
;
private
String
storeIds
;
private
Integer
currentPage
=
1
;
...
...
@@ -41,12 +41,12 @@ public class ClerkSearchDTO implements Serializable {
this
.
storeGroupId
=
storeGroupId
;
}
public
String
getSe
lect
Json
()
{
return
se
lect
Json
;
public
String
getSe
arch
Json
()
{
return
se
arch
Json
;
}
public
void
setSe
lectJson
(
String
select
Json
)
{
this
.
se
lectJson
=
select
Json
;
public
void
setSe
archJson
(
String
search
Json
)
{
this
.
se
archJson
=
search
Json
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
d781a14c
...
...
@@ -181,9 +181,9 @@ public class ClerkApiServiceImpl implements ClerkApiService {
// 查询条件对应的storeId
String
storeIdByClerkSearch
;
if
(
StringUtils
.
isNotBlank
(
clerkSearchDTO
.
getSearch
()))
{
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
null
);
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
clerkSearchDTO
.
getSearch
()
);
if
(
CollectionUtils
.
isEmpty
(
groupIds
)
||
CollectionUtils
.
isEmpty
(
storeInfoIdsBySearch
))
{
storeIdByClerkSearch
=
""
;
return
ServiceResponse
.
success
(
new
Page
<>())
;
}
else
{
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
null
);
}
...
...
@@ -237,8 +237,12 @@ public class ClerkApiServiceImpl implements ClerkApiService {
@Override
public
ServiceResponse
<
Integer
>
getTotalClerk
(
Integer
enterpriseId
,
ClerkSearchDTO
clerkSearchDTO
)
{
if
(
clerkSearchDTO
.
getStoreGroupId
()
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
MISS_PARAMETER
.
getCode
(),
ErrorCode
.
MISS_PARAMETER
.
getMsg
());
boolean
hasStoreIds
=
StringUtils
.
isNotBlank
(
clerkSearchDTO
.
getStoreIds
());
//如果有门店数据条件,则不判断门店分组数据,因为分店分组数据也是为了获取门店
if
(!
hasStoreIds
)
{
if
(
clerkSearchDTO
.
getStoreGroupId
()
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
MISS_PARAMETER
.
getCode
(),
ErrorCode
.
MISS_PARAMETER
.
getMsg
());
}
}
// 分组的id
List
<
TabStoreGroup
>
groupList
=
storeGroupService
.
listStoreGroupAndChildren
(
clerkSearchDTO
.
getStoreGroupId
());
...
...
@@ -246,18 +250,19 @@ public class ClerkApiServiceImpl implements ClerkApiService {
// 查询条件对应的storeId
String
storeIdByClerkSearch
;
if
(
StringUtils
.
isNotBlank
(
clerkSearchDTO
.
getSearch
()))
{
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
clerkSearchDTO
.
getSearch
());
List
<
Integer
>
storeInfoIdsBySearch
=
clerkService
.
getStoreInfoIdsBySearch
(
enterpriseId
,
clerkSearchDTO
.
getSearch
());
if
(
CollectionUtils
.
isEmpty
(
groupIds
)
||
CollectionUtils
.
isEmpty
(
storeInfoIdsBySearch
))
{
storeIdByClerkSearch
=
""
;
}
else
{
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
clerkSearchDTO
.
getSearch
()
);
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
null
);
}
}
else
{
storeIdByClerkSearch
=
""
;
}
clerkSearchDTO
.
setEnterpriseId
(
enterpriseId
);
clerkSearchDTO
.
setStoreIds
(
storeIdByClerkSearch
);
if
(!
hasStoreIds
)
{
clerkSearchDTO
.
setStoreIds
(
storeIdByClerkSearch
);
}
ServiceResponse
<
Page
<
StoreDTO
>>
serviceResponse
=
listStoreIds
(
clerkSearchDTO
,
1
,
Integer
.
MAX_VALUE
);
if
(!
serviceResponse
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
@@ -273,6 +278,19 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return
ServiceResponse
.
success
(
totalClerk
);
}
// private String getStoreIdByStoreInfoIds(List<Integer> storeInfoIdsBySearch, String search) {
// StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
// storeSearchDTO.setStoreInfoIds(StringUtils.join(storeInfoIdsBySearch, " "));
// storeSearchDTO.setSearch(search);
// Page<StoreDTO> page = storeApiService.listStore(storeSearchDTO, 1, Integer.MAX_VALUE).getResult();
// if (page == null) {
// return "";
// } else {
// return Optional.ofNullable(page.getResult()).orElse(Collections.emptyList()).stream().map(e -> e.getStoreId().toString())
// .reduce((x, y) -> x + " " + y).orElse("");
// }
// }
private
String
getStoreIdByStoreInfoIds
(
List
<
Integer
>
storeInfoIdsBySearch
,
String
search
)
{
StoreSearchDBDTO
storeSearchDBDTO
=
new
StoreSearchDBDTO
();
storeSearchDBDTO
.
setStoreInfoIdList
(
storeInfoIdsBySearch
);
...
...
@@ -282,15 +300,15 @@ public class ClerkApiServiceImpl implements ClerkApiService {
.
reduce
((
x
,
y
)
->
x
+
" "
+
y
).
orElse
(
""
);
}
@SuppressWarnings
(
"unchecked"
)
private
ServiceResponse
<
Page
<
StoreDTO
>>
listStoreIds
(
ClerkSearchDTO
clerkSearchDTO
,
Integer
pageNum
,
Integer
pageSize
)
{
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
clerkSearchDTO
.
getEnterpriseId
());
storeSearchDTO
.
setStoreGroupId
(
clerkSearchDTO
.
getStoreGroupId
());
storeSearchDTO
.
setSearchJson
(
clerkSearchDTO
.
getSe
lect
Json
());
storeSearchDTO
.
setSearchJson
(
clerkSearchDTO
.
getSe
arch
Json
());
storeSearchDTO
.
setStoreIds
(
clerkSearchDTO
.
getStoreIds
());
// storeSearchDTO.setSearch(clerkSearchDTO.getSearch());
return
storeApiService
.
listStore
(
storeSearchDTO
,
pageNum
,
pageSize
,
"storeId,storeName,storeCode,storeInfoId,ownType"
);
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreGroupApiServiceImpl.java
View file @
d781a14c
...
...
@@ -307,10 +307,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
if
(
tabStoreGroup
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"主键错误,查询不到数据"
);
}
ServiceResponse
<
TabStoreGroup
>
authValid
=
validIsDefault
(
storeGroupId
);
if
(!
authValid
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
authValid
.
getCode
(),
authValid
.
getMessage
());
}
if
(
setSortValue
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"拖拽排序值不能为空"
);
}
...
...
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