Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
93b7da6b
Commit
93b7da6b
authored
Nov 19, 2022
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 同城门店处理
parent
a4114c33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
0 deletions
+58
-0
ContentMaterialController.java
...age/web/controller/content/ContentMaterialController.java
+32
-0
ContentMaterialQO.java
...m/gic/haoban/manage/web/qo/content/ContentMaterialQO.java
+26
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ContentMaterialController.java
View file @
93b7da6b
...
@@ -13,6 +13,7 @@ import com.gic.content.api.service.ContentColumnApiService;
...
@@ -13,6 +13,7 @@ import com.gic.content.api.service.ContentColumnApiService;
import
com.gic.content.api.service.ContentMaterialApiService
;
import
com.gic.content.api.service.ContentMaterialApiService
;
import
com.gic.content.api.service.ContentMaterialShareApiService
;
import
com.gic.content.api.service.ContentMaterialShareApiService
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.web.qo.content.ContentMaterialQO
;
import
com.gic.haoban.manage.web.qo.content.ContentMaterialQO
;
import
com.gic.haoban.manage.web.qo.content.ContentMaterialShareQO
;
import
com.gic.haoban.manage.web.qo.content.ContentMaterialShareQO
;
import
com.gic.haoban.manage.web.vo.content.ContentColumnInfoVO
;
import
com.gic.haoban.manage.web.vo.content.ContentColumnInfoVO
;
...
@@ -20,6 +21,8 @@ import com.gic.haoban.manage.web.vo.content.ContentMaterialInfoVO;
...
@@ -20,6 +21,8 @@ import com.gic.haoban.manage.web.vo.content.ContentMaterialInfoVO;
import
com.gic.haoban.manage.web.vo.content.ContentMaterialShareInfoVO
;
import
com.gic.haoban.manage.web.vo.content.ContentMaterialShareInfoVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -40,6 +43,7 @@ import java.util.stream.Collectors;
...
@@ -40,6 +43,7 @@ import java.util.stream.Collectors;
@RestController
@RestController
public
class
ContentMaterialController
{
public
class
ContentMaterialController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
ContentMaterialController
.
class
);
@Autowired
@Autowired
private
ContentColumnApiService
contentColumnApiService
;
private
ContentColumnApiService
contentColumnApiService
;
@Autowired
@Autowired
...
@@ -47,6 +51,9 @@ public class ContentMaterialController {
...
@@ -47,6 +51,9 @@ public class ContentMaterialController {
@Autowired
@Autowired
private
ContentMaterialShareApiService
contentMaterialShareApiService
;
private
ContentMaterialShareApiService
contentMaterialShareApiService
;
@Autowired
private
StaffApiService
staffApiService
;
/**
/**
* 获取栏目筛选条件
* 获取栏目筛选条件
...
@@ -84,6 +91,13 @@ public class ContentMaterialController {
...
@@ -84,6 +91,13 @@ public class ContentMaterialController {
contentMaterialPageFrontQDTO
.
setMaterialType
(
4
);
contentMaterialPageFrontQDTO
.
setMaterialType
(
4
);
}
}
}
}
if
(
StringUtils
.
isBlank
(
contentMaterialQO
.
getStoreId
())){
// 区经 获取管辖的权限
List
<
String
>
storeIds
=
this
.
queryClerkStoreIds
(
contentMaterialQO
.
getClerkId
(),
contentMaterialQO
.
getWxEnterpriseId
());
contentMaterialPageFrontQDTO
.
setStoreIdList
(
storeIds
);
}
else
{
contentMaterialPageFrontQDTO
.
setStoreIdList
(
Collections
.
singletonList
(
contentMaterialQO
.
getStoreId
()));
}
BasePageInfo
pageInfo
=
new
BasePageInfo
();
BasePageInfo
pageInfo
=
new
BasePageInfo
();
pageInfo
.
setPageNum
(
contentMaterialQO
.
getPageNum
());
pageInfo
.
setPageNum
(
contentMaterialQO
.
getPageNum
());
pageInfo
.
setPageSize
(
contentMaterialQO
.
getPageSize
());
pageInfo
.
setPageSize
(
contentMaterialQO
.
getPageSize
());
...
@@ -146,4 +160,22 @@ public class ContentMaterialController {
...
@@ -146,4 +160,22 @@ public class ContentMaterialController {
return
RestResponse
.
successResult
(
shareInfoVO
);
return
RestResponse
.
successResult
(
shareInfoVO
);
}
}
/**
* 查询区经角色下管辖的门店权限
* @param clerkId
* @param wxEnterpriseId
* @return
*/
public
List
<
String
>
queryClerkStoreIds
(
String
clerkId
,
String
wxEnterpriseId
){
List
<
String
>
storeIds
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
storeIds
)){
log
.
info
(
"根据区经id查询管辖的门店为空 {} {}"
,
clerkId
,
wxEnterpriseId
);
return
Collections
.
singletonList
(
"-100"
);
}
if
(
storeIds
.
size
()
==
1
&&
StringUtils
.
equals
(
storeIds
.
get
(
0
),
"-1"
)){
// 全部门店权限
return
Collections
.
emptyList
();
}
return
storeIds
;
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/ContentMaterialQO.java
View file @
93b7da6b
...
@@ -22,6 +22,16 @@ public class ContentMaterialQO extends PageQo {
...
@@ -22,6 +22,16 @@ public class ContentMaterialQO extends PageQo {
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
/**
/**
* 门店id
*/
private
String
storeId
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 1 最新; 2 最热; 3 视频
* 1 最新; 2 最热; 3 视频
*/
*/
private
Integer
sortType
;
private
Integer
sortType
;
...
@@ -76,4 +86,20 @@ public class ContentMaterialQO extends PageQo {
...
@@ -76,4 +86,20 @@ public class ContentMaterialQO extends PageQo {
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
}
}
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