提交 3da007f2 编写于 作者: 楼国栋

Merge branch 'fix/qywx_not_sync_data' into 'wrdp'

同步表达式清空状态就不同步企业微信通讯录数据

See merge request o2oa/o2oa!6163
......@@ -116,13 +116,21 @@ public class Qiyeweixin extends ConfigObject {
public Boolean getMessageEnable() {
return BooleanUtils.isTrue(this.messageEnable);
}
//
// public String getSyncCron() {
// return StringUtils.isEmpty(this.syncCron) ? default_syncCron : this.syncCron;
// }
// 清空表达式 不执行同步操作
public String getSyncCron() {
return StringUtils.isEmpty(this.syncCron) ? default_syncCron : this.syncCron;
return this.syncCron;
}
// public String getForceSyncCron() {
// return StringUtils.isEmpty(this.forceSyncCron) ? default_forceSyncCron : this.forceSyncCron;
// }
public String getForceSyncCron() {
return StringUtils.isEmpty(this.forceSyncCron) ? default_forceSyncCron : this.forceSyncCron;
return this.forceSyncCron;
}
public String getCorpId() {
......
......@@ -23,6 +23,7 @@ import com.x.program.center.schedule.WeLinkSyncOrganization;
import com.x.program.center.schedule.WeLinkSyncOrganizationTrigger;
import com.x.program.center.schedule.ZhengwuDingdingSyncOrganization;
import com.x.program.center.schedule.ZhengwuDingdingSyncOrganizationTrigger;
import org.apache.commons.lang3.StringUtils;
public class ThisApplication {
......@@ -63,7 +64,7 @@ public class ThisApplication {
Config.zhengwuDingding().getForceSyncCron());
}
/* 企业微信拉入同步 */
if (BooleanUtils.isTrue(Config.qiyeweixin().getEnable())) {
if (BooleanUtils.isTrue(Config.qiyeweixin().getEnable()) && StringUtils.isNotBlank(Config.qiyeweixin().getSyncCron())) {
/* 启动同步任务 */
context().scheduleLocal(QiyeweixinSyncOrganization.class, Config.qiyeweixin().getSyncCron());
/* 添加一个强制同步任务 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册