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
1517c70a
Commit
1517c70a
authored
Jul 15, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店查询支持多个门店控件id聚合
parent
5a7a7329
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
0 deletions
+54
-0
StoreGroupApiService.java
...main/java/com/gic/store/service/StoreGroupApiService.java
+11
-0
TabStoreGroupMapper.java
...in/java/com/gic/store/dao/mapper/TabStoreGroupMapper.java
+6
-0
StoreGroupService.java
...rc/main/java/com/gic/store/service/StoreGroupService.java
+3
-0
StoreGroupServiceImpl.java
...ava/com/gic/store/service/impl/StoreGroupServiceImpl.java
+6
-0
StoreGroupApiServiceImpl.java
...ic/store/service/outer/impl/StoreGroupApiServiceImpl.java
+12
-0
TabStoreGroupMapper.xml
...service/src/main/resources/mapper/TabStoreGroupMapper.xml
+16
-0
No files found.
gic-store-api/src/main/java/com/gic/store/service/StoreGroupApiService.java
View file @
1517c70a
...
...
@@ -2,6 +2,7 @@ package com.gic.store.service;
import
java.util.List
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.store.dto.StoreGroupDTO
;
...
...
@@ -164,4 +165,14 @@ public interface StoreGroupApiService {
* @return
*/
ServiceResponse
<
List
<
StoreGroupDTO
>>
listStoreGroupByIds
(
List
<
Integer
>
storeGroupIdList
,
Integer
enterpriseId
,
Integer
level
);
/** @Description: 分页查询分组
* @author taogs
* @Date 10:31 2020/7/15
* @Param
* @return
*/
ServiceResponse
<
Page
<
StoreGroupDTO
>>
pageStoreGroupByIds
(
List
<
Integer
>
storeGroupIdList
,
Integer
enterpriseId
,
Integer
level
,
Integer
pageSize
,
Integer
pageNum
);
}
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabStoreGroupMapper.java
View file @
1517c70a
package
com
.
gic
.
store
.
dao
.
mapper
;
import
com.gic.store.entity.TabStoreGroup
;
import
com.github.pagehelper.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -130,4 +131,8 @@ public interface TabStoreGroupMapper {
List
<
TabStoreGroup
>
listStoreGroupByIds
(
@Param
(
"storeGroupIdList"
)
List
<
Integer
>
storeGroupIdList
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"level"
)
Integer
level
);
Page
<
TabStoreGroup
>
pageStoreGroupByIds
(
@Param
(
"storeGroupIdList"
)
List
<
Integer
>
storeGroupIdList
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"level"
)
Integer
level
);
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/service/StoreGroupService.java
View file @
1517c70a
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.gic.store.dto.StoreGroupDTO
;
import
com.gic.store.entity.TabStoreGroup
;
import
com.github.pagehelper.Page
;
/**
* 门店分组
...
...
@@ -194,4 +195,6 @@ public interface StoreGroupService {
TabStoreGroup
selectAllStoreGroup
(
Integer
enterpriseId
);
List
<
TabStoreGroup
>
listStoreGroupByIds
(
List
<
Integer
>
storeGroupIdList
,
Integer
enterpriseId
,
Integer
level
);
Page
<
TabStoreGroup
>
pageStoreGroupByIds
(
List
<
Integer
>
storeGroupIdList
,
Integer
enterpriseId
,
Integer
level
);
}
gic-store-service/src/main/java/com/gic/store/service/impl/StoreGroupServiceImpl.java
View file @
1517c70a
...
...
@@ -6,6 +6,7 @@ import com.gic.store.dao.mapper.TabStoreGroupMapper;
import
com.gic.store.dto.StoreGroupDTO
;
import
com.gic.store.entity.TabStoreGroup
;
import
com.gic.store.service.StoreGroupService
;
import
com.github.pagehelper.Page
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -163,4 +164,9 @@ public class StoreGroupServiceImpl implements StoreGroupService{
return
this
.
tabStoreGroupMapper
.
listStoreGroupByIds
(
storeGroupIdList
,
enterpriseId
,
level
);
}
@Override
public
Page
<
TabStoreGroup
>
pageStoreGroupByIds
(
List
<
Integer
>
storeGroupIdList
,
Integer
enterpriseId
,
Integer
level
){
return
this
.
tabStoreGroupMapper
.
pageStoreGroupByIds
(
storeGroupIdList
,
enterpriseId
,
level
);
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreGroupApiServiceImpl.java
View file @
1517c70a
...
...
@@ -7,7 +7,10 @@ import java.util.Stack;
import
java.util.concurrent.TimeUnit
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.store.service.StoreApiService
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -361,6 +364,15 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListByJSON
(
StoreGroupDTO
.
class
,
list
));
}
@Override
public
ServiceResponse
<
Page
<
StoreGroupDTO
>>
pageStoreGroupByIds
(
List
<
Integer
>
storeGroupIdList
,
Integer
enterpriseId
,
Integer
level
,
Integer
pageSize
,
Integer
pageNum
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
com
.
github
.
pagehelper
.
Page
<
TabStoreGroup
>
tabStoreGroups
=
this
.
storeGroupService
.
pageStoreGroupByIds
(
storeGroupIdList
,
enterpriseId
,
level
);
Page
<
StoreGroupDTO
>
storeGroupDTOPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
tabStoreGroups
,
StoreGroupDTO
.
class
);
return
ServiceResponse
.
success
(
storeGroupDTOPage
);
}
/**
* 刷新缓存,删除缓存
* @param storeGroupId
...
...
gic-store-service/src/main/resources/mapper/TabStoreGroupMapper.xml
View file @
1517c70a
...
...
@@ -276,4 +276,19 @@
and group_level = #{level}
</if>
</select>
<select
id=
"pageStoreGroupByIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from
tab_store_group where status = 1 and enterprise_id = #{enterpriseId}
<if
test=
"null != storeGroupIdList and storeGroupIdList.size() > 0"
>
and store_group_id in
<foreach
collection=
"storeGroupIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"level != null"
>
and group_level = #{level}
</if>
</select>
</mapper>
\ No newline at end of file
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