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
1
Merge Requests
1
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
017e6f9e
Commit
017e6f9e
authored
Jul 18, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:放开注释企微接口
parent
e7d50388
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+16
-16
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
017e6f9e
...
...
@@ -51,6 +51,7 @@ import com.gic.member.tag.api.service.MemberTagApiService;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.dto.qywx.response.QywxResponseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -105,7 +106,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
@Autowired
private
WelcomeService
welcomeService
;
@GicLogRecord
(
value
=
"新增员工活码-${#logContent}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HUOMA_ADD
,
...
...
@@ -151,12 +151,12 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
logger
.
info
(
"新增活码参数:{}"
,
JSON
.
toJSONString
(
qywxExternalcontactDTO
));
//
QywxExternalcontactResultDTO qywxExternalcontactResultDTO = qywxUserApiService.addContactWay(wxEnterpriseDTO.getCorpid(), config.getWxSuiteid(), qywxExternalcontactDTO);
//
if (qywxExternalcontactResultDTO.getErrcode() != 0) {
//
return ServiceResponse.failure(Convert.toStr(HaoBanErrCodeCommon.ERR_0.getCode()), "创建活码失败:" + qywxExternalcontactResultDTO.getErrmsg());
//
}
//
hmQrcodeQDTO.setWxQrcode(qywxExternalcontactResultDTO.getQr_code());
//
hmQrcodeQDTO.setWxConfigId(qywxExternalcontactResultDTO.getConfig_id());
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
if
(
qywxExternalcontactResultDTO
.
getErrcode
()
!=
0
)
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"创建活码失败:"
+
qywxExternalcontactResultDTO
.
getErrmsg
());
}
hmQrcodeQDTO
.
setWxQrcode
(
qywxExternalcontactResultDTO
.
getQr_code
());
hmQrcodeQDTO
.
setWxConfigId
(
qywxExternalcontactResultDTO
.
getConfig_id
());
int
saveResult
=
hmQrcodeService
.
insert
(
hmQrcodeQDTO
);
if
(
saveResult
==
1
)
{
// save welcome relation
...
...
@@ -194,7 +194,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
add
(
hmQrcodeQDTO
);
}
setLoggerContext
(
hmQrcodeQDTO
.
getEnterpriseId
(),
wxEnterpriseId
,
hmQrcodeQDTO
.
getCreatorId
(),
hmQrcodeQDTO
.
getCreatorName
());
GicLogRecordEvaluationContext
.
putAttribute
(
"logContent"
,
"【"
+
"批量创建数量"
+
clerkIdList
.
size
()
+
"】"
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logContent"
,
"【"
+
"批量创建数量"
+
clerkIdList
.
size
()
+
"】"
);
return
ServiceResponse
.
success
();
}
...
...
@@ -212,8 +212,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
private
void
setLoggerContext
(
String
enterpriseId
,
String
wxEnterpriseId
,
String
userId
,
String
userName
)
{
GicLogRecordEvaluationContext
.
putAttribute
(
"enterpriseId"
,
enterpriseId
);
GicLogRecordEvaluationContext
.
putAttribute
(
"wxEnterpriseId"
,
wxEnterpriseId
);
GicLogRecordEvaluationContext
.
putAttribute
(
"userId"
,
userId
);
GicLogRecordEvaluationContext
.
putAttribute
(
"userName"
,
userName
);
GicLogRecordEvaluationContext
.
putAttribute
(
"userId"
,
StringUtils
.
isNotBlank
(
userId
)
?
userId
:
"0"
);
GicLogRecordEvaluationContext
.
putAttribute
(
"userName"
,
StringUtils
.
isNotBlank
(
userName
)
?
userName
:
"系统"
);
}
...
...
@@ -250,11 +250,11 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"导购未关联好办"
);
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
//
QywxResponseDTO qywxResponseDTO = qywxUserApiService.updateContactWay(wxEnterpriseDTO.getCorpid(), config.getWxSuiteid(), qywxExternalcontactDTO);
//
if (qywxResponseDTO.getErrcode() != 0) {
//
logger.error("更新企微活码失败");
//
return ServiceResponse.failure(Convert.toStr(HaoBanErrCodeCommon.ERR_0.getCode()), qywxResponseDTO.getErrmsg());
//
}
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
updateContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
if
(
qywxResponseDTO
.
getErrcode
()
!=
0
)
{
logger
.
error
(
"更新企微活码失败"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
qywxResponseDTO
.
getErrmsg
());
}
int
updateResult
=
hmQrcodeService
.
update
(
hmQrcodeQDTO
);
if
(
updateResult
==
1
)
{
...
...
@@ -316,7 +316,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
String
oldTagName
=
""
;
String
tagName
=
""
;
if
(
memberTagDTOOld
!=
null
)
{
oldTagName
=
memberTagDTOOld
.
getTagName
();
oldTagName
=
memberTagDTOOld
.
getTagName
();
}
if
(
memberTagDTO
!=
null
)
{
tagName
=
memberTagDTO
.
getTagName
();
...
...
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