Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
585e1ea4
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
585e1ea4
编写于
8月 20, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix queue start
上级
ed56ea12
变更
32
隐藏空白更改
内联
并排
Showing
32 changed file
with
272 addition
and
200 deletion
+272
-200
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/ThisApplication.java
...va/com/x/attendance/assemble/control/ThisApplication.java
+27
-58
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/ThisApplication.java
...main/java/com/x/bbs/assemble/control/ThisApplication.java
+9
-7
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/ThisApplication.java
...java/com/x/calendar/assemble/control/ThisApplication.java
+13
-7
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/ThisApplication.java
...main/java/com/x/cms/assemble/control/ThisApplication.java
+19
-28
o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/ThisApplication.java
...ain/java/com/x/file/assemble/control/ThisApplication.java
+5
-2
o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/ThisApplication.java
.../java/com/x/general/assemble/control/ThisApplication.java
+4
-0
o2server/x_hotpic_assemble_control/src/main/java/com/x/hotpic/assemble/control/ThisApplication.java
...n/java/com/x/hotpic/assemble/control/ThisApplication.java
+5
-2
o2server/x_jpush_assemble_control/src/main/java/com/x/jpush/assemble/control/ThisApplication.java
...in/java/com/x/jpush/assemble/control/ThisApplication.java
+4
-0
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/ThisApplication.java
.../java/com/x/meeting/assemble/control/ThisApplication.java
+4
-0
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/ThisApplication.java
...a/com/x/message/assemble/communicate/ThisApplication.java
+51
-53
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/ThisApplication.java
...ain/java/com/x/mind/assemble/control/ThisApplication.java
+6
-2
o2server/x_mind_assemble_control/src/main/webapp/describe/sources/com/x/mind/assemble/control/ThisApplication.java
.../sources/com/x/mind/assemble/control/ThisApplication.java
+7
-2
o2server/x_okr_assemble_control/src/main/java/com/x/okr/assemble/control/ThisApplication.java
...main/java/com/x/okr/assemble/control/ThisApplication.java
+5
-4
o2server/x_okr_assemble_control/src/main/webapp/describe/sources/com/x/okr/assemble/control/ThisApplication.java
...e/sources/com/x/okr/assemble/control/ThisApplication.java
+6
-4
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/ThisApplication.java
...organization/assemble/authentication/ThisApplication.java
+5
-2
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/ThisApplication.java
.../com/x/organization/assemble/control/ThisApplication.java
+4
-0
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/ThisApplication.java
.../com/x/organization/assemble/express/ThisApplication.java
+4
-0
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/ThisApplication.java
...com/x/organization/assemble/personal/ThisApplication.java
+4
-0
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/ThisApplication.java
.../java/com/x/portal/assemble/designer/ThisApplication.java
+4
-0
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/ThisApplication.java
...n/java/com/x/portal/assemble/surface/ThisApplication.java
+4
-0
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ThisApplication.java
...ources/com/x/portal/assemble/surface/ThisApplication.java
+5
-0
o2server/x_processplatform_assemble_bam/src/main/java/com/x/processplatform/assemble/bam/ThisApplication.java
...a/com/x/processplatform/assemble/bam/ThisApplication.java
+4
-0
o2server/x_processplatform_assemble_bam/src/main/webapp/describe/sources/com/x/processplatform/assemble/bam/ThisApplication.java
...s/com/x/processplatform/assemble/bam/ThisApplication.java
+5
-0
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/ThisApplication.java
.../x/processplatform/assemble/designer/ThisApplication.java
+14
-15
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/ThisApplication.java
...m/x/processplatform/assemble/surface/ThisApplication.java
+4
-0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ThisApplication.java
...x/processplatform/service/processing/ThisApplication.java
+7
-3
o2server/x_program_center/src/main/java/com/x/program/center/ThisApplication.java
...r/src/main/java/com/x/program/center/ThisApplication.java
+16
-10
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/ThisApplication.java
...n/java/com/x/query/assemble/designer/ThisApplication.java
+4
-0
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/ThisApplication.java
...in/java/com/x/query/assemble/surface/ThisApplication.java
+4
-0
o2server/x_query_service_processing/src/main/java/com/x/query/service/processing/ThisApplication.java
.../java/com/x/query/service/processing/ThisApplication.java
+4
-0
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/ThisApplication.java
...urces/com/x/query/service/processing/ThisApplication.java
+4
-0
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/jaxrs/test/ActionGroup2.java
...m/x/query/service/processing/jaxrs/test/ActionGroup2.java
+11
-1
未找到文件。
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
package
com.x.attendance.assemble.control
;
package
com.x.attendance.assemble.control
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.attendance.assemble.control.processor.monitor.MonitorFileDataOpt
;
import
com.x.attendance.assemble.control.processor.monitor.MonitorFileDataOpt
;
import
com.x.attendance.assemble.control.processor.thread.DataProcessThreadFactory
;
import
com.x.attendance.assemble.control.processor.thread.DataProcessThreadFactory
;
import
com.x.attendance.assemble.control.schedule.*
;
import
com.x.attendance.assemble.control.schedule.AttendanceStatisticTask
;
import
com.x.attendance.assemble.control.schedule.DetailLastDayRecordAnalyseTask
;
import
com.x.attendance.assemble.control.schedule.DingdingAttendanceSyncScheduleTask
;
import
com.x.attendance.assemble.control.schedule.MobileRecordAnalyseTask
;
import
com.x.attendance.assemble.control.schedule.QywxAttendanceSyncScheduleTask
;
import
com.x.attendance.assemble.control.service.AttendanceSettingService
;
import
com.x.attendance.assemble.control.service.AttendanceSettingService
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
org.apache.commons.lang3.BooleanUtils
;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
//nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
}
}
public
static
QueueDingdingAttendance
dingdingQueue
=
new
QueueDingdingAttendance
();
public
static
final
QueueDingdingAttendance
dingdingQueue
=
new
QueueDingdingAttendance
();
public
static
QueueQywxAttendanceSync
qywxQueue
=
new
QueueQywxAttendanceSync
();
public
static
final
QueueQywxAttendanceSync
qywxQueue
=
new
QueueQywxAttendanceSync
();
public
static
QueueQywxUnitStatistic
unitQywxStatisticQueue
=
new
QueueQywxUnitStatistic
();
public
static
final
QueueQywxUnitStatistic
unitQywxStatisticQueue
=
new
QueueQywxUnitStatistic
();
public
static
QueueQywxPersonStatistic
personQywxStatisticQueue
=
new
QueueQywxPersonStatistic
();
public
static
final
QueueQywxPersonStatistic
personQywxStatisticQueue
=
new
QueueQywxPersonStatistic
();
public
static
QueueDingdingPersonStatistic
personStatisticQueue
=
new
QueueDingdingPersonStatistic
();
public
static
final
QueueDingdingPersonStatistic
personStatisticQueue
=
new
QueueDingdingPersonStatistic
();
public
static
QueueDingdingUnitStatistic
unitStatisticQueue
=
new
QueueDingdingUnitStatistic
();
public
static
final
QueueDingdingUnitStatistic
unitStatisticQueue
=
new
QueueDingdingUnitStatistic
();
public
static
QueuePersonAttendanceDetailAnalyse
detailAnalyseQueue
=
new
QueuePersonAttendanceDetailAnalyse
();
public
static
final
QueuePersonAttendanceDetailAnalyse
detailAnalyseQueue
=
new
QueuePersonAttendanceDetailAnalyse
();
public
static
QueueAttendanceDetailStatistic
detailStatisticQueue
=
new
QueueAttendanceDetailStatistic
();
public
static
final
QueueAttendanceDetailStatistic
detailStatisticQueue
=
new
QueueAttendanceDetailStatistic
();
public
static
void
init
()
throws
Exception
{
public
static
void
init
()
throws
Exception
{
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_attendance_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_attendance_assemble_control
());
new
AttendanceSettingService
().
initAllSystemConfig
();
new
AttendanceSettingService
().
initAllSystemConfig
();
context
.
startQueue
(
detailAnalyseQueue
);
detailAnalyseQueue
.
start
();
context
.
startQueue
(
detailStatisticQueue
);
detailStatisticQueue
.
start
();
if
(
BooleanUtils
.
isTrue
(
Config
.
dingding
().
getAttendanceSyncEnable
()))
{
if
(
BooleanUtils
.
isTrue
(
Config
.
dingding
().
getAttendanceSyncEnable
()))
{
dingdingQueue
.
start
(
);
context
.
startQueue
(
dingdingQueue
);
personStatisticQueue
.
start
(
);
context
.
startQueue
(
personStatisticQueue
);
unitStatisticQueue
.
start
(
);
context
.
startQueue
(
unitStatisticQueue
);
context
.
schedule
(
DingdingAttendanceSyncScheduleTask
.
class
,
"0 0 1 * * ?"
);
context
.
schedule
(
DingdingAttendanceSyncScheduleTask
.
class
,
"0 0 1 * * ?"
);
// 已经将任务 放到了同步结束后执行 暂时不需要开定时任务了
// 已经将任务 放到了同步结束后执行 暂时不需要开定时任务了
// context.schedule(DingdingAttendanceStatisticScheduleTask.class, "0 0 3 * * ?");
// context.schedule(DingdingAttendanceStatisticPersonScheduleTask.class, "0 0 3 * * ?");
}
}
if
(
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getAttendanceSyncEnable
()))
{
if
(
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getAttendanceSyncEnable
()))
{
qywxQueue
.
start
(
);
context
.
startQueue
(
qywxQueue
);
unitQywxStatisticQueue
.
start
(
);
context
.
startQueue
(
unitQywxStatisticQueue
);
personQywxStatisticQueue
.
start
(
);
context
.
startQueue
(
personQywxStatisticQueue
);
context
.
schedule
(
QywxAttendanceSyncScheduleTask
.
class
,
"0 0 1 * * ?"
);
context
.
schedule
(
QywxAttendanceSyncScheduleTask
.
class
,
"0 0 1 * * ?"
);
}
}
context
.
schedule
(
AttendanceStatisticTask
.
class
,
"0 0 0/4 * * ?"
);
context
.
schedule
(
AttendanceStatisticTask
.
class
,
"0 0 0/4 * * ?"
);
context
.
schedule
(
MobileRecordAnalyseTask
.
class
,
"0 0 * * * ?"
);
context
.
schedule
(
MobileRecordAnalyseTask
.
class
,
"0 0 * * * ?"
);
// 每天凌晨1点,计算前一天所有的未签退和未分析的打卡数据
// 每天凌晨1点,计算前一天所有的未签退和未分析的打卡数据
context
.
schedule
(
DetailLastDayRecordAnalyseTask
.
class
,
"0 0 1 * * ?"
);
context
.
schedule
(
DetailLastDayRecordAnalyseTask
.
class
,
"0 0 1 * * ?"
);
...
@@ -68,43 +71,9 @@ public class ThisApplication {
...
@@ -68,43 +71,9 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
shutdown
();
CacheManager
.
shutdown
();
DataProcessThreadFactory
.
getInstance
().
showdown
();
DataProcessThreadFactory
.
getInstance
().
showdown
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
MonitorFileDataOpt
.
stop
();
MonitorFileDataOpt
.
stop
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
try
{
dingdingQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
personStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
unitStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
qywxQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
unitQywxStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
personQywxStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
\ No newline at end of file
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -2,6 +2,8 @@ package com.x.bbs.assemble.control;
...
@@ -2,6 +2,8 @@ package com.x.bbs.assemble.control;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.Config
;
...
@@ -26,10 +28,14 @@ import com.x.bbs.entity.BBSSectionInfo;
...
@@ -26,10 +28,14 @@ import com.x.bbs.entity.BBSSectionInfo;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
final
String
BBSMANAGER
=
"BBSManager@CMSManagerSystemRole@R"
;
public
static
final
String
BBSMANAGER
=
"BBSManager@CMSManagerSystemRole@R"
;
public
static
QueueNewReplyNotify
queueNewReplyNotify
;
public
static
final
QueueNewReplyNotify
queueNewReplyNotify
=
new
QueueNewReplyNotify
()
;
public
static
QueueNewSubjectNotify
queueNewSubjectNotify
;
public
static
final
QueueNewSubjectNotify
queueNewSubjectNotify
=
new
QueueNewSubjectNotify
()
;
public
static
String
CONFIG_BBS_ANONYMOUS_PERMISSION
=
"YES"
;
public
static
String
CONFIG_BBS_ANONYMOUS_PERMISSION
=
"YES"
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
@@ -43,11 +49,7 @@ public class ThisApplication {
...
@@ -43,11 +49,7 @@ public class ThisApplication {
CONFIG_BBS_ANONYMOUS_PERMISSION
=
(
new
BBSConfigSettingService
())
CONFIG_BBS_ANONYMOUS_PERMISSION
=
(
new
BBSConfigSettingService
())
.
getValueWithConfigCode
(
"BBS_ANONYMOUS_PERMISSION"
);
.
getValueWithConfigCode
(
"BBS_ANONYMOUS_PERMISSION"
);
initAllSystemConfig
();
initAllSystemConfig
();
queueNewReplyNotify
=
new
QueueNewReplyNotify
();
queueNewSubjectNotify
=
new
QueueNewSubjectNotify
();
MessageConnector
.
start
(
context
());
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueNewReplyNotify
);
context
().
startQueue
(
queueNewReplyNotify
);
context
().
startQueue
(
queueNewSubjectNotify
);
context
().
startQueue
(
queueNewSubjectNotify
);
context
.
schedule
(
SubjectTotalStatisticTask
.
class
,
"0 0 1 * * ?"
);
// 每天凌晨一点执行
context
.
schedule
(
SubjectTotalStatisticTask
.
class
,
"0 0 1 * * ?"
);
// 每天凌晨一点执行
...
@@ -144,7 +146,7 @@ public class ThisApplication {
...
@@ -144,7 +146,7 @@ public class ThisApplication {
* @return
* @return
*/
*/
public
static
Boolean
isForumManager
(
EffectivePerson
effectivePerson
,
BBSForumInfo
forumInfo
)
{
public
static
Boolean
isForumManager
(
EffectivePerson
effectivePerson
,
BBSForumInfo
forumInfo
)
{
if
(
isBBSManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isBBSManager
(
effectivePerson
)
))
{
return
true
;
return
true
;
}
}
if
(
forumInfo
!=
null
&&
ListTools
.
isNotEmpty
(
forumInfo
.
getForumManagerList
()))
{
if
(
forumInfo
!=
null
&&
ListTools
.
isNotEmpty
(
forumInfo
.
getForumManagerList
()))
{
...
...
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -2,6 +2,8 @@ package com.x.calendar.assemble.control;
...
@@ -2,6 +2,8 @@ package com.x.calendar.assemble.control;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.Config
;
...
@@ -17,6 +19,10 @@ import com.x.calendar.core.entity.Calendar_Event;
...
@@ -17,6 +19,10 @@ import com.x.calendar.core.entity.Calendar_Event;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
final
String
CalendarMANAGER
=
"CalendarManager"
;
public
static
final
String
CalendarMANAGER
=
"CalendarManager"
;
...
@@ -73,7 +79,7 @@ public class ThisApplication {
...
@@ -73,7 +79,7 @@ public class ThisApplication {
* @return
* @return
*/
*/
public
static
Boolean
isCalendarManager
(
EffectivePerson
effectivePerson
,
Calendar
calendar
)
{
public
static
Boolean
isCalendarManager
(
EffectivePerson
effectivePerson
,
Calendar
calendar
)
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
return
true
;
}
}
if
(
calendar
!=
null
)
{
if
(
calendar
!=
null
)
{
...
@@ -98,11 +104,11 @@ public class ThisApplication {
...
@@ -98,11 +104,11 @@ public class ThisApplication {
*/
*/
public
static
Boolean
isCalendarPublisher
(
EffectivePerson
effectivePerson
,
List
<
String
>
unitNames
,
public
static
Boolean
isCalendarPublisher
(
EffectivePerson
effectivePerson
,
List
<
String
>
unitNames
,
List
<
String
>
groupNames
,
Calendar
calendar
)
{
List
<
String
>
groupNames
,
Calendar
calendar
)
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
return
true
;
}
}
if
(
calendar
!=
null
)
{
if
(
calendar
!=
null
)
{
if
(
isCalendarManager
(
effectivePerson
,
calendar
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarManager
(
effectivePerson
,
calendar
)
))
{
return
true
;
return
true
;
}
}
// 判断发布权限
// 判断发布权限
...
@@ -142,13 +148,13 @@ public class ThisApplication {
...
@@ -142,13 +148,13 @@ public class ThisApplication {
* @throws Exception
* @throws Exception
*/
*/
public
static
Boolean
isCalendarPublisher
(
EffectivePerson
effectivePerson
,
Calendar
calendar
)
throws
Exception
{
public
static
Boolean
isCalendarPublisher
(
EffectivePerson
effectivePerson
,
Calendar
calendar
)
throws
Exception
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
return
true
;
}
}
List
<
String
>
unitNames
=
null
;
List
<
String
>
unitNames
=
null
;
List
<
String
>
groupNames
=
null
;
List
<
String
>
groupNames
=
null
;
if
(
calendar
!=
null
)
{
if
(
calendar
!=
null
)
{
if
(
isCalendarManager
(
effectivePerson
,
calendar
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarManager
(
effectivePerson
,
calendar
)
))
{
return
true
;
return
true
;
}
}
UserManagerService
userManagerService
=
new
UserManagerService
();
UserManagerService
userManagerService
=
new
UserManagerService
();
...
@@ -192,7 +198,7 @@ public class ThisApplication {
...
@@ -192,7 +198,7 @@ public class ThisApplication {
*/
*/
public
static
Boolean
isEventManager
(
EffectivePerson
effectivePerson
,
Calendar
calendar
,
Calendar_Event
event
)
public
static
Boolean
isEventManager
(
EffectivePerson
effectivePerson
,
Calendar
calendar
,
Calendar_Event
event
)
throws
Exception
{
throws
Exception
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
return
true
;
}
}
List
<
String
>
unitNames
=
null
;
List
<
String
>
unitNames
=
null
;
...
@@ -203,7 +209,7 @@ public class ThisApplication {
...
@@ -203,7 +209,7 @@ public class ThisApplication {
unitNames
=
userManagerService
.
listUnitNamesWithPerson
(
personName
);
unitNames
=
userManagerService
.
listUnitNamesWithPerson
(
personName
);
groupNames
=
userManagerService
.
listGroupNamesByPerson
(
personName
);
groupNames
=
userManagerService
.
listGroupNamesByPerson
(
personName
);
// 判断日历的发布权限
// 判断日历的发布权限
if
(
isCalendarPublisher
(
effectivePerson
,
unitNames
,
groupNames
,
calendar
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarPublisher
(
effectivePerson
,
unitNames
,
groupNames
,
calendar
)
))
{
return
true
;
return
true
;
}
}
// 判断事件的管理权限
// 判断事件的管理权限
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
package
com.x.cms.assemble.control
;
package
com.x.cms.assemble.control
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.cache.CacheManager
;
...
@@ -22,17 +23,27 @@ import com.x.cms.assemble.control.timertask.Timertask_RefreshAllDocumentReviews;
...
@@ -22,17 +23,27 @@ import com.x.cms.assemble.control.timertask.Timertask_RefreshAllDocumentReviews;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
final
String
ROLE_CMSManager
=
"CMSManager@CMSManagerSystemRole@R"
;
public
static
final
String
ROLE_CMSManager
=
"CMSManager@CMSManagerSystemRole@R"
;
public
static
final
String
ROLE_Manager
=
"Manager@ManagerSystemRole@R"
;
public
static
final
String
ROLE_Manager
=
"Manager@ManagerSystemRole@R"
;
public
static
QueueDataRowImport
queueDataRowImport
;
// 文档批量导入时数据存储过程
public
static
QueueDocumentDelete
queueDocumentDelete
;
public
static
final
QueueDataRowImport
queueDataRowImport
=
new
QueueDataRowImport
();
public
static
QueueDocumentUpdate
queueDocumentUpdate
;
// Document删除时也需要检查一下热点图片里的数据是否已经删除掉了
public
static
QueueDocumentViewCountUpdate
queueDocumentViewCountUpdate
;
public
static
final
QueueDocumentDelete
queueDocumentDelete
=
new
QueueDocumentDelete
();
public
static
QueueBatchOperation
queueBatchOperation
;
// Document变更标题时也需要更新一下热点图片里的数据
public
static
QueueSendDocumentNotify
queueSendDocumentNotify
;
public
static
final
QueueDocumentUpdate
queueDocumentUpdate
=
new
QueueDocumentUpdate
();
private
static
ConcurrentHashMap
<
String
,
DataImportStatus
>
importStatus
=
new
ConcurrentHashMap
<>();
// Document被访问时,需要将总的访问量更新到item的document中,便于视图使用,在队列里异步修改
public
static
final
QueueDocumentViewCountUpdate
queueDocumentViewCountUpdate
=
new
QueueDocumentViewCountUpdate
();
// 执行数据库中的批处理操作
public
static
final
QueueBatchOperation
queueBatchOperation
=
new
QueueBatchOperation
();
// Document发布时,向所有阅读者推送通知
public
static
final
QueueSendDocumentNotify
queueSendDocumentNotify
=
new
QueueSendDocumentNotify
();
private
static
final
ConcurrentHashMap
<
String
,
DataImportStatus
>
importStatus
=
new
ConcurrentHashMap
<>();
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
@@ -41,21 +52,7 @@ public class ThisApplication {
...
@@ -41,21 +52,7 @@ public class ThisApplication {
public
static
void
init
()
throws
Exception
{
public
static
void
init
()
throws
Exception
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_cms_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_cms_assemble_control
());
// 执行数据库中的批处理操作
queueBatchOperation
=
new
QueueBatchOperation
();
// Document删除时也需要检查一下热点图片里的数据是否已经删除掉了
queueDocumentDelete
=
new
QueueDocumentDelete
();
// 文档批量导入时数据存储过程
queueDataRowImport
=
new
QueueDataRowImport
();
// Document变更标题时也需要更新一下热点图片里的数据
queueDocumentUpdate
=
new
QueueDocumentUpdate
();
// Document被访问时,需要将总的访问量更新到item的document中,便于视图使用,在队列里异步修改
queueDocumentViewCountUpdate
=
new
QueueDocumentViewCountUpdate
();
// Document发布时,向所有阅读者推送通知
queueSendDocumentNotify
=
new
QueueSendDocumentNotify
();
MessageConnector
.
start
(
context
());
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueBatchOperation
);
context
().
startQueue
(
queueBatchOperation
);
context
().
startQueue
(
queueDocumentDelete
);
context
().
startQueue
(
queueDocumentDelete
);
context
().
startQueue
(
queueDataRowImport
);
context
().
startQueue
(
queueDataRowImport
);
...
@@ -77,18 +74,12 @@ public class ThisApplication {
...
@@ -77,18 +74,12 @@ public class ThisApplication {
public
static
void
destroy
()
{
public
static
void
destroy
()
{
try
{
try
{
CacheManager
.
shutdown
();
CacheManager
.
shutdown
();
queueBatchOperation
.
stop
();
queueDocumentDelete
.
stop
();
queueDataRowImport
.
stop
();
queueDocumentUpdate
.
stop
();
queueDocumentViewCountUpdate
.
stop
();
queueSendDocumentNotify
.
stop
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
public
static
Concurrent
Hash
Map
<
String
,
DataImportStatus
>
listImportStatus
()
{
public
static
ConcurrentMap
<
String
,
DataImportStatus
>
listImportStatus
()
{
return
importStatus
;
return
importStatus
;
}
}
...
...
o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -9,7 +9,11 @@ import com.x.file.assemble.control.jaxrs.file.FileRemoveQueue;
...
@@ -9,7 +9,11 @@ import com.x.file.assemble.control.jaxrs.file.FileRemoveQueue;
public
class
ThisApplication
{
public
class
ThisApplication
{
public
static
FileRemoveQueue
fileRemoveQueue
;
private
ThisApplication
()
{
// nothing
}
public
static
final
FileRemoveQueue
fileRemoveQueue
=
new
FileRemoveQueue
();
protected
static
Context
context
;
protected
static
Context
context
;
...
@@ -21,7 +25,6 @@ public class ThisApplication {
...
@@ -21,7 +25,6 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_file_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_file_assemble_control
());
fileRemoveQueue
=
new
FileRemoveQueue
();
MessageConnector
.
start
(
context
());
MessageConnector
.
start
(
context
());
context
().
startQueue
(
fileRemoveQueue
);
context
().
startQueue
(
fileRemoveQueue
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_hotpic_assemble_control/src/main/java/com/x/hotpic/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -9,7 +9,11 @@ import com.x.hotpic.assemble.control.schedule.InfoExistsCheckTask;
...
@@ -9,7 +9,11 @@ import com.x.hotpic.assemble.control.schedule.InfoExistsCheckTask;
public
class
ThisApplication
{
public
class
ThisApplication
{
public
static
DocumentExistsCheckTask
queueLoginRecord
;
private
ThisApplication
()
{
// nothing
}
public
static
final
DocumentExistsCheckTask
queueLoginRecord
=
new
DocumentExistsCheckTask
();
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
@@ -20,7 +24,6 @@ public class ThisApplication {
...
@@ -20,7 +24,6 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_hotpic_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_hotpic_assemble_control
());
queueLoginRecord
=
new
DocumentExistsCheckTask
();
context
.
startQueue
(
queueLoginRecord
);
context
.
startQueue
(
queueLoginRecord
);
context
.
schedule
(
InfoExistsCheckTask
.
class
,
"0 0/10 * * * ?"
);
context
.
schedule
(
InfoExistsCheckTask
.
class
,
"0 0/10 * * * ?"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
o2server/x_jpush_assemble_control/src/main/java/com/x/jpush/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -8,6 +8,10 @@ import com.x.base.core.project.message.MessageConnector;
...
@@ -8,6 +8,10 @@ import com.x.base.core.project.message.MessageConnector;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/ThisApplication.java
浏览文件 @
585e1ea4
package
com.x.message.assemble.communicate
;
package
com.x.message.assemble.communicate
;
import
com.x.base.core.project.message.MessageConnector
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.message.MessageConnector
;
import
com.x.message.assemble.communicate.schedule.Clean
;
import
com.x.message.assemble.communicate.schedule.Clean
;
import
com.x.message.assemble.communicate.schedule.TriggerMq
;
import
com.x.message.assemble.communicate.schedule.TriggerMq
;
import
com.x.message.core.entity.Message
;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
WsConsumeQueue
wsConsumeQueue
=
new
WsConsumeQueue
();
public
static
final
WsConsumeQueue
wsConsumeQueue
=
new
WsConsumeQueue
();
public
static
PmsConsumeQueue
pmsConsumeQueue
=
new
PmsConsumeQueue
();
public
static
final
PmsConsumeQueue
pmsConsumeQueue
=
new
PmsConsumeQueue
();
public
static
CalendarConsumeQueue
calendarConsumeQueue
=
new
CalendarConsumeQueue
();
public
static
final
CalendarConsumeQueue
calendarConsumeQueue
=
new
CalendarConsumeQueue
();
public
static
QiyeweixinConsumeQueue
qiyeweixinConsumeQueue
=
new
QiyeweixinConsumeQueue
();
public
static
final
QiyeweixinConsumeQueue
qiyeweixinConsumeQueue
=
new
QiyeweixinConsumeQueue
();
public
static
ZhengwuDingdingConsumeQueue
zhengwuDingdingConsumeQueue
=
new
ZhengwuDingdingConsumeQueue
();
public
static
final
ZhengwuDingdingConsumeQueue
zhengwuDingdingConsumeQueue
=
new
ZhengwuDingdingConsumeQueue
();
public
static
DingdingConsumeQueue
dingdingConsumeQueue
=
new
DingdingConsumeQueue
();
public
static
final
DingdingConsumeQueue
dingdingConsumeQueue
=
new
DingdingConsumeQueue
();
public
static
WeLinkConsumeQueue
weLinkConsumeQueue
=
new
WeLinkConsumeQueue
();
public
static
final
WeLinkConsumeQueue
weLinkConsumeQueue
=
new
WeLinkConsumeQueue
();
public
static
PmsInnerConsumeQueue
pmsInnerConsumeQueue
=
new
PmsInnerConsumeQueue
();
public
static
final
PmsInnerConsumeQueue
pmsInnerConsumeQueue
=
new
PmsInnerConsumeQueue
();
public
static
MQConsumeQueue
mqConsumeQueue
=
new
MQConsumeQueue
();
public
static
final
MQConsumeQueue
mqConsumeQueue
=
new
MQConsumeQueue
();
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
@@ -41,62 +44,57 @@ public class ThisApplication {
...
@@ -41,62 +44,57 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_message_assemble_communicate
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_message_assemble_communicate
());
if
(
Config
.
communicate
().
wsEnable
())
{
wsConsumeQueue
.
start
();
MessageConnector
.
start
(
context
());
}
startQueue
();
if
(
Config
.
communicate
().
pmsEnable
())
{
pmsConsumeQueue
.
start
();
}
if
(
Config
.
communicate
().
calendarEnable
())
{
calendarConsumeQueue
.
start
();
}
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
clean
().
getEnable
()))
{
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
clean
().
getEnable
()))
{
context
().
schedule
(
Clean
.
class
,
Config
.
communicate
().
clean
().
getCron
());
context
().
schedule
(
Clean
.
class
,
Config
.
communicate
().
clean
().
getCron
());
}
}
if
(
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getMessageEnable
()))
{
qiyeweixinConsumeQueue
.
start
();
}
if
(
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getMessageEnable
()))
{
zhengwuDingdingConsumeQueue
.
start
();
}
if
(
Config
.
dingding
().
getEnable
()
&&
Config
.
dingding
().
getMessageEnable
())
{
dingdingConsumeQueue
.
start
();
}
if
(
BooleanUtils
.
isTrue
(
Config
.
pushConfig
().
getEnable
()))
{
pmsInnerConsumeQueue
.
start
();
}
if
(
Config
.
weLink
().
getEnable
()
&&
Config
.
weLink
().
getMessageEnable
())
{
weLinkConsumeQueue
.
start
();
}
if
(
Config
.
mq
().
getEnable
())
{
mqConsumeQueue
.
start
();
}
MessageConnector
.
start
(
context
());
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
cronMq
().
getEnable
()))
{
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
cronMq
().
getEnable
()))
{
context
().
schedule
(
TriggerMq
.
class
,
Config
.
communicate
().
cronMq
().
getCron
());
context
().
schedule
(
TriggerMq
.
class
,
Config
.
communicate
().
cronMq
().
getCron
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
private
static
void
startQueue
()
throws
Exception
{
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
wsEnable
()))
{
context
().
startQueue
(
wsConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
pmsEnable
()))
{
context
().
startQueue
(
pmsConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
calendarEnable
()))
{
context
().
startQueue
(
calendarConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getMessageEnable
()))
{
context
().
startQueue
(
qiyeweixinConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getMessageEnable
()))
{
context
().
startQueue
(
zhengwuDingdingConsumeQueue
);
}
if
(
Config
.
dingding
().
getEnable
()
&&
Config
.
dingding
().
getMessageEnable
())
{
context
().
startQueue
(
dingdingConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
pushConfig
().
getEnable
()))
{
context
().
startQueue
(
pmsInnerConsumeQueue
);
}
if
(
Config
.
weLink
().
getEnable
()
&&
Config
.
weLink
().
getMessageEnable
())
{
context
().
startQueue
(
weLinkConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
mq
().
getEnable
()))
{
context
().
startQueue
(
mqConsumeQueue
);
}
}
public
static
void
destroy
()
{
public
static
void
destroy
()
{
try
{
try
{
CacheManager
.
shutdown
();
CacheManager
.
shutdown
();
wsConsumeQueue
.
stop
();
pmsConsumeQueue
.
stop
();
calendarConsumeQueue
.
stop
();
qiyeweixinConsumeQueue
.
stop
();
zhengwuDingdingConsumeQueue
.
stop
();
dingdingConsumeQueue
.
stop
();
pmsInnerConsumeQueue
.
stop
();
weLinkConsumeQueue
.
stop
();
MessageConnector
.
stop
();
MessageConnector
.
stop
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -8,8 +8,13 @@ import com.x.base.core.project.message.MessageConnector;
...
@@ -8,8 +8,13 @@ import com.x.base.core.project.message.MessageConnector;
import
com.x.mind.assemble.control.queue.QueueShareNotify
;
import
com.x.mind.assemble.control.queue.QueueShareNotify
;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
QueueShareNotify
queueShareNotify
;
public
static
final
QueueShareNotify
queueShareNotify
=
new
QueueShareNotify
()
;
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
@@ -19,7 +24,6 @@ public class ThisApplication {
...
@@ -19,7 +24,6 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_mind_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_mind_assemble_control
());
queueShareNotify
=
new
QueueShareNotify
();
MessageConnector
.
start
(
context
());
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueShareNotify
);
context
().
startQueue
(
queueShareNotify
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
o2server/x_mind_assemble_control/src/main/webapp/describe/sources/com/x/mind/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -8,8 +8,13 @@ import com.x.base.core.project.message.MessageConnector;
...
@@ -8,8 +8,13 @@ import com.x.base.core.project.message.MessageConnector;
import
com.x.mind.assemble.control.queue.QueueShareNotify
;
import
com.x.mind.assemble.control.queue.QueueShareNotify
;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
QueueShareNotify
queueShareNotify
;
public
static
final
QueueShareNotify
queueShareNotify
=
new
QueueShareNotify
()
;
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
@@ -19,7 +24,6 @@ public class ThisApplication {
...
@@ -19,7 +24,6 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_mind_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_mind_assemble_control
());
queueShareNotify
=
new
QueueShareNotify
();
MessageConnector
.
start
(
context
());
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueShareNotify
);
context
().
startQueue
(
queueShareNotify
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -30,6 +34,7 @@ public class ThisApplication {
...
@@ -30,6 +34,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
public
static
void
destroy
()
{
try
{
try
{
CacheManager
.
shutdown
();
queueShareNotify
.
stop
();
queueShareNotify
.
stop
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
o2server/x_okr_assemble_control/src/main/java/com/x/okr/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -20,13 +20,17 @@ import com.x.okr.assemble.control.service.OkrConfigSystemService;
...
@@ -20,13 +20,17 @@ import com.x.okr.assemble.control.service.OkrConfigSystemService;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Map
<
String
,
CacheImportFileStatus
>
importFileStatusMap
=
new
HashMap
<
String
,
CacheImportFileStatus
>();
public
static
Map
<
String
,
CacheImportFileStatus
>
importFileStatusMap
=
new
HashMap
<
String
,
CacheImportFileStatus
>();
public
static
final
String
OKRMANAGER
=
"OKRManager"
;
public
static
final
String
OKRMANAGER
=
"OKRManager"
;
public
static
QueueWorkDynamicRecord
queueWorkDynamicRecord
;
public
static
final
QueueWorkDynamicRecord
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
()
;
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
@@ -36,11 +40,8 @@ public class ThisApplication {
...
@@ -36,11 +40,8 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_okr_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_okr_assemble_control
());
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
();
context
().
startQueue
(
queueWorkDynamicRecord
);
context
().
startQueue
(
queueWorkDynamicRecord
);
new
OkrConfigSystemService
().
initAllSystemConfig
();
new
OkrConfigSystemService
().
initAllSystemConfig
();
// 每天凌晨2点执行一次
// 每天凌晨2点执行一次
context
.
schedule
(
St_WorkReportContent
.
class
,
"0 0 2 * * ?"
);
context
.
schedule
(
St_WorkReportContent
.
class
,
"0 0 2 * * ?"
);
// 每天凌晨2点30执行一次
// 每天凌晨2点30执行一次
...
...
o2server/x_okr_assemble_control/src/main/webapp/describe/sources/com/x/okr/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -20,13 +20,17 @@ import com.x.okr.assemble.control.service.OkrConfigSystemService;
...
@@ -20,13 +20,17 @@ import com.x.okr.assemble.control.service.OkrConfigSystemService;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Map
<
String
,
CacheImportFileStatus
>
importFileStatusMap
=
new
HashMap
<
String
,
CacheImportFileStatus
>();
public
static
Map
<
String
,
CacheImportFileStatus
>
importFileStatusMap
=
new
HashMap
<
String
,
CacheImportFileStatus
>();
public
static
final
String
OKRMANAGER
=
"OKRManager"
;
public
static
final
String
OKRMANAGER
=
"OKRManager"
;
public
static
QueueWorkDynamicRecord
queueWorkDynamicRecord
;
public
static
final
QueueWorkDynamicRecord
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
()
;
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
@@ -36,11 +40,8 @@ public class ThisApplication {
...
@@ -36,11 +40,8 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_okr_assemble_control
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_okr_assemble_control
());
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
();
context
().
startQueue
(
queueWorkDynamicRecord
);
context
().
startQueue
(
queueWorkDynamicRecord
);
new
OkrConfigSystemService
().
initAllSystemConfig
();
new
OkrConfigSystemService
().
initAllSystemConfig
();
// 每天凌晨2点执行一次
// 每天凌晨2点执行一次
context
.
schedule
(
St_WorkReportContent
.
class
,
"0 0 2 * * ?"
);
context
.
schedule
(
St_WorkReportContent
.
class
,
"0 0 2 * * ?"
);
// 每天凌晨2点30执行一次
// 每天凌晨2点30执行一次
...
@@ -63,6 +64,7 @@ public class ThisApplication {
...
@@ -63,6 +64,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
public
static
void
destroy
()
{
try
{
try
{
CacheManager
.
shutdown
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -10,7 +10,11 @@ import com.x.organization.assemble.authentication.schedule.CleanupOauthCode;
...
@@ -10,7 +10,11 @@ import com.x.organization.assemble.authentication.schedule.CleanupOauthCode;
public
class
ThisApplication
{
public
class
ThisApplication
{
public
static
QueueLoginRecord
queueLoginRecord
;
private
ThisApplication
()
{
// nothing
}
public
static
final
QueueLoginRecord
queueLoginRecord
=
new
QueueLoginRecord
();
protected
static
Context
context
;
protected
static
Context
context
;
...
@@ -22,7 +26,6 @@ public class ThisApplication {
...
@@ -22,7 +26,6 @@ public class ThisApplication {
try
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_organization_assemble_authentication
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_organization_assemble_authentication
());
queueLoginRecord
=
new
QueueLoginRecord
();
context
.
startQueue
(
queueLoginRecord
);
context
.
startQueue
(
queueLoginRecord
);
context
.
schedule
(
CleanupBind
.
class
,
"0 */15 * * * ?"
);
context
.
schedule
(
CleanupBind
.
class
,
"0 */15 * * * ?"
);
context
.
schedule
(
CleanupOauthCode
.
class
,
"0 */15 * * * ?"
);
context
.
schedule
(
CleanupOauthCode
.
class
,
"0 */15 * * * ?"
);
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -8,6 +8,10 @@ import com.x.organization.assemble.personal.schedule.DisableExpiredEmpower;
...
@@ -8,6 +8,10 @@ import com.x.organization.assemble.personal.schedule.DisableExpiredEmpower;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
@@ -24,6 +28,7 @@ public class ThisApplication {
...
@@ -24,6 +28,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
public
static
void
destroy
()
{
try
{
try
{
CacheManager
.
shutdown
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
o2server/x_processplatform_assemble_bam/src/main/java/com/x/processplatform/assemble/bam/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -11,6 +11,10 @@ import com.x.processplatform.assemble.bam.schedule.StateTimer;
...
@@ -11,6 +11,10 @@ import com.x.processplatform.assemble.bam.schedule.StateTimer;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_processplatform_assemble_bam/src/main/webapp/describe/sources/com/x/processplatform/assemble/bam/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -11,6 +11,10 @@ import com.x.processplatform.assemble.bam.schedule.StateTimer;
...
@@ -11,6 +11,10 @@ import com.x.processplatform.assemble.bam.schedule.StateTimer;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
@@ -31,6 +35,7 @@ public class ThisApplication {
...
@@ -31,6 +35,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
public
static
void
destroy
()
{
try
{
try
{
CacheManager
.
shutdown
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -8,13 +8,17 @@ import com.x.base.core.project.message.MessageConnector;
...
@@ -8,13 +8,17 @@ import com.x.base.core.project.message.MessageConnector;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
ProjectionExecuteQueue
projectionExecuteQueue
=
new
ProjectionExecuteQueue
();
public
static
final
ProjectionExecuteQueue
projectionExecuteQueue
=
new
ProjectionExecuteQueue
();
public
static
MappingExecuteQueue
mappingExecuteQueue
=
new
MappingExecuteQueue
();
public
static
final
MappingExecuteQueue
mappingExecuteQueue
=
new
MappingExecuteQueue
();
public
static
FormVersionQueue
formVersionQueue
=
new
FormVersionQueue
();
public
static
final
FormVersionQueue
formVersionQueue
=
new
FormVersionQueue
();
public
static
ProcessVersionQueue
processVersionQueue
=
new
ProcessVersionQueue
();
public
static
final
ProcessVersionQueue
processVersionQueue
=
new
ProcessVersionQueue
();
public
static
ScriptVersionQueue
scriptVersionQueue
=
new
ScriptVersionQueue
();
public
static
final
ScriptVersionQueue
scriptVersionQueue
=
new
ScriptVersionQueue
();
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
@@ -25,11 +29,11 @@ public class ThisApplication {
...
@@ -25,11 +29,11 @@ public class ThisApplication {
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_processplatform_assemble_designer
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_processplatform_assemble_designer
());
MessageConnector
.
start
(
context
());
MessageConnector
.
start
(
context
());
projectionExecuteQueue
.
start
(
);
context
().
startQueue
(
projectionExecuteQueue
);
mappingExecuteQueue
.
start
(
);
context
().
startQueue
(
mappingExecuteQueue
);
formVersionQueue
.
start
(
);
context
().
startQueue
(
formVersionQueue
);
processVersionQueue
.
start
(
);
context
().
startQueue
(
processVersionQueue
);
scriptVersionQueue
.
start
(
);
context
().
startQueue
(
scriptVersionQueue
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -38,11 +42,6 @@ public class ThisApplication {
...
@@ -38,11 +42,6 @@ public class ThisApplication {
public
static
void
destroy
()
{
public
static
void
destroy
()
{
try
{
try
{
CacheManager
.
shutdown
();
CacheManager
.
shutdown
();
projectionExecuteQueue
.
stop
();
mappingExecuteQueue
.
stop
();
formVersionQueue
.
stop
();
processVersionQueue
.
stop
();
scriptVersionQueue
.
stop
();
MessageConnector
.
stop
();
MessageConnector
.
stop
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -8,6 +8,10 @@ import com.x.processplatform.assemble.surface.schedule.CleanKeyLock;
...
@@ -8,6 +8,10 @@ import com.x.processplatform.assemble.surface.schedule.CleanKeyLock;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -21,13 +21,17 @@ import org.apache.commons.lang3.BooleanUtils;
...
@@ -21,13 +21,17 @@ import org.apache.commons.lang3.BooleanUtils;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
SyncJaxrsInvokeQueue
syncJaxrsInvokeQueue
=
new
SyncJaxrsInvokeQueue
();
public
static
final
SyncJaxrsInvokeQueue
syncJaxrsInvokeQueue
=
new
SyncJaxrsInvokeQueue
();
public
static
SyncJaxwsInvokeQueue
syncJaxwsInvokeQueue
=
new
SyncJaxwsInvokeQueue
();
public
static
final
SyncJaxwsInvokeQueue
syncJaxwsInvokeQueue
=
new
SyncJaxwsInvokeQueue
();
public
static
SyncEmbedQueue
syncEmbedQueue
=
new
SyncEmbedQueue
();
public
static
final
SyncEmbedQueue
syncEmbedQueue
=
new
SyncEmbedQueue
();
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
...
...
o2server/x_program_center/src/main/java/com/x/program/center/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -5,6 +5,8 @@ import java.util.List;
...
@@ -5,6 +5,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.google.gson.internal.LinkedTreeMap
;
import
com.google.gson.internal.LinkedTreeMap
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.logger.LoggerFactory
;
...
@@ -28,23 +30,27 @@ import com.x.program.center.schedule.ZhengwuDingdingSyncOrganizationTrigger;
...
@@ -28,23 +30,27 @@ import com.x.program.center.schedule.ZhengwuDingdingSyncOrganizationTrigger;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
return
context
;
return
context
;
}
}
public
static
CenterQueue
centerQueue
=
new
CenterQueue
();
public
static
final
CenterQueue
centerQueue
=
new
CenterQueue
();
public
static
LogQueue
logQueue
=
new
LogQueue
();
public
static
final
LogQueue
logQueue
=
new
LogQueue
();
public
static
List
<
Object
>
dingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
dingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
List
<
Object
>
weLinkSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
weLinkSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
List
<
Object
>
zhengwuDingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
zhengwuDingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
List
<
Object
>
qiyeweixinSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
qiyeweixinSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
Map
<
String
,
Map
<
String
,
LinkedTreeMap
>>
metricsReportMap
=
new
ConcurrentHashMap
<>();
public
static
Map
<
String
,
Map
<
String
,
LinkedTreeMap
>>
metricsReportMap
=
new
ConcurrentHashMap
<>();
...
@@ -56,7 +62,7 @@ public class ThisApplication {
...
@@ -56,7 +62,7 @@ public class ThisApplication {
context
().
startQueue
(
logQueue
);
context
().
startQueue
(
logQueue
);
/* 政务钉钉拉入同步 */
/* 政务钉钉拉入同步 */
if
(
Config
.
zhengwuDingding
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
zhengwuDingding
().
getEnable
()
))
{
/* 启动同步任务 */
/* 启动同步任务 */
context
().
scheduleLocal
(
ZhengwuDingdingSyncOrganization
.
class
,
Config
.
zhengwuDingding
().
getSyncCron
());
context
().
scheduleLocal
(
ZhengwuDingdingSyncOrganization
.
class
,
Config
.
zhengwuDingding
().
getSyncCron
());
/* 添加一个强制同步任务 */
/* 添加一个强制同步任务 */
...
@@ -64,7 +70,7 @@ public class ThisApplication {
...
@@ -64,7 +70,7 @@ public class ThisApplication {
Config
.
zhengwuDingding
().
getForceSyncCron
());
Config
.
zhengwuDingding
().
getForceSyncCron
());
}
}
/* 企业微信拉入同步 */
/* 企业微信拉入同步 */
if
(
Config
.
qiyeweixin
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
qiyeweixin
().
getEnable
()
))
{
/* 启动同步任务 */
/* 启动同步任务 */
context
().
scheduleLocal
(
QiyeweixinSyncOrganization
.
class
,
Config
.
qiyeweixin
().
getSyncCron
());
context
().
scheduleLocal
(
QiyeweixinSyncOrganization
.
class
,
Config
.
qiyeweixin
().
getSyncCron
());
/* 添加一个强制同步任务 */
/* 添加一个强制同步任务 */
...
@@ -72,14 +78,14 @@ public class ThisApplication {
...
@@ -72,14 +78,14 @@ public class ThisApplication {
Config
.
qiyeweixin
().
getForceSyncCron
());
Config
.
qiyeweixin
().
getForceSyncCron
());
}
}
/* 钉钉同步 */
/* 钉钉同步 */
if
(
Config
.
dingding
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
dingding
().
getEnable
()
))
{
/* 启动同步任务 */
/* 启动同步任务 */
context
().
scheduleLocal
(
DingdingSyncOrganization
.
class
,
Config
.
dingding
().
getSyncCron
());
context
().
scheduleLocal
(
DingdingSyncOrganization
.
class
,
Config
.
dingding
().
getSyncCron
());
/* 添加一个强制同步任务 */
/* 添加一个强制同步任务 */
context
().
scheduleLocal
(
DingdingSyncOrganizationTrigger
.
class
,
Config
.
dingding
().
getForceSyncCron
());
context
().
scheduleLocal
(
DingdingSyncOrganizationTrigger
.
class
,
Config
.
dingding
().
getForceSyncCron
());
}
}
/* WeLink同步 */
/* WeLink同步 */
if
(
Config
.
weLink
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
weLink
().
getEnable
()
))
{
/* 启动同步任务 */
/* 启动同步任务 */
context
().
scheduleLocal
(
WeLinkSyncOrganization
.
class
,
Config
.
weLink
().
getSyncCron
());
context
().
scheduleLocal
(
WeLinkSyncOrganization
.
class
,
Config
.
weLink
().
getSyncCron
());
/* 添加一个强制同步任务 */
/* 添加一个强制同步任务 */
...
...
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_query_service_processing/src/main/java/com/x/query/service/processing/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -12,6 +12,10 @@ import com.x.query.service.processing.schedule.CrawlWorkCompleted;
...
@@ -12,6 +12,10 @@ import com.x.query.service.processing.schedule.CrawlWorkCompleted;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/ThisApplication.java
浏览文件 @
585e1ea4
...
@@ -12,6 +12,10 @@ import com.x.query.service.processing.schedule.CrawlWorkCompleted;
...
@@ -12,6 +12,10 @@ import com.x.query.service.processing.schedule.CrawlWorkCompleted;
public
class
ThisApplication
{
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
protected
static
Context
context
;
public
static
Context
context
()
{
public
static
Context
context
()
{
...
...
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/jaxrs/test/ActionGroup2.java
浏览文件 @
585e1ea4
package
com.x.query.service.processing.jaxrs.test
;
package
com.x.query.service.processing.jaxrs.test
;
import
java.util.ArrayList
;
import
javax.script.Bindings
;
import
javax.script.ScriptContext
;
import
javax.script.ScriptEngine
;
import
javax.script.ScriptEngine
;
import
javax.script.SimpleScriptContext
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
...
@@ -19,7 +24,12 @@ class ActionGroup2 extends BaseAction {
...
@@ -19,7 +24,12 @@ class ActionGroup2 extends BaseAction {
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ScriptEngine
engine
=
ScriptFactory
.
newScriptEngine
();
ScriptEngine
engine
=
ScriptFactory
.
newScriptEngine
();
Object
o
=
engine
.
eval
(
"this.data && this.data.length"
);
ScriptContext
scriptContext
=
new
SimpleScriptContext
();
Bindings
bindings
=
scriptContext
.
getBindings
(
ScriptContext
.
ENGINE_SCOPE
);
bindings
.
put
(
"data"
,
new
ArrayList
<>());
engine
.
setContext
(
scriptContext
);
engine
.
eval
(
"var o = this.data && this.data.length;"
);
Object
o
=
engine
.
eval
(
"o;"
);
System
.
out
.
println
(
o
.
getClass
());
System
.
out
.
println
(
o
.
getClass
());
return
result
;
return
result
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录