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
0706fb7e
Commit
0706fb7e
authored
Nov 16, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xgh_内容中台' into 'developer'
朋友圈 See merge request
!457
parents
915122b2
ff28c9bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
38 deletions
+41
-38
StaffClerkRelationApiService.java
...oban/manage/api/service/StaffClerkRelationApiService.java
+2
-0
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+5
-0
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+10
-22
QwMessageController.java
...an/manage/web/controller/content/QwMessageController.java
+17
-16
CustomerQO.java
...rc/main/java/com/gic/haoban/manage/web/qo/CustomerQO.java
+7
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffClerkRelationApiService.java
View file @
0706fb7e
...
...
@@ -81,6 +81,8 @@ public interface StaffClerkRelationApiService {
* @return
*/
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
);
List
<
StaffClerkRelationDTO
>
listByStoreIds
(
String
wxEnterpriseId
,
List
<
String
>
storeIds
)
;
/**
* 查询导购信息
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
0706fb7e
...
...
@@ -248,6 +248,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
public
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
)
{
return
tabHaobanStaffClerkRelationMapper
.
listByStoreIds
(
null
,
Arrays
.
asList
(
storeId
));
}
@Override
public
List
<
StaffClerkRelationDTO
>
listByStoreIds
(
String
wxEnterpriseId
,
List
<
String
>
storeIds
)
{
return
tabHaobanStaffClerkRelationMapper
.
listByStoreIds
(
wxEnterpriseId
,
storeIds
);
}
@Override
public
boolean
unbindByStaffAndClerkId
(
String
staffId
,
String
clerkId
,
int
channelCode
,
String
wxEnterpriseId
)
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxStaffController.java
View file @
0706fb7e
...
...
@@ -1724,29 +1724,17 @@ public class WxStaffController extends WebBaseController {
ClerkDTO
clerk
=
this
.
clerkService
.
getclerkById
(
clerkId
)
;
int
clerkType
=
clerk
.
getClerkType
()
;
List
<
ClerkListVO
>
resultList
=
null
;
if
(
clerkType
==
0
)
{
return
RestResponse
.
failure
(
"-1"
,
"无权访问"
);
}
else
if
(
clerkType
==
1
)
{
List
<
ClerkListDTO
>
clerkList
=
clerkService
.
getClerkByStoreId
(
enterpriseId
,
clerk
.
getStoreId
());
if
(
CollectionUtils
.
isNotEmpty
(
clerkList
)
&&
StringUtils
.
isNotEmpty
(
clerkSearchParams
))
{
clerkList
=
clerkList
.
stream
().
filter
(
dto
->
dto
.
getClerkCode
().
contains
(
clerkSearchParams
)
||
dto
.
getClerkName
().
contains
(
clerkSearchParams
)).
collect
(
Collectors
.
toList
())
;
}
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无导购"
);
}
resultList
=
EntityUtil
.
changeEntityListByJSON
(
ClerkListVO
.
class
,
clerkList
);
}
else
if
(
clerkType
==
2
)
{
// 如果有权限控制,进行管辖门店过0滤
List
<
String
>
authStoreIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
}
if
(
authStoreIdList
.
size
()
==
1
&&
authStoreIdList
.
contains
(
"-1"
))
{
authStoreIdList
=
null
;
}
// 查询区经门店下的店长,eid,storelist,clerkSearchParams
logger
.
info
(
"查询所有店长,返回={}"
,
enterpriseId
);
if
(
clerkType
!=
0
)
{
return
RestResponse
.
failure
(
"-1"
,
"非店长身份"
);
}
List
<
ClerkListDTO
>
clerkList
=
clerkService
.
getClerkByStoreId
(
enterpriseId
,
clerk
.
getStoreId
());
if
(
CollectionUtils
.
isNotEmpty
(
clerkList
)
&&
StringUtils
.
isNotEmpty
(
clerkSearchParams
))
{
clerkList
=
clerkList
.
stream
().
filter
(
dto
->
dto
.
getClerkCode
().
contains
(
clerkSearchParams
)
||
dto
.
getClerkName
().
contains
(
clerkSearchParams
)).
collect
(
Collectors
.
toList
())
;
}
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无导购"
);
}
resultList
=
EntityUtil
.
changeEntityListByJSON
(
ClerkListVO
.
class
,
clerkList
);
List
<
String
>
clerkIdList
=
resultList
.
stream
().
map
(
dto
->
dto
.
getClerkId
()).
collect
(
Collectors
.
toList
())
;
List
<
StaffClerkRelationDTO
>
relationList
=
this
.
staffClerkRelationApiService
.
listByClerkIdsWxEnterpriseId
(
clerkIdList
,
wxEnterpriseId
)
;
List
<
String
>
retlationIdList
=
relationList
.
stream
().
map
(
dto
->
dto
.
getClerkId
()).
collect
(
Collectors
.
toList
())
;
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/QwMessageController.java
View file @
0706fb7e
...
...
@@ -110,38 +110,39 @@ public class QwMessageController extends WebBaseController {
String
enterpriseId
=
qo
.
getEnterpriseId
();
String
staffId
=
qo
.
getStaffId
();
List
<
String
>
clerkIdList
=
qo
.
getClerkIdList
()
;
List
<
String
>
storeIdList
=
qo
.
getStoreIdList
()
;
ClerkDTO
clerk
=
this
.
clerkService
.
getclerkById
(
clerkId
);
logger
.
info
(
"clerkType={},ChooseAll={}"
,
clerk
.
getClerkType
(),
qo
.
getChooseAll
());
// 查询所有门店-导购
if
(
StringUtils
.
isNotBlank
(
qo
.
getChooseAll
())
&&
"1"
.
equals
(
qo
.
getChooseAll
()))
{
if
(
clerk
.
getClerkType
()
==
1
)
{
String
storeId
=
clerk
.
getStoreId
()
;
clerkIdList
=
staffApiService
.
listBindStaffId
(
storeId
);
logger
.
info
(
"店长,导购数={}"
,
clerkIdList
.
size
());
}
else
if
(
clerk
.
getClerkType
()==
2
)
{
// 区经
}
else
{
clerkIdList
=
new
ArrayList
<>();
}
int
clerkType
=
clerk
.
getClerkType
()
;
if
(
clerkType
==
0
)
{
return
RestResponse
.
failure
(
"-1"
,
"非店长、区间"
);
}
logger
.
info
(
"clerkIdList={}"
,
JSON
.
toJSONString
(
clerkIdList
));
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无发送导购数据"
);
String
chooseAll
=
qo
.
getChooseAll
()
;
if
(
StringUtils
.
isBlank
(
chooseAll
)
||
!
"1"
.
equals
(
chooseAll
))
{
if
(
clerkType
==
1
&&
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"请选择导购"
);
}
if
(
clerkType
==
2
&&
CollectionUtils
.
isEmpty
(
storeIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"请选择门店"
);
}
}
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"clerkIdList"
,
clerkIdList
);
json
.
put
(
"storeIdList"
,
storeIdList
)
;
json
.
put
(
"enterpriseId"
,
enterpriseId
);
json
.
put
(
"imgJson"
,
imgJson
);
json
.
put
(
"staffId"
,
staffId
);
json
.
put
(
"sendClerkId"
,
clerkId
);
json
.
put
(
"sendClerkType"
,
clerkType
)
;
json
.
put
(
"sendClerkStoreId"
,
clerk
.
getStoreId
());
// 朋友圈-分享
json
.
put
(
"sendType"
,
2
);
json
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
json
.
put
(
"content"
,
qo
.
getContent
())
;
json
.
put
(
"contentMaterialId"
,
contentMaterialId
)
;
String
ret
=
json
.
toJSONString
();
String
params
=
json
.
toJSONString
();
try
{
GICMQClientUtil
.
getClientInstance
().
sendCommonMessage
(
"haobanCommonRouter"
,
ret
,
GICMQClientUtil
.
getClientInstance
().
sendCommonMessage
(
"haobanCommonRouter"
,
params
,
"com.gic.haoban.app.customer.service.api.service.MessageLogApiService"
,
"callBackSendMessage"
);
}
catch
(
Exception
e
)
{
logger
.
info
(
e
.
getMessage
(),
e
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/CustomerQO.java
View file @
0706fb7e
...
...
@@ -14,9 +14,16 @@ public class CustomerQO implements Serializable{
private
String
staffId
;
private
List
<
String
>
memberIdList
;
private
List
<
String
>
clerkIdList
;
private
List
<
String
>
storeIdList
;
private
String
content
;
private
boolean
qwFriendFlag
=
false
;
public
List
<
String
>
getStoreIdList
()
{
return
storeIdList
;
}
public
void
setStoreIdList
(
List
<
String
>
storeIdList
)
{
this
.
storeIdList
=
storeIdList
;
}
public
String
getContent
()
{
return
content
;
}
...
...
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