Commit 1791eeb0 by 徐高华

parent 2addd96a
......@@ -4,6 +4,7 @@ import java.util.List;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.chat.GroupChatDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatOwnerDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatOwnerHistoryDTO;
......@@ -105,7 +106,7 @@ public interface GroupChatService {
* @return
* @throws
*/
public void transfer(String wxEnterpriseId, String staffId, List<Long> groupChatIdList);
public ServiceResponse<Void> transfer(String wxEnterpriseId, String staffId, List<Long> groupChatIdList);
/**
*
......
......@@ -693,7 +693,7 @@ public class GroupChatServiceImpl implements GroupChatService {
// 匹配群成员-客户
private void matchGicMember(String wxEnterpriseId, String enterpriseId, String unionid, String externalUserId,
TabGroupChatUser user) {
logger.info("入群匹配群客户,unionid={},exteruserid={}",unionid,externalUserId);
logger.info("入群匹配群客户,unionid={},exteruserid={}", unionid, externalUserId);
if (StringUtils.isBlank(enterpriseId)) {
return;
}
......@@ -849,11 +849,11 @@ public class GroupChatServiceImpl implements GroupChatService {
}
@Override
public void transfer(String wxEnterpriseId, String staffId, List<Long> groupChatIdList) {
public ServiceResponse<Void> transfer(String wxEnterpriseId, String staffId, List<Long> groupChatIdList) {
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId);
if (null == qwDTO) {
logger.info("wxEnterpriseId不存在,id={}", wxEnterpriseId);
return;
return ServiceResponse.failure("9999", "企业不存在");
}
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(staffId);
String userid = staff.getWxUserId();
......@@ -865,6 +865,14 @@ public class GroupChatServiceImpl implements GroupChatService {
ServiceResponse<List<FailChatListDTO>> resp = this.qywxChatApiService.transfer(qwDTO.getThirdCorpid(),
config.getWxSuiteid(), wxChatIdList, userid);
logger.info("群继承={}", JSON.toJSONString(resp));
if (!resp.isSuccess()) {
return ServiceResponse.failure("9999", resp.getMessage());
} else {
if (CollectionUtils.isNotEmpty(resp.getResult())) {
return ServiceResponse.failure("9999", JSON.toJSONString(resp.getResult()));
}
}
return ServiceResponse.success();
}
// 如果群的人数达到上限,则群GIC侧的下线,记录状态,且从活码中剔除
......
......@@ -205,8 +205,7 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
@Override
public ServiceResponse<Void> transfer(String wxEnterpriseId, String staffId, List<Long> groupChatIdList) {
this.groupChatService.transfer(wxEnterpriseId, staffId, groupChatIdList);
return ServiceResponse.success();
return this.groupChatService.transfer(wxEnterpriseId, staffId, groupChatIdList);
}
@Override
......
......@@ -191,6 +191,10 @@ public class GroupChatController {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
ServiceResponse<Void> resp = this.groupChatApiService.transfer(wxEnterpriseId, staffId, idList);
if(!resp.isSuccess()) {
GicLogRecordEvaluationContext.noWriteLog();
return RestResponse.failure("9999", resp.getMessage());
}
StaffDTO staff = this.staffApiService.selectById(staffId);
String logContent = "将【" + this.getChatNames(wxEnterpriseId, idList) + "】分配给【" + staff.getStaffName() + "】继承";
GicLogRecordEvaluationContext.putAttribute("logValue", logContent);
......
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