|
@@ -35,6 +35,8 @@ import com.fs.sop.service.ISopUserLogsService;
|
|
import com.fs.sop.service.impl.QwSopLogsServiceImpl;
|
|
import com.fs.sop.service.impl.QwSopLogsServiceImpl;
|
|
import com.fs.sop.service.impl.QwSopServiceImpl;
|
|
import com.fs.sop.service.impl.QwSopServiceImpl;
|
|
import com.fs.voice.utils.StringUtil;
|
|
import com.fs.voice.utils.StringUtil;
|
|
|
|
+import org.slf4j.Logger;
|
|
|
|
+import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -58,6 +60,7 @@ import java.util.stream.Collectors;
|
|
@Service
|
|
@Service
|
|
public class QwGroupChatServiceImpl implements IQwGroupChatService
|
|
public class QwGroupChatServiceImpl implements IQwGroupChatService
|
|
{
|
|
{
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(QwGroupChatServiceImpl.class);
|
|
@Autowired
|
|
@Autowired
|
|
private QwGroupChatMapper qwGroupChatMapper;
|
|
private QwGroupChatMapper qwGroupChatMapper;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -338,12 +341,13 @@ public class QwGroupChatServiceImpl implements IQwGroupChatService
|
|
|
|
|
|
//邀请人id
|
|
//邀请人id
|
|
String nnvitorId = null;
|
|
String nnvitorId = null;
|
|
- if (type == 1) {
|
|
|
|
|
|
+
|
|
|
|
+ if (type == 1 && item != null && item.getInvitor() != null && !StringUtil.strIsNullOrEmpty(item.getInvitor().getUserId())) {
|
|
nnvitorId = item.getInvitor().getUserId();
|
|
nnvitorId = item.getInvitor().getUserId();
|
|
}
|
|
}
|
|
//微信unionid
|
|
//微信unionid
|
|
String unionid = null;
|
|
String unionid = null;
|
|
- if (type == 2) {
|
|
|
|
|
|
+ if (type == 2 && !StringUtil.strIsNullOrEmpty(item.getUnionid())) {
|
|
unionid = item.getUnionid();
|
|
unionid = item.getUnionid();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -376,12 +380,16 @@ public class QwGroupChatServiceImpl implements IQwGroupChatService
|
|
|
|
|
|
}
|
|
}
|
|
// 处理离职查询不到详情的情况
|
|
// 处理离职查询不到详情的情况
|
|
- else {
|
|
|
|
|
|
+ else if (qwGroupChatDetailsResult.getErrCode()==60011){
|
|
|
|
+ log.error("当前群聊的员工未在企业微信上应用授权:"+list.getChat_id());
|
|
|
|
+ }else{
|
|
if (list.getStatus() == 1) {
|
|
if (list.getStatus() == 1) {
|
|
QwGroupChat qwGroupChatResigned = qwGroupChatMapper.selectQwGroupChatByChatId(list.getChat_id());
|
|
QwGroupChat qwGroupChatResigned = qwGroupChatMapper.selectQwGroupChatByChatId(list.getChat_id());
|
|
- qwGroupChatResigned.setUpdateTime(new Date());
|
|
|
|
- qwGroupChatResigned.setStatus(String.valueOf(list.getStatus()));
|
|
|
|
- qwGroupChatMapper.updateQwGroupChat(qwGroupChatResigned);
|
|
|
|
|
|
+ if (qwGroupChatResigned!=null){
|
|
|
|
+ qwGroupChatResigned.setUpdateTime(new Date());
|
|
|
|
+ qwGroupChatResigned.setStatus(String.valueOf(list.getStatus()));
|
|
|
|
+ qwGroupChatMapper.updateQwGroupChat(qwGroupChatResigned);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|