|
|
@@ -57,7 +57,7 @@ public class QwAcquisitionAssistantServiceImpl implements IQwAcquisitionAssistan
|
|
|
|
|
|
if (token == null || StringUtils.isEmpty(token.getAccess_token())) {
|
|
|
log.error("获取access_token失败, corpid:{}", corpid);
|
|
|
- throw new CustomException("获取企业微信access_token失败");
|
|
|
+ throw new CustomException("获客链接管理-获取企业微信access_token失败");
|
|
|
}
|
|
|
|
|
|
return apiPath + "?access_token=" + token.getAccess_token();
|
|
|
@@ -193,7 +193,7 @@ public class QwAcquisitionAssistantServiceImpl implements IQwAcquisitionAssistan
|
|
|
} else {
|
|
|
assistant.setUpdateTime(new Date());
|
|
|
}
|
|
|
- assistant.setSyncTime(new Date());
|
|
|
+ assistant.setSyncTime(DateUtils.getNowDate());
|
|
|
assistant.buildJsonFields();
|
|
|
assistant.setRangeDesc(generateRangeDesc(assistant));
|
|
|
|
|
|
@@ -258,7 +258,7 @@ public class QwAcquisitionAssistantServiceImpl implements IQwAcquisitionAssistan
|
|
|
|
|
|
for (String linkId : linkIdList) {
|
|
|
try {
|
|
|
- AcquisitionAssistantDetailVO detail = getDetailWithQw(corpid, corpsecret, linkId);
|
|
|
+ AcquisitionAssistantDetailVO detail = getDetailWithQw(linkId);
|
|
|
QwAcquisitionAssistant assistant = convertToLocal(linkId, detail);
|
|
|
|
|
|
QwAcquisitionAssistant existData = qwAcquisitionAssistantMapper.selectQwAcquisitionAssistantByLinkId(linkId);
|
|
|
@@ -425,7 +425,7 @@ public class QwAcquisitionAssistantServiceImpl implements IQwAcquisitionAssistan
|
|
|
// ==================== 获取详情方法 ====================
|
|
|
|
|
|
@Override
|
|
|
- public AcquisitionAssistantDetailVO getDetailWithQw(String corpid, String corpsecret, String linkId) {
|
|
|
+ public AcquisitionAssistantDetailVO getDetailWithQw( String linkId) {
|
|
|
if (StringUtils.isEmpty(linkId)) {
|
|
|
throw new CustomException("链接ID不能为空");
|
|
|
}
|
|
|
@@ -448,7 +448,7 @@ public class QwAcquisitionAssistantServiceImpl implements IQwAcquisitionAssistan
|
|
|
AcquisitionGetRequest request = new AcquisitionGetRequest();
|
|
|
request.setLinkId(linkId);
|
|
|
|
|
|
- String url = buildApiUrl(corpid, corpsecret, QwApiConfig.getAcquisition);
|
|
|
+ String url = buildApiUrl(qwCompany.getCorpId(), qwCompany.getOpenSecret(), QwApiConfig.getAcquisition);
|
|
|
qwDetail = callQwApi(url, request, AcquisitionGetResponse.class, "获取获客链接详情");
|
|
|
} catch (Exception e) {
|
|
|
log.error("调用企微API失败", e);
|
|
|
@@ -461,7 +461,7 @@ public class QwAcquisitionAssistantServiceImpl implements IQwAcquisitionAssistan
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void syncDetailToLocal(String corpid, String corpsecret, String linkId) {
|
|
|
- AcquisitionAssistantDetailVO detail = getDetailWithQw(corpid, corpsecret, linkId);
|
|
|
+ AcquisitionAssistantDetailVO detail = getDetailWithQw(linkId);
|
|
|
QwAcquisitionAssistant assistant = convertToLocal(linkId, detail);
|
|
|
|
|
|
QwAcquisitionAssistant existData = qwAcquisitionAssistantMapper.selectQwAcquisitionAssistantByLinkId(linkId);
|