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
ff06fcb9
Commit
ff06fcb9
authored
Jul 14, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:活码
parent
dcf9ca26
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+1
-1
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+10
-5
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+4
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
ff06fcb9
...
...
@@ -32,7 +32,7 @@ public interface HmQrcodeApiService {
* @author mozhu
* @date 2022-07-05 10:59:06
*/
int
update
(
HmQrcodeQDTO
hmQrcodeQDTO
);
ServiceResponse
update
(
HmQrcodeQDTO
hmQrcodeQDTO
);
/**
* 查询详情
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
ff06fcb9
...
...
@@ -193,18 +193,20 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
afterFunc
=
LogRecordAfterServiceImpl
.
class
)
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
update
(
HmQrcodeQDTO
hmQrcodeQDTO
)
{
public
ServiceResponse
update
(
HmQrcodeQDTO
hmQrcodeQDTO
)
{
String
wxEnterpriseId
=
hmQrcodeQDTO
.
getWxEnterpriseId
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
==
null
)
{
logger
.
error
(
"未查询到微信企业"
);
return
0
;
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"微信企业不存在"
)
;
}
Long
hmId
=
hmQrcodeQDTO
.
getHmId
();
Integer
hmType
=
hmQrcodeQDTO
.
getHmType
();
List
<
String
>
clerkIdList
=
setStoreClerk
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
hmType
);
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"该导购已经生成过活码或未关联过好办"
);
}
//更新活码
QywxExternalcontactDTO
qywxExternalcontactDTO
=
new
QywxExternalcontactDTO
();
qywxExternalcontactDTO
.
setType
(
hmQrcodeQDTO
.
getHmType
());
...
...
@@ -213,11 +215,14 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
qywxExternalcontactDTO
.
setSkipVerify
(
hmQrcodeQDTO
.
getPassFlag
()
==
1
);
qywxExternalcontactDTO
.
setState
(
"HM"
+
hmId
);
List
<
String
>
userIds
=
staffClerkRelationService
.
listWxUserIdByClerkIds
(
clerkIdList
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
userIds
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"导购未关联好办"
);
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
boolean
flag
=
qywxUserApiService
.
updateContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
if
(!
flag
)
{
logger
.
error
(
"更新企微活码失败"
);
return
0
;
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"更新企微活码失败"
)
;
}
int
updateResult
=
hmQrcodeService
.
update
(
hmQrcodeQDTO
);
...
...
@@ -229,7 +234,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
setLoggerContext
(
hmQrcodeQDTO
.
getEnterpriseId
(),
wxEnterpriseId
,
hmQrcodeQDTO
.
getModifierId
(),
hmQrcodeQDTO
.
getModifierName
());
updateSystemLog
(
hmQrcodeQDTO
,
hmId
);
return
updateResult
;
return
ServiceResponse
.
success
()
;
}
/**
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
ff06fcb9
...
...
@@ -88,7 +88,10 @@ public class HmQrcodeController {
hmQrcodeQDTO
.
setModifierName
(
loginUser
.
getClerkName
());
hmQrcodeQDTO
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
hmQrcodeQDTO
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
this
.
hmQrcodeApiService
.
update
(
hmQrcodeQDTO
);
ServiceResponse
serviceResponse
=
this
.
hmQrcodeApiService
.
update
(
hmQrcodeQDTO
);
if
(!
"0000"
.
equals
(
serviceResponse
.
getCode
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_0
.
getCode
()),
serviceResponse
.
getMessage
());
}
return
RestResponse
.
successResult
();
}
...
...
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