Commit 50174698 by 墨竹

fix:删除活码

parent 2265ada7
......@@ -675,23 +675,40 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(hmQrcodeBO.getWxEnterpriseId()) ;
QywxResponseDTO qywxResponseDTO = qywxUserApiService.delContactWay(qwDTO.getThirdCorpid(), config.getWxSuiteid(), wxConfigId);
int errcode = qywxResponseDTO.getErrcode();
//https://open.work.weixin.qq.com/devtool/query?e=41044
if (errcode != 0) {
if (errcode == 41044) {
delQrcode(hmId, invokingType, loginDTO, hmQrcodeBO);
return ServiceResponse.success();
}
GicLogRecordEvaluationContext.noWriteLog();
return ServiceResponse.failure(Convert.toStr(HaoBanErrCodeCommon.ERR_8.getCode()), qywxResponseDTO.getErrmsg());
}
}
delQrcode(hmId, invokingType, loginDTO, hmQrcodeBO);
return ServiceResponse.success();
}
/**
* 删除活码
* @param hmId
* @param invokingType
* @param loginDTO
* @param hmQrcodeBO
*/
private void delQrcode(Long hmId, Integer invokingType, WebLoginDTO loginDTO, HmQrcodeBO hmQrcodeBO) {
//操作日志
setLoggerContext(hmQrcodeBO.getEnterpriseId(), hmQrcodeBO.getWxEnterpriseId(), loginDTO);
String logContent = "【" + hmId + "-" + hmQrcodeBO.getName() + "】";
if (invokingType != 1) {
logContent = logContent + "——" + ChannelCodeEnum.getNameByCode(invokingType);
}
GicLogRecordEvaluationContext.putAttribute("logContent", logContent);
hmQrcodeService.deleteById(hmId);
HmQrcodeQDTO hmQrcodeQDTO = new HmQrcodeQDTO();
hmQrcodeQDTO.setHmId(hmId);
this.updateWelcomeRelation(hmQrcodeQDTO, WelcomeRelationStatusEnum.DEPRECATED.getCode());
return ServiceResponse.success();
}
......
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