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
9a425660
Commit
9a425660
authored
Oct 20, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-haoban-role' into developer
parents
8a4566d6
9c52a1cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
43 deletions
+28
-43
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+19
-41
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+9
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
9a425660
...
...
@@ -7,21 +7,18 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.PowerService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.*
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDetailDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.*
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.SyncHaobanToGicApiService
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanAuditMapper
;
...
...
@@ -68,14 +65,18 @@ public class AuditApiServiceImpl implements AuditApiService {
@Autowired
private
ClerkService
clerkService
;
@Autowired
private
PowerService
powerService
;
@Autowired
private
StoreWidgetService
storeWidgetService
;
private
StaffApiService
staffApiService
;
@Override
public
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
wxEnterpriseId
,
String
enterpriseId
,
Integer
auditStatus
,
Integer
auditFlag
,
BasePageInfo
pageInfo
,
String
clerkId
)
{
List
<
String
>
storeIdList
=
this
.
getStoreIdList
(
enterpriseId
,
clerkId
);
List
<
String
>
storeIdList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
return
PageUtil
.
emptyPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
}
if
(
storeIdList
.
contains
(
"-1"
))
{
storeIdList
=
null
;
}
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>
page
=
auditMapper
.
page
(
wxEnterpriseId
,
auditType
,
storeIdList
,
search
,
enterpriseId
,
auditStatus
,
auditFlag
);
if
(
CollectionUtil
.
isNotEmpty
(
page
.
getResult
()))
{
...
...
@@ -472,7 +473,13 @@ public class AuditApiServiceImpl implements AuditApiService {
String
storeId
=
clerkDTO
.
getStoreId
();
if
(
clerkType
==
2
)
{
// 如果null,说明是所有门店
storeIdList
=
this
.
getStoreIdList
(
enterpriseId
,
clerkId
);
storeIdList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
return
0
;
}
if
(
storeIdList
.
contains
(
"-1"
))
{
storeIdList
=
null
;
}
clerkId
=
null
;
}
else
{
storeIdList
.
add
(
storeId
);
...
...
@@ -484,33 +491,4 @@ public class AuditApiServiceImpl implements AuditApiService {
return
this
.
auditMapper
.
getAuditCount
(
wxEnterpriseId
,
enterpriseId
,
clerkId
,
storeIdList
);
}
@SuppressWarnings
(
"unchecked"
)
public
List
<
String
>
getStoreIdList
(
String
enterpriseId
,
String
clerkId
)
{
EnterpriseSettingDTO
enterpriseSetting
=
enterpriseService
.
getEnterpriseSettingByEnterpriseId
(
enterpriseId
);
logger
.
info
(
"门店权限,getEnableAccessControl={},{}"
,
enterpriseSetting
.
getEnableAccessControl
(),
enterpriseId
);
if
(
enterpriseSetting
.
getEnableAccessControl
()
!=
null
&&
enterpriseSetting
.
getEnableAccessControl
()
==
1
)
{
String
storeWidgetKey
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
(),
clerkId
);
logger
.
info
(
"权限控制-启用,创建人管辖门店的组件={}"
,
storeWidgetKey
);
StoreWidgetDTO
widget
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetKey
);
if
(
null
==
widget
||
widget
.
getSelectType
()
==
0
)
{
logger
.
info
(
"权限控制-启用,超管={}"
,
clerkId
);
return
null
;
}
List
<
String
>
storeIdList
=
new
ArrayList
<>();
storeIdList
.
add
(
"-1-1"
);
Page
<
StoreDTO
>
page
=
new
Page
<
StoreDTO
>(
1
,
Integer
.
MAX_VALUE
);
page
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetKey
,
null
,
enterpriseId
,
page
);
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
()))
{
List
<
StoreDTO
>
list
=
page
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
StoreDTO
dto
:
list
)
{
storeIdList
.
add
(
dto
.
getStoreId
());
}
}
}
return
storeIdList
;
}
return
null
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
9a425660
...
...
@@ -158,8 +158,8 @@ public class AuditController extends WebBaseController {
JSONObject
json
=
JSON
.
parseObject
(
oldValue
);
clerkCode
=
json
.
getString
(
"clerkCode"
);
staffName
=
json
.
getString
(
"staffName"
);
String
applyClerkId
=
json
.
getString
(
"clerkId"
);
String
headPic
=
json
.
get
(
"headPic"
)
==
null
?
""
:
json
.
get
(
"headPic"
).
toString
();
if
(
auditDTO
.
getAuditType
()
==
3
)
{
vo
.
setCommitReason
(
"添加导购账号:("
+
clerkCode
+
")"
);
}
else
if
(
auditDTO
.
getAuditType
()
==
4
)
{
...
...
@@ -167,7 +167,14 @@ public class AuditController extends WebBaseController {
}
else
if
(
auditDTO
.
getAuditType
()
==
5
)
{
vo
.
setCommitReason
(
"解除绑定:("
+
clerkCode
+
")"
);
}
else
{
vo
.
setCommitReason
(
"绑定申请{"
+
staffName
+
"}绑定登录导购code "
+
clerkCode
);
String
commitReason
=
"绑定申请{"
+
staffName
+
"}绑定登录导购code "
+
clerkCode
;
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
applyClerkId
);
if
(
clerkDTO
!=
null
)
{
if
(
clerkDTO
.
getClerkType
()
==
2
)
{
commitReason
=
"绑定申请{"
+
staffName
+
"}绑定登录区经code "
+
clerkCode
;
}
}
vo
.
setCommitReason
(
commitReason
);
}
vo
.
setCommitName
(
auditDTO
.
getCommitStaffName
());
vo
.
setFailReason
(
auditDTO
.
getAuditReason
());
...
...
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