Commit 017e6f9e by 墨竹

fix:放开注释企微接口

parent e7d50388
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment