|
|
@@ -544,6 +544,29 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public CorpXmlOutMessage msgAuditApproved(CorpXmlMessage message, Map<String, Object> context) {
|
|
|
+ //修改 会话存档同意状态
|
|
|
+ String corpId = message.getToUserName();
|
|
|
+ String userId = message.getUserId();
|
|
|
+ String externalUserId = message.getExternalUserId();
|
|
|
+ //客服动态二维码配置state
|
|
|
+ WxCorpApp wxCorpApp = WeChatCorpFactory.getCorpConfigStrategy(corpId);
|
|
|
+ CorpUserFollowRelation relation = relationMapper
|
|
|
+ .selectOne(Wrappers.lambdaQuery(CorpUserFollowRelation.class)
|
|
|
+ .eq(CorpUserFollowRelation::getWxCorpId, wxCorpApp.getId())
|
|
|
+ .eq(CorpUserFollowRelation::getCorpUserId, externalUserId)
|
|
|
+ .eq(CorpUserFollowRelation::getFollowId, userId)
|
|
|
+ .last("limit 1"));
|
|
|
+ if(relation != null){
|
|
|
+ relation.setAgreeStatus("Agree");
|
|
|
+ relationMapper.updateById(relation);
|
|
|
+ }else {
|
|
|
+ throw BusinessRuntimeException.getInstance("用户还未保存.");
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 修改客户成员关系,客户标签
|
|
|
*/
|