Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
3d77677a
Commit
3d77677a
authored
Jun 23, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:新增删除定时任务方法
parent
f070bf4b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
15 deletions
+46
-15
TestApiService.java
...ava/com/gic/haoban/manage/api/service/TestApiService.java
+15
-5
TestController.java
...gic/haoban/manage/web/controller/test/TestController.java
+20
-3
spring-interceptor.xml
...ration-web/src/main/webapp/WEB-INF/spring-interceptor.xml
+1
-0
TestServiceImpl.java
...oban/manage/service/service/out/impl/TestServiceImpl.java
+10
-7
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/TestApiService.java
View file @
3d77677a
...
@@ -11,20 +11,20 @@ public interface TestApiService {
...
@@ -11,20 +11,20 @@ public interface TestApiService {
* @param id
* @param id
* @return
* @return
*/
*/
public
String
checkThread
(
String
id
,
Long
expireTime
);
String
checkThread
(
String
id
,
Long
expireTime
);
/**
/**
* 拉取自己部门企业微信通讯录
* 拉取自己部门企业微信通讯录
* @return
* @return
*/
*/
public
String
listSelfQywxUser
(
String
corpid
,
String
secretVal
,
String
dataId
);
String
listSelfQywxUser
(
String
corpid
,
String
secretVal
,
String
dataId
);
/**
/**
* 拉取所有部门企业微信通讯录
* 拉取所有部门企业微信通讯录
* @return
* @return
*/
*/
public
String
listAllQywxUser
(
String
corpid
,
String
secretVal
,
String
dataId
);
String
listAllQywxUser
(
String
corpid
,
String
secretVal
,
String
dataId
);
/**
/**
* 创建定时器
* 创建定时器
...
@@ -33,12 +33,22 @@ public interface TestApiService {
...
@@ -33,12 +33,22 @@ public interface TestApiService {
* @param methodName
* @param methodName
* @param cron
* @param cron
*/
*/
public
void
quartzTaskConvert
(
String
serviceName
,
String
methodName
,
String
cron
,
String
params
);
void
quartzTaskConvert
(
String
serviceName
,
String
methodName
,
String
cron
,
String
params
);
/**
* 删除定时器
*
* @param serviceName 服务名称
* @param methodName 方法名称
* @param referId 引用id
*/
void
delQuartzTask
(
String
serviceName
,
String
methodName
,
String
referId
);
/**
/**
* 拉取所有部门企业微信通讯录
* 拉取所有部门企业微信通讯录
* @return
* @return
*/
*/
public
ServiceResponse
listAllQywxUser
(
String
params
);
ServiceResponse
listAllQywxUser
(
String
params
);
}
}
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/test/TestController.java
View file @
3d77677a
...
@@ -65,7 +65,7 @@ public class TestController extends WebBaseController {
...
@@ -65,7 +65,7 @@ public class TestController extends WebBaseController {
*/
*/
@RequestMapping
(
"/create-quarter_key"
)
@RequestMapping
(
"/create-quarter_key"
)
@ResponseBody
@ResponseBody
public
HaobanResponse
testListVo
(
String
key
)
{
public
HaobanResponse
createQuarterKey
(
String
key
)
{
QuartzEnum
quartzEnum
=
QuartzEnum
.
getByKey
(
key
);
QuartzEnum
quartzEnum
=
QuartzEnum
.
getByKey
(
key
);
if
(
null
==
quartzEnum
)
{
if
(
null
==
quartzEnum
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_0
);
return
resultResponse
(
HaoBanErrCode
.
ERR_0
);
...
@@ -81,8 +81,8 @@ public class TestController extends WebBaseController {
...
@@ -81,8 +81,8 @@ public class TestController extends WebBaseController {
*/
*/
@RequestMapping
(
"/create-quarter"
)
@RequestMapping
(
"/create-quarter"
)
@ResponseBody
@ResponseBody
public
HaobanResponse
testListVo
(
String
serviceName
,
String
methodName
,
String
cron
,
String
params
)
{
public
HaobanResponse
createQuarter
(
String
serviceName
,
String
methodName
,
String
cron
,
String
params
)
{
if
(
StringUtils
.
isAnyBlank
(
serviceName
,
methodName
,
cron
))
{
if
(
StringUtils
.
isAnyBlank
(
serviceName
,
methodName
,
cron
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
testApiService
.
quartzTaskConvert
(
serviceName
,
methodName
,
cron
,
params
);
testApiService
.
quartzTaskConvert
(
serviceName
,
methodName
,
cron
,
params
);
...
@@ -90,6 +90,22 @@ public class TestController extends WebBaseController {
...
@@ -90,6 +90,22 @@ public class TestController extends WebBaseController {
}
}
/**
* 创建定时器
*
* @return
*/
@RequestMapping
(
"/del-quarter"
)
@ResponseBody
public
HaobanResponse
delQuarter
(
String
serviceName
,
String
methodName
,
String
referId
)
{
if
(
StringUtils
.
isAnyBlank
(
serviceName
,
methodName
,
referId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
testApiService
.
delQuartzTask
(
serviceName
,
methodName
,
referId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
@RequestMapping
(
"/sharing-import"
)
@RequestMapping
(
"/sharing-import"
)
@ResponseBody
@ResponseBody
public
HaobanResponse
sharingImport
(
String
key
)
{
public
HaobanResponse
sharingImport
(
String
key
)
{
...
@@ -194,6 +210,7 @@ public class TestController extends WebBaseController {
...
@@ -194,6 +210,7 @@ public class TestController extends WebBaseController {
/**
/**
* 刷新整个企业好友
* 刷新整个企业好友
*
* @param wxEnterpriseId
* @param wxEnterpriseId
* @return
* @return
*/
*/
...
...
haoban-manage3-operation-web/src/main/webapp/WEB-INF/spring-interceptor.xml
View file @
3d77677a
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<bean
class=
"com.gic.authcenter.commons.util.AuthInterceptor"
/>
<bean
class=
"com.gic.authcenter.commons.util.AuthInterceptor"
/>
<mvc:interceptor>
<mvc:interceptor>
<mvc:mapping
path=
"/**"
/>
<mvc:mapping
path=
"/**"
/>
<mvc:exclude-mapping
path=
"/test/**"
/>
<mvc:exclude-mapping
path=
"/get-pic-code"
/>
<mvc:exclude-mapping
path=
"/get-pic-code"
/>
<mvc:exclude-mapping
path=
"/phone-login"
/>
<mvc:exclude-mapping
path=
"/phone-login"
/>
<mvc:exclude-mapping
path=
"/upload-file*"
/>
<mvc:exclude-mapping
path=
"/upload-file*"
/>
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/TestServiceImpl.java
View file @
3d77677a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.List
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.TestApiService
;
import
com.gic.haoban.manage.api.service.TestApiService
;
import
com.gic.haoban.manage.service.service.SecretSettingService
;
import
com.gic.haoban.manage.service.service.SecretSettingService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.task.api.service.QuartzApiService
;
import
com.gic.quartz.api.dto.QuartzTaskDTO
;
import
com.gic.quartz.api.dto.QuartzTaskDTO
;
import
com.gic.quartz.api.service.QuartzService
;
import
com.gic.quartz.api.service.QuartzService
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* Created by tgs on 2020/2/9.
* Created by tgs on 2020/2/9.
*/
*/
...
@@ -95,7 +90,15 @@ public class TestServiceImpl implements TestApiService {
...
@@ -95,7 +90,15 @@ public class TestServiceImpl implements TestApiService {
//延迟多少秒执行
//延迟多少秒执行
taskDTO
.
setTaskTimeInfo
(
cron
);
taskDTO
.
setTaskTimeInfo
(
cron
);
quartzService
.
addOrUpdateQuartzTask
(
taskDTO
);
quartzService
.
addOrUpdateQuartzTask
(
taskDTO
);
}
@Override
public
void
delQuartzTask
(
String
serviceName
,
String
methodName
,
String
referId
)
{
QuartzTaskDTO
taskDTO
=
new
QuartzTaskDTO
();
taskDTO
.
setTaskService
(
serviceName
);
taskDTO
.
setTaskMethod
(
methodName
);
taskDTO
.
setReferId
(
referId
);
quartzService
.
delQuartzTask
(
taskDTO
);
}
}
@Override
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment