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
3148fd30
Commit
3148fd30
authored
Jul 13, 2022
by
songyinghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
01764cd3
e183e21f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
45 deletions
+59
-45
HmLinkApiService.java
...om/gic/haoban/manage/api/service/hm/HmLinkApiService.java
+1
-1
HmLinkApiServiceImpl.java
...age/service/service/out/impl/hm/HmLinkApiServiceImpl.java
+58
-44
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmLinkApiService.java
View file @
3148fd30
...
...
@@ -53,5 +53,5 @@ public interface HmLinkApiService {
* @throws
*/
public
ServiceResponse
<
HmLinkWxaDTO
>
getLinkHmFromWxa
(
String
enterpriseId
,
Integer
whitchStore
,
String
storeId
,
String
clerkId
,
String
linkShortCode
,
String
mixPhone
,
String
unionid
);
String
clerkId
,
String
linkShortCode
,
String
mixPhone
,
String
unionid
,
String
memberId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmLinkApiServiceImpl.java
View file @
3148fd30
...
...
@@ -14,6 +14,7 @@ import com.gic.haoban.manage.api.dto.hm.HmLinkDTO;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreSettingDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkWxaDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmPageDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.service.hm.HmLinkApiService
;
import
com.gic.haoban.manage.service.config.Config
;
...
...
@@ -126,7 +127,10 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
@Override
public
ServiceResponse
<
HmLinkWxaDTO
>
getLinkHmFromWxa
(
String
enterpriseId
,
Integer
whitchStore
,
String
inStoreId
,
String
inClerkId
,
String
linkShortCode
,
String
mixPhone
,
String
unionid
)
{
String
inClerkId
,
String
linkShortCode
,
String
mixPhone
,
String
unionid
,
String
memberId
)
{
if
(
"-1"
.
equals
(
memberId
))
{
memberId
=
null
;
}
HmQrcodeBO
hm
=
null
;
HmLinkWxaDTO
retDTO
=
new
HmLinkWxaDTO
();
log
.
info
(
"小程序获取活码={},linkShortCode={},mixPhone={}"
,
enterpriseId
,
linkShortCode
,
mixPhone
);
...
...
@@ -185,7 +189,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
}
}
// 会员门店
if
(
null
==
hm
&&
StringUtils
.
isNotEmpty
(
mixPhone
)
)
{
if
(
null
==
hm
)
{
HmLinkStoreSettingDTO
fwStore
=
null
;
HmLinkStoreSettingDTO
xgStore
=
null
;
if
(
StringUtils
.
isNotBlank
(
link
.
getStoreRuleJson
()))
{
...
...
@@ -200,53 +204,61 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
if
(
null
==
xgStore
||
xgStore
.
getOpen
()
==
0
)
{
xgStore
=
null
;
}
String
mobile
=
this
.
keyDataService
.
getMobile
(
mixPhone
,
String
.
valueOf
(
linkId
));
log
.
info
(
"小程序获取活码mobile={}"
,
mobile
);
String
memberId
=
this
.
memberService
.
getMemberIdByPhoneNumber
(
mobile
,
enterpriseId
);
log
.
info
(
"小程序获取活码memberId={}"
,
memberId
);
MemberDataDTO
member
=
this
.
getMemberClerk
(
enterpriseId
,
memberId
);
String
mainClerkId
=
member
.
getMainClerkId
();
String
mainStoreId
=
member
.
getMainStoreId
();
// 服务门店
if
(
null
!=
fwStore
)
{
if
(
fwStore
.
getZs
()
==
1
)
{
hm
=
this
.
getHmFromClerk
(
mainClerkId
,
wxEnterpriseId
);
}
if
(
null
==
hm
)
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
mainStoreId
,
fwStore
.
getDz
(),
fwStore
.
getDy
());
if
(
StringUtils
.
isNotEmpty
(
mixPhone
))
{
String
mobile
=
this
.
keyDataService
.
getMobile
(
mixPhone
,
String
.
valueOf
(
linkId
));
log
.
info
(
"小程序获取活码mobile={},mixPhone={}"
,
mobile
,
mixPhone
);
String
mobileMemberId
=
this
.
memberService
.
getMemberIdByPhoneNumber
(
mobile
,
enterpriseId
);
if
(
StringUtils
.
isNotBlank
(
mobileMemberId
))
{
memberId
=
mobileMemberId
;
}
}
// 协管门店
if
(
null
==
hm
&&
null
!=
xgStore
)
{
List
<
MemberStoreClerkDataDTO
>
list
=
member
.
getStoreClerkRel
(
);
List
<
String
>
storeIdList
=
new
ArrayList
<>
();
// 协管导购
for
(
MemberStoreClerkDataDTO
item
:
list
)
{
String
clerkId
=
item
.
getClerkIdRel
();
if
(
clerkId
.
equals
(
mainClerkId
))
{
continue
;
log
.
info
(
"小程序获取活码memberId={}"
,
memberId
);
if
(
StringUtils
.
isNotBlank
(
memberId
)
)
{
MemberDataDTO
member
=
this
.
getMemberClerk
(
enterpriseId
,
memberId
);
String
mainClerkId
=
member
.
getMainClerkId
();
String
mainStoreId
=
member
.
getMainStoreId
();
// 服务门店
if
(
null
!=
fwStore
)
{
if
(
fwStore
.
getZs
()
==
1
&&
StringUtils
.
isNotBlank
(
mainClerkId
))
{
hm
=
this
.
getHmFromClerk
(
mainClerkId
,
wxEnterpriseId
)
;
}
hm
=
this
.
getHmFromClerk
(
clerkId
,
wxEnterpriseId
);
if
(
null
!=
hm
)
{
break
;
if
(
null
==
hm
&&
StringUtils
.
isNotBlank
(
mainStoreId
))
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
mainStoreId
,
fwStore
.
getDz
(),
fwStore
.
getDy
());
}
storeIdList
.
add
(
item
.
getStoreIdRel
());
}
// 店长
if
(
null
==
hm
&&
xgStore
.
getDz
()
==
1
)
{
for
(
String
storeId
:
storeIdList
)
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
1
,
0
);
// 协管门店
List
<
MemberStoreClerkDataDTO
>
list
=
member
.
getStoreClerkRel
();
if
(
null
==
hm
&&
null
!=
xgStore
&&
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
String
>
storeIdList
=
new
ArrayList
<>();
// 协管导购
for
(
MemberStoreClerkDataDTO
item
:
list
)
{
String
clerkId
=
item
.
getClerkIdRel
();
if
(
clerkId
.
equals
(
mainClerkId
))
{
continue
;
}
hm
=
this
.
getHmFromClerk
(
clerkId
,
wxEnterpriseId
);
if
(
null
!=
hm
)
{
storeIdList
=
null
;
break
;
}
storeIdList
.
add
(
item
.
getStoreIdRel
());
}
}
// 店员
if
(
null
==
hm
&&
xgStore
.
getDy
()
==
1
)
{
for
(
String
storeId
:
storeIdList
)
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
0
,
1
);
if
(
null
!=
hm
)
{
break
;
// 店长
if
(
null
==
hm
&&
xgStore
.
getDz
()
==
1
&&
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
for
(
String
storeId
:
storeIdList
)
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
1
,
0
);
if
(
null
!=
hm
)
{
break
;
}
}
}
// 店员
if
(
null
==
hm
&&
xgStore
.
getDy
()
==
1
&&
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
for
(
String
storeId
:
storeIdList
)
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
0
,
1
);
if
(
null
!=
hm
)
{
break
;
}
}
}
}
...
...
@@ -278,13 +290,15 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
bo
.
setUnionid
(
unionid
);
bo
.
setLinkId
(
linkId
);
bo
.
setHmId
(
hm
.
getHmId
());
String
k
ey
=
this
.
keyDataService
.
saveDataForLink
(
enterpriseId
,
bo
);
if
(
null
!=
k
ey
)
{
this
.
addQrcode
(
hm
,
k
ey
,
wxEnterpriseDTO
.
getCorpid
(),
retDTO
);
String
dthmK
ey
=
this
.
keyDataService
.
saveDataForLink
(
enterpriseId
,
bo
);
if
(
null
!=
dthmK
ey
)
{
this
.
addQrcode
(
hm
,
dthmK
ey
,
wxEnterpriseDTO
.
getCorpid
(),
retDTO
);
}
// 查询页面
HmPageBO
page
=
this
.
hmPageService
.
queryHmPageDetail
(
link
.
getPageId
());
// retDTO.setPage(resp.getResult());
if
(
null
!=
page
)
{
retDTO
.
setPage
(
EntityUtil
.
changeEntityByJSON
(
HmPageDTO
.
class
,
page
));
}
}
// 生成动态活码
log
.
info
(
JSON
.
toJSONString
(
retDTO
,
true
));
...
...
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