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
da45a584
Commit
da45a584
authored
Apr 21, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!4
parents
53bbb2fc
b676529f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
28 deletions
+56
-28
ClerkApiService.java
.../src/main/java/com/gic/store/service/ClerkApiService.java
+13
-0
pom.xml
gic-store-service/pom.xml
+0
-13
TabClerkMapper.java
...rc/main/java/com/gic/store/dao/mapper/TabClerkMapper.java
+1
-1
ClerkService.java
...ice/src/main/java/com/gic/store/service/ClerkService.java
+5
-3
ClerkServiceImpl.java
...ain/java/com/gic/store/service/impl/ClerkServiceImpl.java
+9
-4
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+21
-5
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+3
-1
TabClerkMapper.xml
...tore-service/src/main/resources/mapper/TabClerkMapper.xml
+3
-0
TabStoreInfoMapper.xml
...-service/src/main/resources/mapper/TabStoreInfoMapper.xml
+1
-1
No files found.
gic-store-api/src/main/java/com/gic/store/service/ClerkApiService.java
View file @
da45a584
...
...
@@ -122,4 +122,17 @@ public interface ClerkApiService {
* @throws
*/
ServiceResponse
<
Integer
>
addClerkToOtherStore
(
Integer
clerkId
,
Integer
storeId
,
Integer
enterpriseId
);
/**
* @Title: listClerkByStoreBrand
* @Description: 按店招品牌搜索所有导购
* @author zhiwj
* @param enterpriseId
* @param storeBrandId
* @param clerkName
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.store.dto.ClerkDTO>>
* @throws
*/
ServiceResponse
<
List
<
ClerkDTO
>>
listClerkByStoreBrand
(
Integer
enterpriseId
,
Integer
storeBrandId
,
String
clerkName
);
}
gic-store-service/pom.xml
View file @
da45a584
...
...
@@ -18,13 +18,6 @@
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<libraryVersion>
4.0-SNAPSHOT
</libraryVersion>
<gic-sharding-sdk>
3.1-SNAPSHOT
</gic-sharding-sdk>
<!-- api依赖,正式版会在 gic-pom-base 里生成 -->
<gic-store-api>
4.0-SNAPSHOT
</gic-store-api>
<gic-redis-data>
4.0-SNAPSHOT
</gic-redis-data>
<gic-bizdict-api>
4.0.0-SNAPSHOT
</gic-bizdict-api>
<gic-bizdict-sdk>
4.0.0-SNAPSHOT
</gic-bizdict-sdk>
<gic-platform-enterprise-api>
4.0-SNAPSHOT
</gic-platform-enterprise-api>
</properties>
<dependencies>
...
...
@@ -52,12 +45,6 @@
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-sharding-sdk
</artifactId>
<version>
${gic-sharding-sdk}
</version>
</dependency>
<dependency>
<groupId>
org.mybatis
</groupId>
<artifactId>
mybatis
</artifactId>
<version>
3.5.1
</version>
...
...
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabClerkMapper.java
View file @
da45a584
...
...
@@ -58,7 +58,7 @@ public interface TabClerkMapper {
Integer
countByPhoneNumber
(
@Param
(
"storeId"
)
Integer
storeId
,
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"clerkId"
)
Integer
clerkId
);
List
<
TabClerk
>
listClerkByStoreInfoId
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"storeClerkIds"
)
List
<
Integer
>
storeClerkIds
,
@Param
(
"search"
)
String
search
);
List
<
TabClerk
>
listClerkByStoreInfoId
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"storeClerkIds"
)
List
<
Integer
>
storeClerkIds
,
@Param
(
"s
toreInfoIds"
)
String
storeInfoIds
,
@Param
(
"s
earch"
)
String
search
);
Integer
getTotalClerk
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"storeClerkIds"
)
List
<
Integer
>
storeClerkIds
,
@Param
(
"search"
)
String
search
);
...
...
gic-store-service/src/main/java/com/gic/store/service/ClerkService.java
View file @
da45a584
...
...
@@ -74,12 +74,14 @@ public interface ClerkService {
* @Description: 查询下导购列表
* @author zhiwj
* @param enterpriseId 企业id
* @param storeIds 门店ids
* @param storeI
nfoI
ds 门店ids
* @param search 查询条件:clerkName or clerkCode
* @return java.util.List<com.gic.store.entity.TabClerk>
* @throws
*/
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
List
<
Integer
>
storeIds
,
String
search
);
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
List
<
Integer
>
storeInfoIds
,
String
search
);
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
String
storeInfoIds
,
String
search
);
Integer
getTotalClerk
(
Integer
enterpriseId
,
List
<
Integer
>
storeInfoIds
,
String
search
);
/**
...
...
@@ -109,7 +111,7 @@ public interface ClerkService {
TabClerk
getById
(
Integer
clerkId
);
List
<
TabClerk
>
listClerk
(
Integer
enterpriseId
,
String
search
);
List
<
TabClerk
>
listClerk
ByStoreInfoId
(
Integer
enterpriseId
,
String
search
);
TabClerk
getClerkByCode
(
Integer
enterpriseId
,
String
clerkCode
,
Integer
storeInfoId
);
}
gic-store-service/src/main/java/com/gic/store/service/impl/ClerkServiceImpl.java
View file @
da45a584
...
...
@@ -88,8 +88,13 @@ public class ClerkServiceImpl implements ClerkService {
}
@Override
public
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
List
<
Integer
>
storeInfoClerkIds
,
String
search
)
{
return
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
storeInfoClerkIds
,
search
);
public
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
List
<
Integer
>
storeInfoIds
,
String
search
)
{
return
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
storeInfoIds
,
null
,
search
);
}
@Override
public
List
<
TabClerk
>
listClerkByStoreInfoId
(
Integer
enterpriseId
,
String
storeInfoIds
,
String
search
)
{
return
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
null
,
storeInfoIds
,
search
);
}
@Override
...
...
@@ -132,8 +137,8 @@ public class ClerkServiceImpl implements ClerkService {
}
@Override
public
List
<
TabClerk
>
listClerk
(
Integer
enterpriseId
,
String
search
)
{
return
this
.
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
null
,
search
);
public
List
<
TabClerk
>
listClerk
ByStoreInfoId
(
Integer
enterpriseId
,
String
search
)
{
return
this
.
tabClerkMapper
.
listClerkByStoreInfoId
(
enterpriseId
,
null
,
null
,
search
);
}
@Override
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
da45a584
...
...
@@ -181,12 +181,11 @@ 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
,
null
);
if
(
CollectionUtils
.
isEmpty
(
groupIds
)
||
CollectionUtils
.
isEmpty
(
storeInfoIdsBySearch
))
{
storeIdByClerkSearch
=
""
;
}
else
{
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
clerkSearchDTO
.
getSearch
()
);
storeIdByClerkSearch
=
getStoreIdByStoreInfoIds
(
storeInfoIdsBySearch
,
null
);
}
}
else
{
storeIdByClerkSearch
=
""
;
...
...
@@ -291,7 +290,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
storeSearchDTO
.
setStoreGroupId
(
clerkSearchDTO
.
getStoreGroupId
());
storeSearchDTO
.
setSearchJson
(
clerkSearchDTO
.
getSelectJson
());
storeSearchDTO
.
setStoreIds
(
clerkSearchDTO
.
getStoreIds
());
storeSearchDTO
.
setSearch
(
clerkSearchDTO
.
getSearch
());
//
storeSearchDTO.setSearch(clerkSearchDTO.getSearch());
return
storeApiService
.
listStore
(
storeSearchDTO
,
pageNum
,
pageSize
,
"storeId,storeName,storeCode,storeInfoId,ownType"
);
...
...
@@ -329,7 +328,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
@Override
public
ServiceResponse
<
List
<
ClerkDTO
>>
listClerk
(
Integer
enterpriseId
,
String
search
)
{
List
<
TabClerk
>
clerkList
=
this
.
clerkService
.
listClerk
(
enterpriseId
,
search
);
List
<
TabClerk
>
clerkList
=
this
.
clerkService
.
listClerk
ByStoreInfoId
(
enterpriseId
,
search
);
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListByJSON
(
ClerkDTO
.
class
,
clerkList
));
}
...
...
@@ -446,6 +445,23 @@ public class ClerkApiServiceImpl implements ClerkApiService {
}
}
@Override
public
ServiceResponse
<
List
<
ClerkDTO
>>
listClerkByStoreBrand
(
Integer
enterpriseId
,
Integer
storeBrandId
,
String
clerkName
)
{
StoreSearchDBDTO
storeSearchDBDTO
=
new
StoreSearchDBDTO
();
storeSearchDBDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDBDTO
.
setStoreBrandId
(
storeBrandId
);
List
<
StoreDTO
>
list
=
this
.
storeService
.
listStore
(
storeSearchDBDTO
,
1
,
10000
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
// list 如果太大, 让 mybatis 解析 会打满内存
String
storeInfoIds
=
list
.
stream
().
map
(
e
->
e
.
getStoreInfoId
().
toString
()).
reduce
((
x
,
y
)
->
x
+
","
+
y
).
get
();
storeInfoIds
=
"("
+
storeInfoIds
+
")"
;
List
<
TabClerk
>
clerkList
=
this
.
clerkService
.
listClerkByStoreInfoId
(
enterpriseId
,
storeInfoIds
,
clerkName
);
List
<
ClerkDTO
>
dtoList
=
EntityUtil
.
changeEntityListByJSON
(
ClerkDTO
.
class
,
clerkList
);
return
EnterpriseServiceResponse
.
success
(
dtoList
);
}
private
static
ServiceResponse
<
String
>
responseErrorElement
(
ImportClerkBatchResultEnum
error
)
{
logger
.
warn
(
"批处理导购错误返回结果:{}"
,
error
.
toString
());
return
ServiceResponse
.
failure
(
error
.
getCode
(),
error
.
toString
());
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
da45a584
...
...
@@ -627,7 +627,9 @@ public class StoreApiServiceImpl implements StoreApiService {
storeSearchDTO
.
setLongitude
(
nearByStoreSearchDTO
.
getLongitude
());
storeSearchDTO
.
setLatitude
(
nearByStoreSearchDTO
.
getLatitude
());
storeSearchDTO
.
setCityId
(
nearByStoreSearchDTO
.
getCityId
());
storeSearchDTO
.
setStoreResource
(
Long
.
valueOf
(
storeWidgetId
+
""
));
if
(
storeWidgetId
!=
null
){
storeSearchDTO
.
setStoreResource
(
Long
.
valueOf
(
storeWidgetId
+
""
));
}
ServiceResponse
<
Page
<
StoreDTO
>>
storePage
=
this
.
listStore
(
storeSearchDTO
,
nearByStoreSearchDTO
.
getPageNum
(),
nearByStoreSearchDTO
.
getPageSize
());
List
<
StoreDTO
>
list
=
storePage
.
getResult
().
getResult
();
StorePhotoDTO
storePhotoDTO
=
new
StorePhotoDTO
();
...
...
gic-store-service/src/main/resources/mapper/TabClerkMapper.xml
View file @
da45a584
...
...
@@ -218,6 +218,9 @@
#{item}
</foreach>
</if>
<if
test=
"storeInfoIds != null "
>
and store_info_id in ${storeInfoIds}
</if>
<if
test=
"search != null and search != '' "
>
and (clerk_code like concat('%', #{search} ,'%') or clerk_name like concat('%', #{search} ,'%') )
</if>
...
...
gic-store-service/src/main/resources/mapper/TabStoreInfoMapper.xml
View file @
da45a584
...
...
@@ -384,7 +384,7 @@
and t1.city_id= #{store.cityId}
</if>
<if
test=
"store.storeBrandId != null"
>
and t1.brand_ids like concat('%
,', #{store.storeBrandId}, ',
%')
and t1.brand_ids like concat('%
', #{store.storeBrandId}, '
%')
</if>
<if
test=
"store.storeGroupIdList != null and store.storeGroupIdList.size()>0"
>
and t2.store_group_id in
...
...
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