Commit e0597cd7 by fudahua

没有数据

parent a5f266ed
...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.service; ...@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.service;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.PreDealLogInfoDTO; import com.gic.haoban.manage.api.dto.PreDealLogInfoDTO;
import com.gic.haoban.manage.api.dto.SyncCheckDTO; import com.gic.haoban.manage.api.dto.SyncCheckDTO;
import com.gic.haoban.manage.api.dto.SyncSingleDealDTO; import com.gic.haoban.manage.api.dto.SyncSingleDealDTO;
...@@ -108,7 +109,7 @@ public interface DealSyncOperationApiService { ...@@ -108,7 +109,7 @@ public interface DealSyncOperationApiService {
/** /**
* 处理同步 * 处理同步
*/ */
public void dealQywxDepartment(String taskId, String wxEnterpriseId); public String dealQywxDepartment(String taskId, String wxEnterpriseId);
/** /**
* 清理不存在的数据 * 清理不存在的数据
......
...@@ -528,21 +528,21 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ ...@@ -528,21 +528,21 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
@Override @Override
public void dealQywxDepartment(String taskId, String wxEnterpriseId) { public String dealQywxDepartment(String taskId, String wxEnterpriseId) {
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(wxEnterpriseId); WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(wxEnterpriseId);
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(wxEnterpriseDTO.getWxEnterpriseId(), SecretTypeEnum.HAOBAN_HELP.getVal()); SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(wxEnterpriseDTO.getWxEnterpriseId(), SecretTypeEnum.HAOBAN_HELP.getVal());
if (null == secretSetting||secretSetting.getCheckFlag()==0) { if (null == secretSetting||secretSetting.getCheckFlag()==0) {
logger.info("没有配置secret"); logger.info("没有配置secret");
syncTaskService.updateTaskStatus(taskId,SyncTaskStatusEnum.exception_close.getVal()); syncTaskService.updateTaskStatus(taskId,SyncTaskStatusEnum.exception_close.getVal());
unlockTask(wxEnterpriseId); unlockTask(wxEnterpriseId);
return ; return "没有配置secret";
} }
List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = qywxDepartmentApiService.listSelfDepartment(wxEnterpriseDTO.getCorpid(), secretSetting.getSecretVal(), 1); List<com.gic.wechat.api.dto.qywx.DepartmentDTO> list = qywxDepartmentApiService.listSelfDepartment(wxEnterpriseDTO.getCorpid(), secretSetting.getSecretVal(), 1);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
logger.info("没有数据同步"); logger.info("没有数据同步");
syncTaskService.updateTaskStatus(taskId,SyncTaskStatusEnum.exception_close.getVal()); syncTaskService.updateTaskStatus(taskId,SyncTaskStatusEnum.exception_close.getVal());
unlockTask(wxEnterpriseId); unlockTask(wxEnterpriseId);
return; return "没有数据同步或权限没设置全部";
} }
List<TabHaobanPreDealLog> dealLogList = list.stream().map(dto -> { List<TabHaobanPreDealLog> dealLogList = list.stream().map(dto -> {
TabHaobanPreDealLog dealLog = new TabHaobanPreDealLog(); TabHaobanPreDealLog dealLog = new TabHaobanPreDealLog();
...@@ -560,6 +560,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ ...@@ -560,6 +560,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
HashSet<String> hashSet = new HashSet<>(); HashSet<String> hashSet = new HashSet<>();
hashSet.add("1"); hashSet.add("1");
dealDepartmentToMq(taskId, hashSet, SyncTaskStatusEnum.group_sync); dealDepartmentToMq(taskId, hashSet, SyncTaskStatusEnum.group_sync);
return null;
} }
......
...@@ -272,7 +272,10 @@ public class ApplicationController extends WebBaseController{ ...@@ -272,7 +272,10 @@ public class ApplicationController extends WebBaseController{
if (StringUtils.isBlank(taskId)) { if (StringUtils.isBlank(taskId)) {
return resultResponse(HaoBanErrCode.ERR_0, false); return resultResponse(HaoBanErrCode.ERR_0, false);
} }
dealSyncOperationApiService.dealQywxDepartment(taskId, wxEnterpriseId); String ret = dealSyncOperationApiService.dealQywxDepartment(taskId, wxEnterpriseId);
if (null!=ret) {
return resultResponse(HaoBanErrCode.ERR_0,ret);
}
} }
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
......
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