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
0b8823f9
Commit
0b8823f9
authored
Sep 30, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
29e72320
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
23 deletions
+31
-23
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+31
-23
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
0b8823f9
...
...
@@ -376,17 +376,34 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
String
unionid
=
dto
.
getUnionid
();
String
state
=
dto
.
getState
();
boolean
isHmUnionid
=
false
;
String
mobile
=
""
;
String
staffId
=
dto
.
getStaffId
();
StaffClerkRelationDTO
staffClerkRelationDTO
=
null
;
//活码处理 "DT" "HM"
WxUserAddLogQDTO
wxUserAddLogQDTO
=
new
WxUserAddLogQDTO
();
boolean
isHmUnionid
=
false
;
String
mobile
=
""
;
String
memberLabelId
=
""
;
StaffClerkRelationDTO
staffClerkRelationDTO
=
null
;
boolean
needMainStore
=
true
;
if
(
StringUtils
.
isNotBlank
(
state
)
&&
(
state
.
startsWith
(
Manage3Constants
.
HM
)
||
state
.
startsWith
(
Manage3Constants
.
DT
)))
{
needMainStore
=
false
;
String
id
=
state
.
substring
(
2
);
Long
hmId
=
null
;
HmQrcodeDTO
hmQrcodeDTO
=
null
;
if
(
state
.
startsWith
(
Manage3Constants
.
DT
))
{
KeyDataLinkBO
dataForHmLink
=
keyDataService
.
getDataForHmLink
(
id
);
if
(
null
==
dataForHmLink
)
{
log
.
error
(
"活码keyDate查询不到,id={}"
,
id
);
return
;
}
Long
linkId
=
dataForHmLink
.
getLinkId
();
hmId
=
dataForHmLink
.
getHmId
();
mobile
=
dataForHmLink
.
getMobile
();
unionid
=
dataForHmLink
.
getUnionid
();
log
.
info
(
"动态活码hmId={},linkId={},unionid={},mobile={}"
,
hmId
,
linkId
,
unionid
,
mobile
);
}
if
(
state
.
contains
(
Manage3Constants
.
HM
))
{
hmId
=
Convert
.
toLong
(
id
);
log
.
info
(
"普通活码={}"
,
hmId
);
...
...
@@ -420,11 +437,15 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
}
else
if
(
state
.
contains
(
Manage3Constants
.
DT
))
{
KeyDataLinkBO
dataForHmLink
=
keyDataService
.
getDataForHmLink
(
id
);
if
(
null
==
dataForHmLink
)
{
log
.
error
(
"活码keyDate查询不到,id={}"
,
id
);
return
;
}
Long
linkId
=
dataForHmLink
.
getLinkId
();
hmId
=
dataForHmLink
.
getHmId
();
mobile
=
dataForHmLink
.
getMobile
();
unionid
=
dataForHmLink
.
getUnionid
();
log
.
info
(
"动态活码hmId={},linkId={},unionid={}
"
,
hmId
,
linkId
,
unionid
);
log
.
info
(
"动态活码hmId={},linkId={},unionid={}
,mobile={}"
,
hmId
,
linkId
,
unionid
,
mobile
);
isHmUnionid
=
true
;
wxUserAddLogQDTO
.
setLinkId
(
linkId
);
wxUserAddLogQDTO
.
setHmId
(
hmId
);
...
...
@@ -438,33 +459,20 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if
(
hmLinkBO
!=
null
)
{
memberLabelId
=
hmLinkBO
.
getMemberLabelId
();
}
}
else
{
//不是我们的活码
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
if
(
mainStoreRelated
==
null
)
{
log
.
info
(
"【新增外部联系人】主门店为空:{}"
,
staffId
);
// 无主门店仅发送欢迎语
sendWelcome
(
dto
,
qwDTO
,
null
,
staffId
,
null
);
return
;
}
staffClerkRelationDTO
=
staffClerkRelationService
.
getOneBindByStoreId
(
staffId
,
mainStoreRelated
.
getStoreId
());
}
if
(
hmId
!=
null
&&
hmQrcodeDTO
!=
null
)
{
log
.
info
(
"计算活码的上限和加好友数量:{}"
,
hmId
);
hmQrcodeApiService
.
updateAddNumById
(
hmId
,
hmQrcodeDTO
.
getClerkId
());
}
}
else
{
}
this
.
hmQrcodeApiService
.
updateAddNumById
(
hmId
,
hmQrcodeDTO
.
getClerkId
());
}
if
(
needMainStore
)
{
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
if
(
mainStoreRelated
==
null
)
{
log
.
info
(
"【新增外部联系人】主门店为空:staffId={}"
,
staffId
);
// 无主门店仅发送欢迎语
sendWelcome
(
dto
,
qwDTO
,
null
,
staffId
,
null
);
this
.
sendWelcome
(
dto
,
qwDTO
,
null
,
staffId
,
null
);
return
;
}
staffClerkRelationDTO
=
staffClerkRelationService
.
getOneBindByStoreId
(
staffId
,
mainStoreRelated
.
getStoreId
());
}
if
(
staffClerkRelationDTO
==
null
)
{
log
.
info
(
"【新增外部联系人】无关联导购"
);
return
;
...
...
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