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
5cea527f
Commit
5cea527f
authored
Jul 20, 2022
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 活码分权
parent
34d0a8cc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
8 deletions
+26
-8
HmGroupApiService.java
...m/gic/haoban/manage/api/service/hm/HmGroupApiService.java
+1
-1
TabHaobanHmQrcodeMapper.java
...manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
+1
-1
HmQrcodeService.java
...gic/haoban/manage/service/service/hm/HmQrcodeService.java
+1
-1
HmQrcodeServiceImpl.java
...n/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
+2
-2
HmGroupApiServiceImpl.java
...ge/service/service/out/impl/hm/HmGroupApiServiceImpl.java
+14
-2
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+6
-0
HmGroupController.java
...ic/haoban/manage/web/controller/hm/HmGroupController.java
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmGroupApiService.java
View file @
5cea527f
...
...
@@ -46,7 +46,7 @@ public interface HmGroupApiService {
* @param wxEnterpriseId
* @return
*/
ServiceResponse
<
Integer
>
queryGroupTotalReferCount
(
String
enterpriseId
,
String
wxEnterpriseId
);
ServiceResponse
<
Integer
>
queryGroupTotalReferCount
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
);
/**
* 查询单个分组信息
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
View file @
5cea527f
...
...
@@ -178,7 +178,7 @@ public interface TabHaobanHmQrcodeMapper {
* @author mozhu
* @date 2022-07-12 15:10:09
*/
int
getTotalByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
int
getTotalByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"hmIds"
)
List
<
String
>
hmIds
);
/**
* 批量修改 活码所属分组
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmQrcodeService.java
View file @
5cea527f
...
...
@@ -167,7 +167,7 @@ public interface HmQrcodeService {
* @author mozhu
* @date 2022-07-12 15:08:35
*/
int
getTotalByEnterpriseId
(
String
enterpriseId
);
int
getTotalByEnterpriseId
(
String
enterpriseId
,
List
<
String
>
hmIds
);
/**
* 批量修改活码分组
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
View file @
5cea527f
...
...
@@ -128,8 +128,8 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
@Override
public
int
getTotalByEnterpriseId
(
String
enterpriseId
)
{
return
tabHaobanHmQrcodeMapper
.
getTotalByEnterpriseId
(
enterpriseId
);
public
int
getTotalByEnterpriseId
(
String
enterpriseId
,
List
<
String
>
hmIds
)
{
return
tabHaobanHmQrcodeMapper
.
getTotalByEnterpriseId
(
enterpriseId
,
hmIds
);
}
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmGroupApiServiceImpl.java
View file @
5cea527f
...
...
@@ -183,8 +183,20 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
* @return
*/
@Override
public
ServiceResponse
<
Integer
>
queryGroupTotalReferCount
(
String
enterpriseId
,
String
wxEnterpriseId
)
{
int
totalReferCount
=
qrcodeService
.
getTotalByEnterpriseId
(
enterpriseId
);
public
ServiceResponse
<
Integer
>
queryGroupTotalReferCount
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
)
{
List
<
String
>
storeList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
log
.
info
(
"导购拥有的门店权限 clerkId:{}, storeIds:{}"
,
clerkId
,
JSON
.
toJSONString
(
storeList
));
List
<
String
>
hmIds
=
null
;
if
(!
CollectionUtils
.
isEmpty
(
storeList
))
{
if
(!
storeList
.
contains
(
"-1"
))
{
HmQrcodeListQDTO
hmQrcodeListQDTO
=
new
HmQrcodeListQDTO
();
hmQrcodeListQDTO
.
setEnterpriseId
(
enterpriseId
);
hmQrcodeListQDTO
.
setStoreId
(
storeList
);
hmIds
=
qrcodeService
.
listHmIdForIndex
(
hmQrcodeListQDTO
);
log
.
info
(
"导购拥有的活码权限列表:{}"
,
JSON
.
toJSONString
(
hmIds
));
}
}
int
totalReferCount
=
qrcodeService
.
getTotalByEnterpriseId
(
enterpriseId
,
hmIds
);
return
ServiceResponse
.
success
(
totalReferCount
);
}
...
...
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
5cea527f
...
...
@@ -391,6 +391,12 @@
from tab_haoban_hm_qrcode
where status_flag != 0
and enterprise_id = #{enterpriseId}
<if
test=
"hmIds != null and hmIds.size > 0"
>
and hm_id in
<foreach
collection=
"hmIds"
open=
"("
close=
")"
separator=
","
item=
"hmId"
>
#{hmId}
</foreach>
</if>
</select>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmGroupController.java
View file @
5cea527f
...
...
@@ -132,7 +132,7 @@ public class HmGroupController extends WebBaseController {
@RequestMapping
(
path
=
"/refer/count"
)
public
RestResponse
<?>
queryGroupTotalReferCount
(){
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
ServiceResponse
<
Integer
>
serviceResponse
=
groupApiService
.
queryGroupTotalReferCount
(
loginUser
.
getEnterpriseId
(),
loginUser
.
getWxEnterpriseId
());
ServiceResponse
<
Integer
>
serviceResponse
=
groupApiService
.
queryGroupTotalReferCount
(
loginUser
.
get
ClerkId
(),
loginUser
.
get
EnterpriseId
(),
loginUser
.
getWxEnterpriseId
());
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
...
...
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