Commit b00b135d by jinxin

定时同步企业微信通讯录列表

parent 4c7bc159
......@@ -93,5 +93,5 @@ public interface WxEnterpriseMapper {
* 根据是否配置回调地址查询所有企业微信
* @return
*/
List<WxEnterpriseDTO> listWxEnterpriseByCallbackFlag(@Param("callbackFlag")Integer callbackFlag);
List<String> listWxEnterpriseByCallbackFlag(@Param("callbackFlag")Integer callbackFlag);
}
\ No newline at end of file
......@@ -97,6 +97,6 @@ public interface WxEnterpriseService {
* 根据是否配置回调地址查询所有企业微信
* @return
*/
List<WxEnterpriseDTO> listWxEnterpriseByCallbackFlag(Integer callbackFlag);
List<String> listWxEnterpriseByCallbackFlag(Integer callbackFlag);
}
......@@ -313,7 +313,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
}
@Override
public List<WxEnterpriseDTO> listWxEnterpriseByCallbackFlag(Integer callbackFlag) {
public List<String> listWxEnterpriseByCallbackFlag(Integer callbackFlag) {
return this.mapper.listWxEnterpriseByCallbackFlag(callbackFlag);
}
}
......@@ -1209,10 +1209,9 @@ public class StaffApiServiceImpl implements StaffApiService {
public com.gic.api.base.commons.ServiceResponse<Boolean> syncQywxStaffList(String params) {
logger.info("定时刷新企业微信通讯录列表信息");
//查询所有未配置回调地址的自建应用
List<WxEnterpriseDTO> enterpriseDTOList = wxEnterpriseService.listWxEnterpriseByCallbackFlag(0);
if(CollUtil.isNotEmpty(enterpriseDTOList)){
for (WxEnterpriseDTO dto : enterpriseDTOList){
String wxEnterpriseId = dto.getWxEnterpriseId();
List<String> wxEnterpriseList = wxEnterpriseService.listWxEnterpriseByCallbackFlag(0);
if(CollUtil.isNotEmpty(wxEnterpriseList)){
for (String wxEnterpriseId : wxEnterpriseList){
logger.info("开始刷新:{}",wxEnterpriseId);
String taskId = dealSyncOperationApiService.createQywxTask(wxEnterpriseId, "后门同步企业微信架构", "定时同步处理", "后门同步企业微信架构");
String ret = dealSyncOperationApiService.dealQywxDepartment(taskId, wxEnterpriseId);
......
......@@ -594,9 +594,9 @@
where wx_enterprise_id = #{wxEnterpriseId}
</update>
<select id="listWxEnterpriseByCallbackFlag" resultType="com.gic.haoban.manage.api.dto.WxEnterpriseDTO" >
<select id="listWxEnterpriseByCallbackFlag" resultType="java.lang.String" >
select
<include refid="Base_Column_List"/>
wx_enterprise_id
from tab_haoban_wx_enterprise
where
status_flag = 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